Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

ConditionalCDFSmoother.cc

Go to the documentation of this file.
00001 00002 00003 // -*- C++ -*- 00004 00005 // ConditionalCDFSmoother.cc 00006 // 00007 // Copyright (C) *YEAR* *AUTHOR(S)* 00008 // ... 00009 // Copyright (C) *YEAR* *AUTHOR(S)* 00010 // 00011 // Redistribution and use in source and binary forms, with or without 00012 // modification, are permitted provided that the following conditions are met: 00013 // 00014 // 1. Redistributions of source code must retain the above copyright 00015 // notice, this list of conditions and the following disclaimer. 00016 // 00017 // 2. Redistributions in binary form must reproduce the above copyright 00018 // notice, this list of conditions and the following disclaimer in the 00019 // documentation and/or other materials provided with the distribution. 00020 // 00021 // 3. The name of the authors may not be used to endorse or promote 00022 // products derived from this software without specific prior written 00023 // permission. 00024 // 00025 // THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 00026 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00027 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00028 // NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00029 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00030 // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00031 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00032 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00033 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00034 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 // 00036 // This file is part of the PLearn library. For more information on the PLearn 00037 // library, go to the PLearn Web site at www.plearn.org 00038 00039 /* ******************************************************* 00040 * $Id: ConditionalCDFSmoother.cc,v 1.5 2004/02/20 21:11:46 chrish42 Exp $ 00041 ******************************************************* */ 00042 00045 #include "ConditionalCDFSmoother.h" 00046 00047 namespace PLearn { 00048 using namespace std; 00049 00050 ConditionalCDFSmoother::ConditionalCDFSmoother() {} 00051 00052 ConditionalCDFSmoother::ConditionalCDFSmoother(PP<HistogramDistribution>& prior_cdf_) 00053 :Smoother(), prior_cdf(prior_cdf_) 00054 {} 00055 00056 00057 PLEARN_IMPLEMENT_OBJECT(ConditionalCDFSmoother, 00058 "Smoother that combines a detailed prior curve with a rough input curve.\n", 00059 "This smoother is meant to smooth conditional distribution functions, using\n" 00060 "a high-resolution prior cdf provided as a HistogramDistribution. Its 'smooth'\n" 00061 "function takes a lower-resolution curve and smooths it using the prior\n" 00062 "to fill the gaps."); 00063 00064 void ConditionalCDFSmoother::declareOptions(OptionList& ol) 00065 { 00066 declareOption(ol, "prior_cdf", &ConditionalCDFSmoother::prior_cdf, OptionBase::buildoption, 00067 "Prior CDF used to smooth other functions"); 00068 00069 // Now call the parent class' declareOptions 00070 inherited::declareOptions(ol); 00071 } 00072 00073 void ConditionalCDFSmoother::build_() 00074 { 00075 } 00076 00077 void ConditionalCDFSmoother::build() 00078 { 00079 inherited::build(); 00080 build_(); 00081 } 00082 00083 void ConditionalCDFSmoother::makeDeepCopyFromShallowCopy(map<const void*, void*>& copies) 00084 { 00085 Object::makeDeepCopyFromShallowCopy(copies); 00086 deepCopyField(prior_cdf, copies); 00087 } 00088 00089 real ConditionalCDFSmoother::smooth(const Vec& source_function, Vec& smoothed_function, 00090 Vec bin_positions, Vec dest_bin_positions) const 00091 { 00092 PLERROR("smooth not implemented for ConditionalCDFSmoother."); 00093 return 0.0; 00094 } 00095 00096 } // end of namespace PLearn

Generated on Tue Aug 17 15:50:02 2004 for PLearn by doxygen 1.3.7