TLIB documentation
 

tlConst.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
00013 //
00014 /////////////////////////////////////////////////////////////////////////////////
00015 
00016 
00017 #ifndef __TLCONST_H__
00018 #define __TLCONST_H__
00019 
00020 
00021 #include "tlVision.h"
00022 
00023 
00024 template<typename T>
00025 class tlConst
00026 {
00027 private:
00028   T     val;
00029   T     pred;
00030   int   tol;          // tolerance [%]
00031         float s, s_;        // state and state estimate
00032         float e, e_;        // estimate error covariance (before/after)
00033         float p, m;         // process and measurement covariances
00034 
00035 public:
00036 
00037   // constructors
00038   tlConst  ();
00039   tlConst  (T val, float pCv, int tol=-1);
00040   tlConst  (T val, float eCv, float pCv, float mCv, int tol=-1);
00041   virtual ~tlConst ();
00042 
00043   // initialization
00044   int init (T val, float pCv, int tol=-1);
00045   int init (T val, float eCv, float pCv, float mCv, int tol=-1);
00046 
00047   // management
00048   int setVal   (T val);
00049   int setParam (float pCv, int tol=-1);
00050   int setParam (float eCv, float pCv, float mCv, int tol=-1);
00051   int setTol   (int tol);
00052 
00053   // computation
00054   int   update      (T val);
00055 
00056   // data access
00057   int   getTol      () { return tol;  }
00058   T     getVal      () { return val;  }
00059   T     getNext     () { return pred; }
00060   float getState    () { return s;    }
00061   float getEstimate () { return s_;   }
00062 };
00063 
00064 
00065 #endif
00066 


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.