golib
0.5
|
Vector values Gauss distribution. More...
#include <gogausspdf.h>
Public Member Functions | |
MultiGaussPDF (const input_vector &mean, const goMath::Matrix< scalar_type > &cov, scalar_type normFactor=scalar_type(1)) | |
virtual scalar_type | operator() (const input_vector &input) const |
void | reset (goSize_t N=1) |
Resets sample count, covariance matrix, etc., before using update() to learn a distribution from samples. More... | |
void | update (const input_vector &v) |
Update current mean and covariance. More... | |
void | updateFlush () |
Ending learning from samples. More... | |
void | setCovariance (const goMath::Matrix< scalar_type > &cov) |
const goMath::Matrix< scalar_type > & | getCovarianceInv () const |
const goMath::Matrix< scalar_type > & | getCovariance () const |
void | setMean (const input_vector &m) |
const input_vector & | getMean () const |
![]() | |
goObjectBase () | |
Constructor. | |
virtual | ~goObjectBase () |
Destructor. More... | |
const char * | getClassName () const |
Returns the class name. More... | |
int | getClassID () const |
virtual goSize_t | memoryUsage () const |
Returns the size of this object or some measure of its memory consumption. More... | |
void | setObjectName (const char *name) |
Set name string for an object. More... | |
void | setObjectName (const goString &name) |
Set name string for an object. More... | |
const goString & | getObjectName () const |
Get the object name. More... | |
virtual bool | writeObjectFile (FILE *) const |
Write object to a file. More... | |
virtual bool | readObjectFile (FILE *) |
Read object from a file. More... | |
void | connectObject (goObjectBase *object) |
Connects an object to this object. More... | |
void | disconnectObject (const goObjectBase *object) |
Disconnects an object from this object. | |
virtual bool | callObjectMethod (int methodID, goObjectMethodParameters *param=NULL) |
Call an object method by identifier. More... | |
virtual bool | queueObjectMethod (int methodID, goObjectMethodParameters *param=NULL, bool blocking=false) |
Enqueue a method call to an internal list of methods. More... | |
bool | callQueuedMethods () |
Call all queued methods. More... | |
Additional Inherited Members | |
![]() | |
void | setClassID (int id) |
Sets the class name. | |
void | printClassMessage (const char *msg) |
Sets the class name. More... | |
void | printClassMessage (goString &msg) |
Prints an informational message to the calling console. More... | |
void | sendObjectMessage (int messageID, void *data=NULL) |
Sends a message to all connected objects. | |
void | sendObjectMessage (goObjectBase *object, int messageID, void *data=NULL) |
Sends a message to a specific object. | |
virtual void | receiveObjectMessage (const goObjectMessage &message) |
Receive a message. More... | |
Vector values Gauss distribution.
You can use reset(), update(), and updateFlush() to learn a distribution from samples.
See the latex documentation in doc/gogausspdf for details.
void goMath::MultiGaussPDF< input_vector, scalar_type >::reset | ( | goSize_t | N = 1 | ) |
void goMath::MultiGaussPDF< input_vector, scalar_type >::update | ( | const input_vector & | input | ) |
Update current mean and covariance.
You have to call reset() before starting to learn a distribution with this function. When you are done, you must call updateFlush() to calculate the inverse covariance and the like.
input | Sample vector. |
void goMath::MultiGaussPDF< input_vector, scalar_type >::updateFlush | ( | ) |
Ending learning from samples.
You must call this function when you are done learning a distribution from samples with update(). Note that you can always call update() after updateFlush(), but in order to use the new, updated distribution, you must call updateFlush() before use.