conditionalgaussian.h
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2002 Klaas Gadeyne <first dot last at gmail dot com>
3 // Copyright (C) 2008 Tinne De Laet <first dot last at mech dot kuleuven dot be>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation; either version 2.1 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 
20 #ifndef __CONDITIONAL_GAUSSIAN__
21 #define __CONDITIONAL_GAUSSIAN__
22 
23 #include "conditionalpdf.h"
24 
25 namespace BFL
26 {
28 
40  class ConditionalGaussian : public ConditionalPdf<MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector>
41  {
42  public:
44 
49  ConditionalGaussian(int dim = 0, int num_conditional_arguments=0);
50 
51  // Default Copy constructor will do
52 
54  virtual ~ConditionalGaussian();
55 
57  virtual ConditionalGaussian* Clone() const;
58 
59  // implemented virtuals!
60  virtual Probability ProbabilityGet(const MatrixWrapper::ColumnVector& input) const;
61  virtual bool SampleFrom (Sample<MatrixWrapper::ColumnVector>& sample, int method=DEFAULT, void * args=NULL) const;
62  virtual bool SampleFrom (std::vector<Sample<MatrixWrapper::ColumnVector> >& samples, const int num_samples,
63  int method=DEFAULT, void * args=NULL) const;
64 
65  protected:
66  // variables to avoid allocation on the heap during sampling
67  mutable ColumnVector _diff;
68  mutable ColumnVector _Mu;
69  mutable Matrix _Low_triangle;
70  mutable ColumnVector _samples;
71  mutable ColumnVector _SampleValue;
72 
73  };
74 
75 } // End namespace BFL
76 
77 #endif // __CONDITIONAL_GAUSSIAN__
78 
virtual ConditionalGaussian * Clone() const
Clone function.
#define DEFAULT
virtual bool SampleFrom(Sample< MatrixWrapper::ColumnVector > &sample, int method=DEFAULT, void *args=NULL) const
Abstract Class representing conditional Pdfs P(x | ...)
virtual Probability ProbabilityGet(const MatrixWrapper::ColumnVector &input) const
Get the probability of a certain argument.
virtual ~ConditionalGaussian()
Destructor.
ConditionalGaussian(int dim=0, int num_conditional_arguments=0)
Constructor.
Class representing a probability (a double between 0 and 1)
Definition: bfl_constants.h:39
Abstract Class representing all Conditional gaussians.


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Feb 28 2022 21:56:33