The modified nibble clustering algorithm. More...
#include <ogdf/graphalg/ModifiedNibbleClusterer.h>
Public Types | |
enum class | StartNodeStrategy { MinDeg , MaxDeg , Random } |
Public Member Functions | |
ModifiedNibbleClusterer () | |
~ModifiedNibbleClusterer () | |
long | call (Graph &G, NodeArray< long > &clusterNum) |
Call method: Creates a clustering of G Returns number of created clusters and sets cluster index for each node in clusterNum. | |
long | call (Graph &G, NodeArray< long > &clusterNum, NodeArray< long > &topLevelNum) |
A convenience method. Due to the characteristics of the algorithm (not very accurate, fast for large graphs), we could have a medium number (several hundreds) of clusters, and could need a further level of clustering. On the other hand, fully recursive clustering does not make much sense as after a second level there will be not to many clusters left. topLevelNum keeps a cluster number in the top level of the two level cluster hierarchy. | |
void | setClusterSizeThreshold (int threshold) |
void | setMaxClusterNum (int i) |
Call method: Creates a clustering of G in C Returns number of created clusters. | |
void | setMaxClusterSize (long i) |
Protected Member Functions | |
long | activeNodeBound () |
int | aPGP (int i) |
double | findBestCluster (NodeArray< bool > &isActive, std::vector< node > &activeNodes, std::vector< node > &cluster) |
void | initialize () |
long | maxClusterSize () |
void | modifiedNibble (node snode, std::vector< node > &bestCluster) |
main step with walks starting from snode | |
void | postProcess () |
double | pot (double r, long i) |
node | selectStartNode () |
select start node according to some strategy | |
void | spreadValues (NodeArray< bool > &isActive, std::vector< node > &activeNodes, NodeArray< double > &probUpdate) |
Private Member Functions | |
bool | testSpreadSum () |
The modified nibble clustering algorithm.
Modified Nibble Clustering Algorithm (as given in Graph Clustering for Keyword Search. R. Catherine, S. Sudarshan). The algorithm is very fast (and thus suited for huge graphs) and simple to implement, however not very accurate.
State: Experimental - Only use when you know what you are doing
To be used in remainders of graph decomposition for clustering (Remove trees first, then use BC, SPQR,)
Definition at line 55 of file ModifiedNibbleClusterer.h.
Enumerator | |
---|---|
MinDeg | |
MaxDeg | |
Random |
Definition at line 100 of file ModifiedNibbleClusterer.h.
|
inline |
Definition at line 57 of file ModifiedNibbleClusterer.h.
|
inline |
Definition at line 66 of file ModifiedNibbleClusterer.h.
|
inlineprotected |
< f in publication Rose Catherine K., S. Sudarshan
Definition at line 125 of file ModifiedNibbleClusterer.h.
Definition at line 115 of file ModifiedNibbleClusterer.h.
Call method: Creates a clustering of G Returns number of created clusters and sets cluster index for each node in clusterNum.
long ogdf::ModifiedNibbleClusterer::call | ( | Graph & | G, |
NodeArray< long > & | clusterNum, | ||
NodeArray< long > & | topLevelNum | ||
) |
A convenience method. Due to the characteristics of the algorithm (not very accurate, fast for large graphs), we could have a medium number (several hundreds) of clusters, and could need a further level of clustering. On the other hand, fully recursive clustering does not make much sense as after a second level there will be not to many clusters left. topLevelNum keeps a cluster number in the top level of the two level cluster hierarchy.
|
protected |
|
protected |
|
inlineprotected |
Definition at line 112 of file ModifiedNibbleClusterer.h.
|
protected |
main step with walks starting from snode
|
protected |
Definition at line 123 of file ModifiedNibbleClusterer.h.
|
protected |
select start node according to some strategy
Definition at line 94 of file ModifiedNibbleClusterer.h.
Call method: Creates a clustering of G in C Returns number of created clusters.
Definition at line 89 of file ModifiedNibbleClusterer.h.
Definition at line 91 of file ModifiedNibbleClusterer.h.
|
protected |
|
inlineprivate |
Definition at line 147 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 135 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 137 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 136 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 142 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 143 of file ModifiedNibbleClusterer.h.
Definition at line 141 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 144 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 139 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 140 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 134 of file ModifiedNibbleClusterer.h.
|
private |
Definition at line 138 of file ModifiedNibbleClusterer.h.