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

ltiSequentialBackwardSearch.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 .......: ltiSequentialBackwardSearch.h
00027  * authors ....: Jens Paustenbach
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 8.7.2002
00030  * revisions ..: $Id: ltiSequentialBackwardSearch.h,v 1.4 2006/02/07 18:25:24 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_SEQUENTIAL_BACKWARD_SEARCH_H_
00034 #define _LTI_SEQUENTIAL_BACKWARD_SEARCH_H_
00035 
00036 #include "ltiVector.h"
00037 #include "ltiMatrix.h"
00038 #include "ltiPlusLTakeAwayR.h"
00039 
00040 namespace lti {
00041   /**
00042    *  This class implements the sequential backward search algorithm for 
00043    *  feature selection. It is based on the PlusRTakeAwayR algorithm with 
00044    *  parameters r=1 and l=0. It starts with all features from the source data
00045    *  an in each iteration the least significant feature is deleted from 
00046    *  the destination matrix until the predetermined number of features is
00047    *  reached.
00048    */
00049   class sequentialBackwardSearch : public plusLTakeAwayR {
00050   public:
00051     /**
00052      * default constructor
00053      */
00054     sequentialBackwardSearch();
00055 
00056     /**
00057      * copy constructor
00058      * @param other the object to be copied
00059      */
00060     sequentialBackwardSearch(const sequentialBackwardSearch& other);
00061 
00062     /**
00063      * destructor
00064      */
00065     virtual ~sequentialBackwardSearch();
00066 
00067     /**
00068      * returns the name of this type ("sequentialBackwardSearch")
00069      */
00070     virtual const char* getTypeName() const;
00071   
00072     /**
00073      * selects the nbFeatures best features from src and puts them leave 
00074      * them in dest.
00075      * @param src dmatrix with the source data.
00076      * @param srcIds ivector with the ids corresponding to the point in src
00077      * @param dest dmatrix where the result will be left.
00078      * @return true if apply successful or false otherwise.
00079      */
00080     bool apply(const dmatrix& src,const ivector& srcIds,dmatrix& dest);
00081       
00082     /**
00083      * copy data of "other" functor.
00084      * @param other the functor to be copied
00085      * @return a reference to this functor object
00086      */
00087     sequentialBackwardSearch& copy(const sequentialBackwardSearch& other);
00088 
00089     /**
00090      * alias for copy member
00091      * @param other the functor to be copied
00092      * @return a reference to this functor object
00093      */
00094     sequentialBackwardSearch& operator=(const sequentialBackwardSearch& other);
00095 
00096     /**
00097      * returns a pointer to a clone of this functor.
00098      */
00099     virtual functor* clone() const;
00100 
00101     /**
00102      * returns used parameters
00103      */
00104     const parameters& getParameters() const;
00105 
00106 
00107   };
00108 }
00109 
00110 #endif

Generated on Sat Apr 10 15:26:08 2010 for LTI-Lib by Doxygen 1.6.1