LTI-Lib latest version v1.9 - last update 10 Apr 2010

ltiMathFunction.h

00001 /*
00002  * Copyright (C) 2002, 2003, 2004, 2005, 2006
00003  * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany
00004  *
00005  * This file is part of the LTI-Computer Vision Library (LTI-Lib)
00006  *
00007  * The LTI-Lib is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public License (LGPL)
00009  * as published by the Free Software Foundation; either version 2.1 of
00010  * the License, or (at your option) any later version.
00011  *
00012  * The LTI-Lib is distributed in the hope that it will be
00013  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
00014  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with the LTI-Lib; see the file LICENSE.  If
00019  * not, write to the Free Software Foundation, Inc., 59 Temple Place -
00020  * Suite 330, Boston, MA 02111-1307, USA.
00021  */
00022 
00023 
00024 /*--------------------------------------------------------------------
00025  * project ....: LTI-Lib: Image Processing and Computer Vision Library
00026  * file .......: ltiMathFunction.h
00027  * authors ....: Pablo Alvarado
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 15.3.2002
00030  * revisions ..: $Id: ltiMathFunction.h,v 1.8 2006/02/08 12:34:01 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_MATH_FUNCTION_H_
00034 #define _LTI_MATH_FUNCTION_H_
00035 
00036 
00037 #include "ltiFunctor.h"
00038 
00039 namespace lti {
00040   /**
00041    * Abstract class, used as parent for all mathematical parametrical
00042    * functions, like multi-variate gaussians.
00043    */
00044   class mathFunction : public functor {
00045   public:
00046     /**
00047      * the parameters for the class mathFunction
00048      */
00049     class parameters : public functor::parameters {
00050     public:
00051       /**
00052        * default constructor
00053        */
00054       parameters();
00055 
00056       /**
00057        * copy constructor
00058        * @param other the parameters object to be copied
00059        */
00060       parameters(const parameters& other);
00061 
00062       /**
00063        * destructor
00064        */
00065       ~parameters();
00066 
00067       /**
00068        * returns name of this type
00069        */
00070       const char* getTypeName() const;
00071 
00072       /**
00073        * copy the contents of a parameters object
00074        * @param other the parameters object to be copied
00075        * @return a reference to this parameters object
00076        */
00077       parameters& copy(const parameters& other);
00078 
00079       /**
00080        * copy the contents of a parameters object
00081        * @param other the parameters object to be copied
00082        * @return a reference to this parameters object
00083        */
00084       parameters& operator=(const parameters& other);
00085 
00086 
00087       /**
00088        * returns a pointer to a clone of the parameters
00089        */
00090       virtual functor::parameters* clone() const;
00091 
00092       /**
00093        * write the parameters in the given ioHandler
00094        * @param handler the ioHandler to be used
00095        * @param complete if true (the default) the enclosing begin/end will
00096        *        be also written, otherwise only the data block will be written.
00097        * @return true if write was successful
00098        */
00099       virtual bool write(ioHandler& handler,const bool complete=true) const;
00100 
00101       /**
00102        * read the parameters from the given ioHandler
00103        * @param handler the ioHandler to be used
00104        * @param complete if true (the default) the enclosing begin/end will
00105        *        be also written, otherwise only the data block will be written.
00106        * @return true if write was successful
00107        */
00108       virtual bool read(ioHandler& handler,const bool complete=true);
00109 
00110 #     ifdef _LTI_MSC_6
00111       /**
00112        * this function is required by MSVC only, as a workaround for a
00113        * very awful bug, which exists since MSVC V.4.0, and still by
00114        * V.6.0 with all bugfixes (so called "service packs") remains
00115        * there...  This method is also public due to another bug, so please
00116        * NEVER EVER call this method directly: use read() instead
00117        */
00118       bool readMS(ioHandler& handler,const bool complete=true);
00119 
00120       /**
00121        * this function is required by MSVC only, as a workaround for a
00122        * very awful bug, which exists since MSVC V.4.0, and still by
00123        * V.6.0 with all bugfixes (so called "service packs") remains
00124        * there...  This method is also public due to another bug, so please
00125        * NEVER EVER call this method directly: use write() instead
00126        */
00127       bool writeMS(ioHandler& handler,const bool complete=true) const;
00128 #     endif
00129 
00130       // ------------------------------------------------
00131       // the parameters
00132       // ------------------------------------------------
00133 
00134     };
00135 
00136     /**
00137      * default constructor
00138      */
00139     mathFunction();
00140 
00141     /**
00142      * copy constructor
00143      * @param other the object to be copied
00144      */
00145     mathFunction(const mathFunction& other);
00146 
00147     /**
00148      * destructor
00149      */
00150     virtual ~mathFunction();
00151 
00152     /**
00153      * returns the name of this type ("mathFunction")
00154      */
00155     virtual const char* getTypeName() const;
00156 
00157     /**
00158      * copy data of "other" functor.
00159      * @param other the functor to be copied
00160      * @return a reference to this functor object
00161      */
00162     mathFunction& copy(const mathFunction& other);
00163 
00164     /**
00165      * alias for copy member
00166      * @param other the functor to be copied
00167      * @return a reference to this functor object
00168      */
00169     mathFunction& operator=(const mathFunction& other);
00170 
00171     /**
00172      * returns a pointer to a clone of this functor.
00173      */
00174     virtual functor* clone() const;
00175 
00176     /**
00177      * returns used parameters
00178      */
00179     const parameters& getParameters() const;
00180 
00181   };
00182 }
00183 
00184 #endif

Generated on Sat Apr 10 15:25:49 2010 for LTI-Lib by Doxygen 1.6.1