PLearn 0.1
Public Member Functions | Public Attributes
PLearn::RVInstance Class Reference

RVInstance represents a RandomVariable V along with a "value" v. More...

#include <RandomVar.h>

Collaboration diagram for PLearn::RVInstance:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RVInstance (const RandomVar &VV, const Var &vv)
 RVInstance.
 RVInstance ()
RVInstanceArray operator&& (RVInstance rvi)
ConditionalExpression operator| (RVInstanceArray a)
void swap_v_and_Vvalue ()
 swap the v with the V->value

Public Attributes

RandomVar V
Var v

Detailed Description

RVInstance represents a RandomVariable V along with a "value" v.

Definition at line 462 of file RandomVar.h.


Constructor & Destructor Documentation

PLearn::RVInstance::RVInstance ( const RandomVar VV,
const Var vv 
)

RVInstance.

Definition at line 767 of file RandomVar.cc.

References PLearn::Var::length(), and PLERROR.

                                                         :V(VV), v(vv) 
{
    if (VV->length()!=vv->length())
        PLERROR("Associating a RandomVar of length %d to a Var of length %d",
                VV->length(),vv->length());
}

Here is the call graph for this function:

PLearn::RVInstance::RVInstance ( )

Definition at line 774 of file RandomVar.cc.

{}

Member Function Documentation

RVInstanceArray PLearn::RVInstance::operator&& ( RVInstance  rvi)

Definition at line 776 of file RandomVar.cc.

{
    return RVInstanceArray(*this,rvi);
}
ConditionalExpression PLearn::RVInstance::operator| ( RVInstanceArray  a)

Definition at line 781 of file RandomVar.cc.

{
    return ConditionalExpression(*this,a);
}
void PLearn::RVInstance::swap_v_and_Vvalue ( )

swap the v with the V->value

Definition at line 787 of file RandomVar.cc.

References v, and V.

{ Var tmp = v; v = V->value; V->value = tmp; }

Member Data Documentation

Definition at line 466 of file RandomVar.h.

Referenced by PLearn::EM(), PLearn::logP(), PLearn::P(), and swap_v_and_Vvalue().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines