Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
drwnTableFactorMapping Class Reference

Creates a mapping between entries in two tables. More...

Classes

class  iterator
 iterator for indexing entries in the tables More...
 

Public Member Functions

 drwnTableFactorMapping ()
 default constructor
 
 drwnTableFactorMapping (const vector< int > &dstVars, const vector< int > &srcVars, const drwnVarUniversePtr &pUniverse)
 dstVar is a superset of srcVar (and variables don't repeat) More...
 
bool empty () const
 returns true if the mapping has size zero
 
bool identity () const
 returns true if the mapping is identity (destiation variables and source variables are in the same order)
 
iterator begin () const
 iterators
 
iterator end () const
 
vector< int > mapping () const
 returns the mapping of indexes from the source to the destiation
 

Protected Attributes

int _targetSize
 number of entries in the target table
 
vector< int > _targetCards
 cardinality of each variable in the target
 
vector< int > _strideMapping
 stride mapping from source to target
 

Friends

class iterator
 

Detailed Description

Creates a mapping between entries in two tables.

The target table must contain a superset of the variables of the source table.

Todo:

create a multi-table mapping (will reduce amount of repeated computation in iterators)

specialize for unary and pairwise cases

Constructor & Destructor Documentation

drwnTableFactorMapping::drwnTableFactorMapping ( const vector< int > &  dstVars,
const vector< int > &  srcVars,
const drwnVarUniversePtr pUniverse 
)
inline

dstVar is a superset of srcVar (and variables don't repeat)

Todo:
group variables as above if appear contiguously in src and dst

The documentation for this class was generated from the following file: