contrib/mul/pdf1d/pdf1d_gaussian_kernel_pdf_builder.cxx
Go to the documentation of this file.
00001 // This is mul/pdf1d/pdf1d_gaussian_kernel_pdf_builder.cxx
00002 #include "pdf1d_gaussian_kernel_pdf_builder.h"
00003 
00004 #include <vcl_cassert.h>
00005 #include <vcl_string.h>
00006 
00007 #include <pdf1d/pdf1d_gaussian_kernel_pdf.h>
00008 
00009 //=======================================================================
00010 // Dflt ctor
00011 //=======================================================================
00012 
00013 pdf1d_gaussian_kernel_pdf_builder::pdf1d_gaussian_kernel_pdf_builder()
00014 {
00015 }
00016 
00017 //=======================================================================
00018 // Destructor
00019 //=======================================================================
00020 
00021 pdf1d_gaussian_kernel_pdf_builder::~pdf1d_gaussian_kernel_pdf_builder()
00022 {
00023 }
00024 
00025 //=======================================================================
00026 
00027 pdf1d_gaussian_kernel_pdf& pdf1d_gaussian_kernel_pdf_builder::gkpdf(pdf1d_pdf& model) const
00028 {
00029   // require a pdf1d_gaussian_kernel_pdf
00030   assert(model.is_class("pdf1d_gaussian_kernel_pdf"));
00031   return static_cast<pdf1d_gaussian_kernel_pdf&>( model);
00032 }
00033 
00034 pdf1d_pdf* pdf1d_gaussian_kernel_pdf_builder::new_model() const
00035 {
00036   return new pdf1d_gaussian_kernel_pdf;
00037 }
00038 
00039 
00040 vcl_string pdf1d_gaussian_kernel_pdf_builder::new_model_type() const
00041 {
00042   return vcl_string("pdf1d_gaussian_kernel_pdf");
00043 }
00044 
00045 //=======================================================================
00046 // Method: is_a
00047 //=======================================================================
00048 
00049 vcl_string pdf1d_gaussian_kernel_pdf_builder::is_a() const
00050 {
00051   return vcl_string("pdf1d_gaussian_kernel_pdf_builder");
00052 }
00053 
00054 //=======================================================================
00055 // Method: is_class
00056 //=======================================================================
00057 
00058 bool pdf1d_gaussian_kernel_pdf_builder::is_class(vcl_string const& s) const
00059 {
00060   return pdf1d_kernel_pdf_builder::is_class(s) || s==pdf1d_gaussian_kernel_pdf_builder::is_a();
00061 }
00062 
00063 //=======================================================================
00064 // Method: version_no
00065 //=======================================================================
00066 
00067 short pdf1d_gaussian_kernel_pdf_builder::version_no() const
00068 {
00069   return 1;
00070 }
00071 
00072 //=======================================================================
00073 // Method: clone
00074 //=======================================================================
00075 
00076 pdf1d_builder* pdf1d_gaussian_kernel_pdf_builder::clone() const
00077 {
00078   return new pdf1d_gaussian_kernel_pdf_builder(*this);
00079 }
00080 
00081 //=======================================================================
00082 // Method: print
00083 //=======================================================================
00084 
00085 void pdf1d_gaussian_kernel_pdf_builder::print_summary(vcl_ostream& /*os*/) const
00086 {
00087   vcl_cerr << "pdf1d_gaussian_kernel_pdf_builder::print_summary() NYI\n";
00088 }
00089 
00090