00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
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
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 }