Object that maintains and updates the state of belief propagation.
More...
#include <BeliefPropagator.h>
List of all members.
Detailed Description
Object that maintains and updates the state of belief propagation.
Member Function Documentation
bool BeliefPropagator::checkConvergence
|
( |
) |
|
Returns whether belief propagation has reached a valid solution
- Returns:
- whether belief propagation has converged
double BeliefPropagator::getChangeX
|
( |
) |
[inline]
|
- Returns:
- change in beliefs in previous iteration
Returns the current estimated solution
- Returns:
- current estimated solution as a pointer to a SparseMatrix
int BeliefPropagator::getIteration
|
( |
) |
|
Returns the current iteration number
- Returns:
- current iteration number
double BeliefPropagator::getIterationTime
|
( |
) |
[inline]
|
- Returns:
- time to compute previous iteration
int BeliefPropagator::getViolatedColumns
|
( |
) |
[inline]
|
- Returns:
- number of columns with incorrect neighbor count
void BeliefPropagator::setB
|
( |
int *
|
brows,
|
|
|
int *
|
bcols
|
|
) |
|
|
Sets the degree constraints as a row vector and column vector (for bipartite case only)
- Parameters:
-
[in] | brows | int array of target degrees for first bipartition (row degrees) |
[in] | bcols | int array of target degrees for second bipartition (column degrees) prerequisite The weight oracle must be set before setB is called. |
void BeliefPropagator::setB
|
( |
int *
|
degrees
) |
|
Sets the degree constraints as a single vector
- Parameters:
-
[in] | degrees | int array containing the target degrees for each node |
void BeliefPropagator::setMaxIter
|
( |
int
|
i
) |
|
Set the maximum number of iterations before giving up
- Parameters:
-
[in] | i | new maximum iteration value |
void BeliefPropagator::setWeightOracle
|
( |
WeightOracle *
|
wo
) |
|
Attach a WeightOracle to this Belief Propagator
- Parameters:
-
[in] | wo | The weight oracle that returns the weights for this b-matching problem |
void BeliefPropagator::updateBeliefs
|
( |
) |
|
Runs one iteration of belief propagation
void BeliefPropagator::updateRow
|
( |
double *
|
newAlpha,
|
|
|
double *
|
newBeta,
|
|
|
int
|
i
|
|
) |
|
|
updates the beliefs for row. Don't use this method. This is temporarily public to allow a quick multithreading patch
The documentation for this class was generated from the following files: