|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.gm.GraphMetricBase<V,E>
bcds.phison.gm.Spreaders<V,E>
public class Spreaders<V,E>
Performs a k-shell decomposition of the nodes of a topology as a
GraphMetric
.
"The most efficient spreaders are those located within the core of the network as identified by the k-shell decomposition analysis". Reference Maksim Kitsak, Lazaros K. Gallos, Shlomo Havlin, Fredrik Liljeros, Lev Muchnik, H. Eugene Stanley, and Hernan A. Makse. Identification of influential spreaders in complex networks. Nat Phys, 6(11):888–893, November 2010.
The definition of the k-shell decomposition implemented can be found in: Miorandi, Daniele; De Pellegrini, Francesco; , "K-shell decomposition for dynamic complex networks," Modeling and Optimization in Mobile, Ad Hoc and Wireless Networks (WiOpt), 2010 Proceedings of the 8th International Symposium on , vol., no., pp.488-496, May 31 2010-June 4 2010.
An example can be found in: J. Ignacio Alvarez-Hamelin; "How the k-core decomposition helps in understanding the Internet Topology", a slides presentation available here
Additionally, it provides a method to carry out the k-shell decomposition without being accessible to the GraphMetric interface.
Constructor Summary | |
---|---|
Spreaders()
Default constructor. |
|
Spreaders(SimGraph<V,E> g,
Environ env)
Creates a new instance and calls setup to complete the initialization. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Returns a string describing the metric, for example, article where it has been published, URL where to find reference implementation, etc. |
java.lang.String |
getLabel()
Returns the string "Spreaders". |
java.util.Map<V,java.lang.Double> |
getNodeMetric()
Returns the k-shell index of each node of a topology. |
java.util.Map<java.lang.Integer,java.util.Set<V>> |
getSpreaders()
Returns the set of nodes associated with each k-shell index. |
boolean |
isApplicableTo(MetricTarget m)
Returns true if m is
MetricTarget .NODE. |
void |
kShellDecomposition(int k)
Recursive k-shell decomposition algorithm. |
boolean |
nodesWithDegree(SimGraph<V,E> sg,
int k)
Returns true if there is a node with degree k . |
SimGraph<V,E> |
removeNodesOfDegree(SimGraph<V,E> sg,
int k)
Removes all the nodes with degree k from the graph 'sg' and returns the consequently subgraph. |
void |
run()
Performs the k-shell decomposition. |
Methods inherited from class bcds.phison.gm.GraphMetricBase |
---|
dump, getEdgeMetric, getEnviron, getEnvParams, getGraph, getGraphMetric, getGraphMetricStdev, getName, setup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bcds.phison.gm.GraphMetric |
---|
dump, getEdgeMetric, getGraphMetric, getGraphMetricStdev, setup |
Methods inherited from interface bcds.phison.WithEnvParams |
---|
getEnviron, getEnvParams, getName |
Constructor Detail |
---|
public Spreaders()
public Spreaders(SimGraph<V,E> g, Environ env)
Method Detail |
---|
public boolean isApplicableTo(MetricTarget m)
m
is
MetricTarget
.NODE.
isApplicableTo
in interface GraphMetric<V,E>
isApplicableTo
in class GraphMetricBase<V,E>
public SimGraph<V,E> removeNodesOfDegree(SimGraph<V,E> sg, int k)
public boolean nodesWithDegree(SimGraph<V,E> sg, int k)
k
.
public void kShellDecomposition(int k)
public void run()
run
in interface GraphMetric<V,E>
run
in class GraphMetricBase<V,E>
public java.util.Map<V,java.lang.Double> getNodeMetric()
getNodeMetric
in interface GraphMetric<V,E>
getNodeMetric
in class GraphMetricBase<V,E>
public java.lang.String getLabel()
getLabel
in interface GraphMetric<V,E>
public java.lang.String getDescription()
GraphMetric
getDescription
in interface GraphMetric<V,E>
public java.util.Map<java.lang.Integer,java.util.Set<V>> getSpreaders()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |