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

ltiTriangularMatrixType.h

00001 /*
00002  * Copyright (C) 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 .......: ltiTriangularMatrixType.h
00027  * authors ....: Peter Doerfler
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 7.7.2003
00030  * revisions ..: $Id: ltiTriangularMatrixType.h,v 1.4 2006/02/08 12:49:35 ltilib Exp $
00031  */
00032 
00033 #include "ltiIoObject.h"
00034 
00035 #ifndef _LTI_TRIANGULAR_MATRIX_TYPE_H_
00036 #define _LTI_TRIANGULAR_MATRIX_TYPE_H_
00037 
00038 namespace lti {
00039 
00040   /**
00041    * This is a helper class that defines the enum eTriangularType and
00042    * has one member triangularType of that type. It is inherited by
00043    * the parameter classes of functors that work on regular matrices
00044    * that are triangular by definition. The triangular type determines
00045    * whether such a matrix is lower or upper triangular.
00046    */
00047   class triangularMatrixType : public ioObject {
00048 
00049   protected:
00050     
00051     triangularMatrixType() {};
00052     
00053   public:
00054     
00055     /**
00056      * A triangular matrix can have its values above or below the
00057      * main diagonal which is called upper or lower triangular
00058      * matrix, respectively.
00059      */
00060     enum eTriangularType {
00061       Upper, /**< the data matrix is upper triangular*/ 
00062       Lower  /**< the data matrix is lower triangular*/
00063     };
00064 
00065     /**
00066      * Sets whether a matrix that is triangular by defintion is upper
00067      * or lower triangular.
00068      */
00069     eTriangularType triangularType;
00070 
00071     /**
00072      * returns name of this type
00073      */
00074     const char* getTypeName() const {
00075       return "triangularMatrixType";
00076     };
00077     
00078     /**
00079      * copy data of "other" functor.
00080      * @param other the functor to be copied
00081      * @return a reference to this functor object
00082      */
00083     triangularMatrixType& copy(const triangularMatrixType& other);
00084 
00085     /**
00086      * alias for copy member
00087      * @param other the functor to be copied
00088      * @return a reference to this functor object
00089      */
00090     triangularMatrixType& operator=(const triangularMatrixType& other);
00091 
00092     /**
00093      * write the data 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     bool write(ioHandler& handler, const bool complete=true) const;
00100 
00101     /**
00102      * read the data 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     bool read(ioHandler& handler,const bool complete=true);
00109 
00110   };
00111 }
00112 
00113 #endif

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