Public Member Functions

BMatchingProblem Class Reference

Object representing a b-matching problem. More...

#include <BMatchingProblem.h>

List of all members.

Public Member Functions

 BMatchingProblem (WeightOracle *wo, int size, int *b, bool verbose)
void  setWeightOracle (WeightOracle *wo)
void  setSize (int n)
void  setB (int b)
void  setB (int *degrees)
void  setB (int *br, int *bc, int rows, int cols)
void  setMaxIter (int i)
WeightOracle *  getWeightOracle ()
int  getSize ()
SparseMatrix< bool > *  solve ()
int *  getSolutionRows ()
int *  getSolutionCols ()
int  getIters ()

Detailed Description

Object representing a b-matching problem.


Constructor & Destructor Documentation

BMatchingProblem::BMatchingProblem ( WeightOracle *   wo,
int   size,
int *   b,
bool   verbose  
)
Parameters:
[in]woweight oracle that provides edge weights
[in]sizetotal number of nodes for this problem
[in]barray of target degrees for each node
[in]verbosewhether to print status

Member Function Documentation

int BMatchingProblem::getIters (  )

returns the number of iterations run so far

Returns:
number of iterations so far
int BMatchingProblem::getSize (  )

returns the number of nodes

Returns:
number of nodes in graph
int * BMatchingProblem::getSolutionCols (  )

Returns the column indicies of the matched pairs

Returns:
vector of column indices of matched edges
int * BMatchingProblem::getSolutionRows (  )

Returns the row indices of the matched pairs

Returns:
vector of row indices of matched edges
WeightOracle * BMatchingProblem::getWeightOracle (  )

returns the weightOracle

Returns:
weight oracle
void BMatchingProblem::setB ( int *   degrees  )

sets the degree constraints as a single vector

Parameters:
[in]degreesnew vector of target degrees for each node
void BMatchingProblem::setB ( int *   br,
int *   bc,
int   rows,
int   cols  
)

sets the degree constraints for a bipartite graph

Parameters:
[in]brtarget degrees for first bipartition (along rows)
[in]bctarget degrees for second bipartition (along columns)
[in]rowstotal number of rows (number of nodes in first bipartition)
[in]colstotal number of columns (number of nodes in second bipartition)
void BMatchingProblem::setB ( int   b  )

sets the degree constraints, all nodes must have degree b

Parameters:
[in]btarget degree for ALL nodes
void BMatchingProblem::setMaxIter ( int   i  )

sets the maximum number of iterations to try

Parameters:
[in]imaximum number of iterations
void BMatchingProblem::setSize ( int   n  )

Sets the number of nodes in the problem

Parameters:
[in]nnew number of nodes in graph
void BMatchingProblem::setWeightOracle ( WeightOracle *   wo  )

Sets the WeightOracle for this problem

Parameters:
[in]woweight oracle that provides edge weights
SparseMatrix< bool > * BMatchingProblem::solve (  )

Run the solver until completion


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