|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.clustering.ClustererBase<V,E>
bcds.phison.clustering.NoackLinLog<V,E>
public class NoackLinLog<V,E>
NoackLinLog is a wrapper on Andreas Noack's LinLogLayout. It uses the "edge cost" as the measure of interchange between nodes. The node's weight is the sum of the weights of its outgoing edges.
To use this class, the LinLogLayout Java library must be available. It is downloadable from http://code.google.com/p/linloglayout/. Its licence is LGPL.
Note that in Noack's implementation there is no easy way to extract the "convergence" of energy or the "modularity" obtained. To compensate that, this wrapper can enable displaying the debugging messages that Noack's implementation sends to System.out.
This wrapper pays little to no attention to the laying out of the resulting graph. Thus, the node position generated by LinLogLayout is inaccessible to the caller.
When visually displaying the results, remember that the node position is random (two different runs will produce the same clustering but different node positions).
Constructor Summary | |
---|---|
NoackLinLog()
Default constructor. |
|
NoackLinLog(SimGraph<V,E> g,
java.util.Map<E,? extends java.lang.Number> edge_cost)
Creates a new instance, assuming a null environment. |
Method Summary | |
---|---|
java.lang.Object[] |
getEnvParams()
Returns the environment parameter used by LingLogCluster. |
java.util.Map<V,java.lang.Integer> |
run()
Calls run(int) with the number of iterations set to
the value of the environment parameter NoackLinLog.iterations. |
java.util.Map<V,java.lang.Integer> |
run(int niter)
Groups nodes in clusters through org.noak.graphlayout.MinimizerBarnesHut and returns the corresponding node-to-cluster mapping. |
void |
setup(SimGraph<V,E> g,
java.util.Map<E,? extends java.lang.Number> edge_cost,
Environ env)
Initializes this object. |
Methods inherited from class bcds.phison.clustering.ClustererBase |
---|
dump, getEnviron, getName, getNodeMapping, groupByClusterId, setNodeMapping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bcds.phison.clustering.Clusterer |
---|
getNodeMapping, groupByClusterId, setNodeMapping |
Methods inherited from interface bcds.phison.WithEnvParams |
---|
getEnviron, getName |
Constructor Detail |
---|
public NoackLinLog()
public NoackLinLog(SimGraph<V,E> g, java.util.Map<E,? extends java.lang.Number> edge_cost)
Method Detail |
---|
public void setup(SimGraph<V,E> g, java.util.Map<E,? extends java.lang.Number> edge_cost, Environ env)
setup
in interface Clusterer<V,E>
setup
in class ClustererBase<V,E>
public java.util.Map<V,java.lang.Integer> run()
run(int)
with the number of iterations set to
the value of the environment parameter NoackLinLog.iterations.
run
in interface Clusterer<V,E>
public java.util.Map<V,java.lang.Integer> run(int niter)
The number of iterations is specified by niter
.
public java.lang.Object[] getEnvParams()
getEnvParams
in interface WithEnvParams
getEnvParams
in class ClustererBase<V,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |