Biorithm  1.1
Public Member Functions | Protected Member Functions | Protected Attributes
SinkSource Class Reference

This class implements the SinkSource algorithm. More...

#include <reconciliation-algorithms.h>

Inheritance diagram for SinkSource:
AbstractSingleReconciliation

List of all members.

Public Member Functions

 SinkSource (MyGraph &graph, MyPointSet &weights, double q, double maxIters, double epsilon, double lambda, string output)
 SinkSource (vector< MyGraph > &graphs, double q, double maxIters, double epsilon, double lambda, string outputPrefix)
virtual ~SinkSource ()
 Destructor.
virtual string getName ()
 Returns the name of the SinkSource algorithm.

Protected Member Functions

virtual void _runAlgorithmOnceA ()
virtual void _updateNodeWeightA (MyNode node)
 Update the weight of a node in the current graph according to the SinkSource update function.

Protected Attributes

double _LAMBDA

Detailed Description

This class implements the SinkSource algorithm.


Constructor & Destructor Documentation

SinkSource::SinkSource ( MyGraph graph,
MyPointSet weights,
double  q,
double  maxIters,
double  epsilon,
double  lambda,
string  output 
) [inline]

Constructor for running the algorithm on a single network with multiple initial weights samples.

Parameters:
[in]graphThe network on which to operate.
[in]weightsThe samples containing initial node weights.
[in]qThe parameter q used by the algorithm.
[in]maxItersThe maximum number of iterations to run the iterative reconciliation algorithms.
[in]epsilonA small value that defines part of the convergence criteria.
[in]lambdaA parameter that controls the weight of the edges to the universal sink.
[in]outputA string to prepend to all output files.
SinkSource::SinkSource ( vector< MyGraph > &  graphs,
double  q,
double  maxIters,
double  epsilon,
double  lambda,
string  outputPrefix 
) [inline]

Constructor for running the algorithm on multiple networks with no initial weights.

Parameters:
[in]graphsThe networks on which to operate.
[in]qThe parameter q used by the algorithm.
[in]maxItersThe maximum number of iterations to run the iterative reconciliation algorithms.
[in]epsilonA small value that defines part of the convergence criteria.
[in]lambdaA parameter that controls the weight of the edges to the universal sink.
[in]outputA string to prepend to all output files.

Member Function Documentation

void SinkSource::_runAlgorithmOnceA ( ) [protected, virtual]

Run the SinkSource algorithm on the current network. This function is overloaded, because SinkSource is a bit different from other reconciliation algorithms. We only want to update the node weight for nodes that do not have any initial value. Nodes with initial value keep that value for every iteration.

Reimplemented from AbstractSingleReconciliation.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends