bcds.phison.gm
Class GraphMetricBase<V,E>

java.lang.Object
  extended by bcds.phison.gm.GraphMetricBase<V,E>
Direct Known Subclasses:
AlgebraicConnectivity, Assortativity, AverageNeighborConnectivity, AvgTwoTermReliability, BrandesBC, CheegerConstantBruteForce, ClusteringCoeff, ConnectivityMatrixSpectralRadius, Density, Diameter, EdgeSetSize, LinkConnectivity, NodeConnectivity, OutNodeDegree, SpectralRadius, Spreaders, VertexSetSize

public abstract class GraphMetricBase<V,E>
extends java.lang.Object

Provides default implementations for some of the methods of the GraphMetric interface.


Constructor Summary
GraphMetricBase()
           
 
Method Summary
 void dump(java.io.Writer wr)
          Does nothing.
 java.util.Map<E,java.lang.Double> getEdgeMetric()
           
 Environ getEnviron()
          Returns the object holding environment parameters for this instance.
 java.lang.Object[] getEnvParams()
          Returns zero-length array.
 SimGraph<V,E> getGraph()
          Returns the reference to the graph, so that classes outside this package can use it.
 double getGraphMetric()
           
 double getGraphMetricStdev()
           
 java.lang.String getName()
          Returns a short name of this class.
 java.util.Map<V,java.lang.Double> getNodeMetric()
           
 boolean isApplicableTo(MetricTarget m)
          Returns false.
 void run()
          Default implementation.
 void setup(SimGraph<V,E> g, Environ env)
          Saves the parameters for future use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphMetricBase

public GraphMetricBase()
Method Detail

setup

public void setup(SimGraph<V,E> g,
                  Environ env)
Saves the parameters for future use. The parameter g must not be null. If env is null, a new empty environment is created. Default values are incorporated by calling getEnvParams and the types of already-present values are adapted, if possible.


isApplicableTo

public boolean isApplicableTo(MetricTarget m)
Returns false.


run

public void run()
Default implementation. Does nothing.


getGraphMetric

public double getGraphMetric()
Throws:
UnsupportedOperationException.

getGraphMetricStdev

public double getGraphMetricStdev()
Throws:
UnsupportedOperationException.

getNodeMetric

public java.util.Map<V,java.lang.Double> getNodeMetric()
Throws:
UnsupportedOperationException.

getEdgeMetric

public java.util.Map<E,java.lang.Double> getEdgeMetric()
Throws:
UnsupportedOperationException.

getEnviron

public Environ getEnviron()
Returns the object holding environment parameters for this instance.


getEnvParams

public java.lang.Object[] getEnvParams()
Returns zero-length array.


dump

public void dump(java.io.Writer wr)
Does nothing.


getGraph

public SimGraph<V,E> getGraph()
Returns the reference to the graph, so that classes outside this package can use it.


getName

public java.lang.String getName()
Returns a short name of this class. This implementation returns getClass().getSimpleName().