Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::RVInstanceArray Class Reference

#include <RandomVar.h>

Inheritance diagram for PLearn::RVInstanceArray:

Inheritance graph
[legend]
Collaboration diagram for PLearn::RVInstanceArray:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RVInstanceArray ()
 RVInstanceArray *.

 RVInstanceArray (int n, int n_extra_allocated=0)
 RVInstanceArray (const Array< RVInstance > &a)
 RVInstanceArray (const RVInstance &v, int n_extra_allocated=0)
 RVInstanceArray (const RVInstance &v1, const RVInstance &v2, int n_extra_allocated=0)
 RVInstanceArray (const RVInstance &v1, const RVInstance &v2, const RVInstance &v3, int n_extra_allocated=0)
int length () const
 total length of all the RV's in the array, this is generally != size()

RVInstanceArray operator && (RVInstance rhs)
 Build a chain of (RV,value) pairs.

ConditionalExpression operator| (RVInstanceArray rhs)
RVArray random_variables () const
 put all the RVs in the list in a RVarray

VarArray values () const
 put all the values of the variables (array[i].V->value) in a VarArray

VarArray instances () const
 put all the instance values of the variables (array[i].v) in a VarArray

void swap_v_and_Vvalue ()
 swap the v's with the V->value's

void sort ()
 sorts in-place the elements by V->rv_number (topological order of the graphical model) (in the order: ancestors -> descendants)


Static Public Member Functions

int compareRVnumbers (const RVInstance *rvi1, const RVInstance *rvi2)

Constructor & Destructor Documentation

PLearn::RVInstanceArray::RVInstanceArray  ) 
 

RVInstanceArray *.

Definition at line 793 of file RandomVar.cc.

PLearn::RVInstanceArray::RVInstanceArray int  n,
int  n_extra_allocated = 0
 

Definition at line 797 of file RandomVar.cc.

PLearn::RVInstanceArray::RVInstanceArray const Array< RVInstance > &  a  ) 
 

Definition at line 801 of file RandomVar.cc.

PLearn::RVInstanceArray::RVInstanceArray const RVInstance v,
int  n_extra_allocated = 0
 

Definition at line 804 of file RandomVar.cc.

PLearn::RVInstanceArray::RVInstanceArray const RVInstance v1,
const RVInstance v2,
int  n_extra_allocated = 0
 

Definition at line 808 of file RandomVar.cc.

PLearn::RVInstanceArray::RVInstanceArray const RVInstance v1,
const RVInstance v2,
const RVInstance v3,
int  n_extra_allocated = 0
 

Definition at line 815 of file RandomVar.cc.


Member Function Documentation

int PLearn::RVInstanceArray::compareRVnumbers const RVInstance rvi1,
const RVInstance rvi2
[static]
 

Definition at line 864 of file RandomVar.cc.

References PLearn::RVInstance::V.

Referenced by sort().

VarArray PLearn::RVInstanceArray::instances  )  const
 

put all the instance values of the variables (array[i].v) in a VarArray

Definition at line 838 of file RandomVar.cc.

References PLearn::TVec< RVInstance >::size().

Referenced by PLearn::EM(), and operator|().

int PLearn::RVInstanceArray::length  )  const
 

total length of all the RV's in the array, this is generally != size()

Reimplemented from PLearn::TVec< RVInstance >.

Definition at line 824 of file RandomVar.cc.

References PLearn::TVec< RVInstance >::size().

RVInstanceArray PLearn::RVInstanceArray::operator && RVInstance  rhs  ) 
 

Build a chain of (RV,value) pairs.

It is used to build expressions of the form (X==x && Y==y && Z==z).

Definition at line 852 of file RandomVar.cc.

References PLearn::operator &().

ConditionalExpression PLearn::RVInstanceArray::operator| RVInstanceArray  rhs  ) 
 

This operator is used for expressions of the form (Y==y)|(X==x && Z==z) and it acts like &&. If the expression is (Y==y && Z==z)|(X==x && U==u) then the LHS RVInstance list will be coerced into a single (RV,value) pair, with RV = Y&&Z (their joint) and value = vconcat(y & z).

Definition at line 858 of file RandomVar.cc.

References instances(), random_variables(), and PLearn::vconcat().

RVArray PLearn::RVInstanceArray::random_variables  )  const
 

put all the RVs in the list in a RVarray

Definition at line 845 of file RandomVar.cc.

References PLearn::TVec< RVInstance >::size().

Referenced by PLearn::FunctionalRandomVariable::logP(), and operator|().

void PLearn::RVInstanceArray::sort  ) 
 

sorts in-place the elements by V->rv_number (topological order of the graphical model) (in the order: ancestors -> descendants)

Definition at line 872 of file RandomVar.cc.

References PLearn::compare_function, compareRVnumbers(), PLearn::TVec< RVInstance >::data(), and PLearn::TVec< RVInstance >::size().

Referenced by PLearn::FunctionalRandomVariable::logP().

void PLearn::RVInstanceArray::swap_v_and_Vvalue  )  [inline]
 

swap the v's with the V->value's

Definition at line 517 of file RandomVar.h.

References PLearn::TVec< RVInstance >::size().

Referenced by PLearn::MixtureRandomVariable::ElogP().

VarArray PLearn::RVInstanceArray::values  )  const
 

put all the values of the variables (array[i].V->value) in a VarArray

Definition at line 831 of file RandomVar.cc.

References PLearn::TVec< RVInstance >::size().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:24:18 2004 for PLearn by doxygen 1.3.7