core/vnl/io/vnl_io_nonlinear_minimizer.h
Go to the documentation of this file.
00001 // This is core/vnl/io/vnl_io_nonlinear_minimizer.h
00002 #ifndef vnl_io_nonlinear_minimizer_h
00003 #define vnl_io_nonlinear_minimizer_h
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author dac
00010 // \date 21-Mar-2001
00011 
00012 #include <vsl/vsl_binary_io.h>
00013 #include <vnl/vnl_nonlinear_minimizer.h>
00014 #include <vcl_string.h>
00015 
00016 //: Base for objects which provide IO
00017 //  for classes derived from vnl_nonlinear_minimizer
00018 class vnl_io_nonlinear_minimizer
00019 {
00020  public:
00021   //: Constructor
00022   vnl_io_nonlinear_minimizer() {}
00023 
00024   //: Destructor
00025   virtual ~vnl_io_nonlinear_minimizer() {}
00026 
00027   //: Create new object of type vnl_nonlinear_minimizer on heap
00028   virtual vnl_nonlinear_minimizer* new_object() const;
00029 
00030   //: Write derived class to os using vnl_nonlinear_minimizer reference
00031   virtual void b_write_by_base(vsl_b_ostream& os,
00032                                const vnl_nonlinear_minimizer& base) const;
00033 
00034   //: Write derived class to os using vnl_nonlinear_minimizer reference
00035   virtual void b_read_by_base(vsl_b_istream& is,
00036                               vnl_nonlinear_minimizer& base) const;
00037 
00038   //: Print summary of derived class to os
00039   //  using vnl_nonlinear_minimizer reference
00040   virtual void print_summary_by_base(vcl_ostream& os,
00041                                      const vnl_nonlinear_minimizer& base) const;
00042 
00043   //: Copy this object onto the heap and return a pointer
00044   virtual vnl_io_nonlinear_minimizer* clone() const;
00045 
00046   //: Return name of class for which this object provides IO
00047   virtual vcl_string target_classname() const { return "vnl_nonlinear_minimizer"; }
00048 
00049   //: Return true if b is of class target_classname()
00050   //  Typically this will just be "return b.is_a()==target_classname()"
00051   //  However, third party libraries may use a different system
00052   virtual bool is_io_for(const vnl_nonlinear_minimizer& b) const
00053   { return b.is_a()==target_classname(); }
00054 };
00055 
00056 //: Add example object to list of those that can be loaded
00057 //  The vsl_binary_loader must see an example of each derived class
00058 //  before it knows how to deal with them.
00059 //  A clone is taken of b
00060 void vsl_add_to_binary_loader(const vnl_io_nonlinear_minimizer& b);
00061 
00062 //: Binary save to stream by vnl_nonlinear_minimizer pointer
00063 void vsl_b_write(vsl_b_ostream &os, const vnl_nonlinear_minimizer * b);
00064 
00065 //: Binary read from stream by vnl_nonlinear_minimizer pointer
00066 void vsl_b_read(vsl_b_istream &is, vnl_nonlinear_minimizer* &b);
00067 
00068 //: Print summary to stream by vnl_nonlinear_minimizer pointer
00069 void vsl_print_summary(vcl_ostream &os, const vnl_nonlinear_minimizer * b);
00070 
00071 //: Binary save vnl_real_polynomial to stream.
00072 void vsl_b_write(vsl_b_ostream &os, const vnl_nonlinear_minimizer & v);
00073 
00074 //: Binary load vnl_real_polynomial from stream.
00075 void vsl_b_read(vsl_b_istream &is, vnl_nonlinear_minimizer & v);
00076 
00077 //: Print human readable summary of object to a stream
00078 void vsl_print_summary(vcl_ostream& os,const vnl_nonlinear_minimizer & b);
00079 
00080 #endif // vnl_io_nonlinear_minimizer_h