Biorithm
1.1
|
A class that ensures that the dense subgraph computed is connected. It computes the connected components of every random neighbour and repeatedly invokes computeRandomNeighbour() until the neighbour is connected. ! More...
#include <graph.C>
Public Member Functions | |
MyDensestSubgraphConnectedBruteForceAnnealState () | |
Default constructor. | |
MyDensestSubgraphConnectedBruteForceAnnealState (const MyGraph &g) | |
virtual void | computeRandomNeighbour (MyAbstractAnnealState &neighbour) |
A class that ensures that the dense subgraph computed is connected. It computes the connected components of every random neighbour and repeatedly invokes computeRandomNeighbour() until the neighbour is connected. !
MyDensestSubgraphConnectedBruteForceAnnealState::MyDensestSubgraphConnectedBruteForceAnnealState | ( | const MyGraph & | g | ) | [inline] |
Constructor that takes as input the graph in which the densest connected subgraph is to be computed.
The constructor finds all the connected components of g and stores the largest connected component as the one to operate on.
virtual void MyDensestSubgraphConnectedBruteForceAnnealState::computeRandomNeighbour | ( | MyAbstractAnnealState & | neighbour | ) | [inline, virtual] |
Compute a random neighbour of *this that is connected.
See MyDensestSubgraphAnnealState::computeRandomNeighbour() for a definition of the neighbour of a graph. This method simply invokes MyDensestSubgraphAnnealState::computeRandomNeighbour() until neighbour is connected.
Reimplemented from MyDensestSubgraphAnnealState.