|
| FRegion () |
| Default constructor. More...
|
|
| FRegion (const Factor &x, Real c) |
| Constructs from a factor and a counting number. More...
|
|
const Real & | c () const |
| Returns constant reference to counting number. More...
|
|
Real & | c () |
| Returns reference to counting number. More...
|
|
| TFactor (Realp=1) |
| Constructs factor depending on no variables with value p. More...
|
|
| TFactor (const Var &v) |
| Constructs factor depending on the variable v with uniform distribution. More...
|
|
| TFactor (const VarSet &vars) |
| Constructs factor depending on variables in vars with uniform distribution. More...
|
|
| TFactor (const VarSet &vars, Realp) |
| Constructs factor depending on variables in vars with all values set to p. More...
|
|
| TFactor (const VarSet &vars, const std::vector< S > &x) |
| Constructs factor depending on variables in vars, copying the values from a std::vector<> More...
|
|
| TFactor (const VarSet &vars, const Real *p) |
| Constructs factor depending on variables in vars, copying the values from an array. More...
|
|
| TFactor (const VarSet &vars, const TProb< Real > &p) |
| Constructs factor depending on variables in vars, copying the values from p. More...
|
|
| TFactor (const std::vector< Var > &vars, const std::vector< Real > &p) |
| Constructs factor depending on variables in vars, permuting the values given in p accordingly. More...
|
|
void | set (size_t i, Realval) |
| Sets i 'th entry to val. More...
|
|
Real | get (size_t i) const |
| Gets i 'th entry. More...
|
|
const TProb< Real > & | p () const |
| Returns constant reference to value vector. More...
|
|
TProb< Real > & | p () |
| Returns reference to value vector. More...
|
|
Real | operator[] (size_t i) const |
| Returns a copy of the i 'th entry of the value vector. More...
|
|
const VarSet & | vars () const |
| Returns constant reference to variable set (i.e., the variables on which the factor depends) More...
|
|
VarSet & | vars () |
| Returns reference to variable set (i.e., the variables on which the factor depends) More...
|
|
size_t | nrStates () const |
| Returns the number of possible joint states of the variables on which the factor depends, . More...
|
|
Real | entropy () const |
| Returns the Shannon entropy of *this , . More...
|
|
Real | max () const |
| Returns maximum of all values. More...
|
|
Real | min () const |
| Returns minimum of all values. More...
|
|
Real | sum () const |
| Returns sum of all values. More...
|
|
Real | sumAbs () const |
| Returns sum of absolute values. More...
|
|
Real | maxAbs () const |
| Returns maximum absolute value of all values. More...
|
|
bool | hasNaNs () const |
| Returns true if one or more values are NaN. More...
|
|
bool | hasNegatives () const |
| Returns true if one or more values are negative. More...
|
|
Real | strength (const Var &i, const Var &j) const |
| Returns strength of this factor (between variables i and j), as defined in eq. (52) of [MoK07b]. More...
|
|
bool | operator== (const TFactor< Real > &y) const |
| Comparison. More...
|
|
std::string | toString () const |
| Formats a factor as a string. More...
|
|
TFactor< Real > | operator- () const |
| Returns negative of *this . More...
|
|
TFactor< Real > | abs () const |
| Returns pointwise absolute value. More...
|
|
TFactor< Real > | exp () const |
| Returns pointwise exponent. More...
|
|
TFactor< Real > | log (bool zero=false) const |
| Returns pointwise logarithm. More...
|
|
TFactor< Real > | inverse (bool zero=true) const |
| Returns pointwise inverse. More...
|
|
TFactor< Real > | normalized (ProbNormType norm=NORMPROB) const |
| Returns normalized copy of *this , using the specified norm. More...
|
|
TFactor< Real > | operator- (Realx) const |
| Returns difference of *this and scalar x. More...
|
|
TFactor< Real > | operator+ (Realx) const |
| Returns sum of *this and scalar x. More...
|
|
TFactor< Real > | operator* (Realx) const |
| Returns product of *this with scalar x. More...
|
|
TFactor< Real > | operator/ (Realx) const |
| Returns quotient of *this with scalar x. More...
|
|
TFactor< Real > | operator^ (Realx) const |
| Returns *this raised to the power x. More...
|
|
TFactor< Real > | operator- (const TFactor< Real > &g) const |
| Returns *this minus g. More...
|
|
TFactor< Real > | operator+ (const TFactor< Real > &g) const |
| Returns sum of *this and g. More...
|
|
TFactor< Real > | operator* (const TFactor< Real > &g) const |
| Returns product of *this with g. More...
|
|
TFactor< Real > | operator/ (const TFactor< Real > &g) const |
| Returns quotient of *this by f (where division by zero yields zero) More...
|
|
TFactor< Real > | binaryTr (const TFactor< Real > &g, binOp op) const |
| Returns result of applying binary operation op on two factors, *this and g. More...
|
|
TFactor< Real > & | randomize () |
| Draws all values i.i.d. from a uniform distribution on [0,1) More...
|
|
TFactor< Real > & | setUniform () |
| Sets all values to where n is the number of states. More...
|
|
TFactor< Real > & | takeAbs () |
| Applies absolute value pointwise. More...
|
|
TFactor< Real > & | takeExp () |
| Applies exponent pointwise. More...
|
|
TFactor< Real > & | takeLog (bool zero=false) |
| Applies logarithm pointwise. More...
|
|
Real | normalize (ProbNormType norm=NORMPROB) |
| Normalizes factor using the specified norm. More...
|
|
TFactor< Real > & | fill (Realx) |
| Sets all values to x. More...
|
|
TFactor< Real > & | operator+= (Realx) |
| Adds scalar x to each value. More...
|
|
TFactor< Real > & | operator-= (Realx) |
| Subtracts scalar x from each value. More...
|
|
TFactor< Real > & | operator*= (Realx) |
| Multiplies each value with scalar x. More...
|
|
TFactor< Real > & | operator/= (Realx) |
| Divides each entry by scalar x. More...
|
|
TFactor< Real > & | operator^= (Realx) |
| Raises values to the power x. More...
|
|
TFactor< Real > & | operator+= (const TFactor< Real > &g) |
| Adds g to *this . More...
|
|
TFactor< Real > & | operator-= (const TFactor< Real > &g) |
| Subtracts g from *this . More...
|
|
TFactor< Real > & | operator*= (const TFactor< Real > &g) |
| Multiplies *this with g. More...
|
|
TFactor< Real > & | operator/= (const TFactor< Real > &g) |
| Divides *this by g (where division by zero yields zero) More...
|
|
TFactor< Real > & | binaryOp (const TFactor< Real > &g, binOp op) |
| Applies binary operation op on two factors, *this and g. More...
|
|
TFactor< Real > | slice (const VarSet &vars, size_t varsState) const |
| Returns a slice of *this , where the subset vars is in state varsState. More...
|
|
TFactor< Real > | embed (const VarSet &vars) const |
| Embeds this factor in a larger VarSet. More...
|
|
TFactor< Real > | marginal (const VarSet &vars, bool normed=true) const |
| Returns marginal on vars, obtained by summing out all variables except those in vars, and normalizing the result if normed == true . More...
|
|
TFactor< Real > | maxMarginal (const VarSet &vars, bool normed=true) const |
| Returns max-marginal on vars, obtained by maximizing all variables except those in vars, and normalizing the result if normed == true . More...
|
|
An FRegion is a factor with a counting number.