Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
constraintModel.hpp
00001 /* $Id$ */
00002 
00003 #ifndef FILTER_CONSTRAINT_MODEL
00004 #define FILTER_CONSTRAINT_MODEL
00005 
00006 #include "kernel/dataLog.hpp"
00007 
00008 #include "jmath/jblas.hpp"
00009 
00010 namespace jafar {
00011   namespace filter {
00012     
00017     class JacobianStrongConstraintModel : public jafar::kernel::DataLoggable {
00018 
00019     protected:
00020 
00021       std::size_t p_sizeState;
00022 
00024       double p_value;
00025 
00027       double p_alpha;
00028 
00030       double p_R0;
00031 
00033       bool p_doApplyConstraint;
00034 
00036       double p_R;
00037 
00039       double p_relativeStrength;
00040 
00042       mutable double p_estimatedValue;
00043 
00044       int p_nbTimesApplied;
00045 
00046       int p_maxNbTimesApplied;
00047 
00048       static const double applyThreshold;
00049 
00050       virtual void writeLogHeader(jafar::kernel::DataLogger& log) const;
00051       virtual void writeLogData(jafar::kernel::DataLogger& log) const;
00052 
00053     public:
00054 
00057       jblas::mat J;
00058 
00059       JacobianStrongConstraintModel(std::size_t sizeState,
00060             double value,
00061             double alpha,
00062             int maxNbTimesApplied = -1) :
00063   p_sizeState(sizeState), p_value(value), p_alpha(alpha),
00064   p_R0(0), p_doApplyConstraint(false), p_R(0), p_relativeStrength(0),
00065   p_estimatedValue(0),
00066   p_nbTimesApplied(0),
00067   p_maxNbTimesApplied(maxNbTimesApplied),
00068   J(1,sizeState)
00069       {}
00070 
00071       virtual ~JacobianStrongConstraintModel() {}
00072 
00073       std::size_t sizeState() const {return p_sizeState;}
00074       double value() const {return p_value;}
00075 
00076       bool doApplyConstraint(jblas::vec_range const& x,
00077            jblas::sym_mat_range const& xCov);
00078 
00079       virtual double estimateValue(jblas::vec_range const& x0) const = 0;
00080       virtual void estimateValueJac(jblas::vec_range const& x0) = 0;
00081 
00082       virtual double weakeningVariance();
00083 
00084     };
00085 
00086   } // namespace filter
00087 } // namespace jafar
00088 
00089 #endif // FILTER_CONSTRAINT_MODEL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:19 for Jafar by doxygen 1.7.6.1
LAAS-CNRS