contrib/mul/msm/msm_no_limiter.cxx
Go to the documentation of this file.
00001 //:
00002 // \file
00003 // \author Tim Cootes
00004 // \brief No limits applied to parameters
00005 
00006 #include "msm_no_limiter.h"
00007 #include <vnl/io/vnl_io_vector.h>
00008 #include <vsl/vsl_binary_loader.h>
00009 
00010 //=======================================================================
00011 msm_no_limiter::msm_no_limiter()
00012 {
00013 }
00014 
00015 //: Define number of SDs to limit at
00016 void msm_no_limiter::set_n_sds(double)
00017 {
00018 }
00019 
00020 //: Define variance on each parameter
00021 void msm_no_limiter::set_param_var(const vnl_vector<double>&)
00022 {
00023 }
00024 
00025 //: Set the limits so that a given proportion pass
00026 //  Does nothing.
00027 void msm_no_limiter::set_acceptance(double, unsigned)
00028 {
00029 }
00030 
00031 //: Apply limit to parameter vector b (does nothing)
00032 void msm_no_limiter::apply_limit(vnl_vector<double>& b) const
00033 {
00034 }
00035 
00036 //=======================================================================
00037 //: Print class to os
00038 void msm_no_limiter::print_summary(vcl_ostream& os) const
00039 {
00040   os << "{ }";
00041 }
00042 
00043 const static short version_no = 1;
00044 
00045 //: Save class to binary file stream
00046 void msm_no_limiter::b_write(vsl_b_ostream& bfs) const
00047 {
00048   vsl_b_write(bfs,version_no);
00049 }
00050 
00051 
00052 //: Load class from binary file stream
00053 void msm_no_limiter::b_read(vsl_b_istream& bfs)
00054 {
00055   short version;
00056   vsl_b_read(bfs,version);
00057   switch (version)
00058   {
00059     case (1):
00060       break;
00061     default:
00062       vcl_cerr << "msm_no_limiter::b_read() :\n"
00063                << "Unexpected version number " << version << vcl_endl;
00064       bfs.is().clear(vcl_ios::badbit); // Set an unrecoverable IO error on stream
00065       return;
00066   }
00067 }
00068 
00069 vcl_string msm_no_limiter::is_a() const
00070 {
00071   return vcl_string("msm_no_limiter");
00072 }
00073 
00074 //: Create a copy on the heap and return base class pointer
00075 msm_param_limiter* msm_no_limiter::clone() const
00076 {
00077   return new msm_no_limiter(*this);
00078 }
00079 
00080