org.javanetworkanalyzer.data
Class VWCent<E>

java.lang.Object
  extended by org.javanetworkanalyzer.data.VId
      extended by org.javanetworkanalyzer.data.VPredImpl<V,E>
          extended by org.javanetworkanalyzer.data.VDijkstra<VWCent,E>
              extended by org.javanetworkanalyzer.data.VWCent<E>
All Implemented Interfaces:
VCent<VWCent,E>, VDist<Double>, VPred<VWCent,E>

public class VWCent<E>
extends VDijkstra<VWCent,E>
implements VCent<VWCent,E>

Weighted centrality vertex.

Author:
Adam Gouge

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.data.VDijkstra
DEFAULT_DISTANCE
 
Constructor Summary
VWCent(Integer id)
          Constructor: sets the id and initializes a local VCentImpl.
 
Method Summary
 void accumulateBetweenness(double additionalBetweenness)
          Accumulates the betweenness value in each run by adding the new betweenness value to the old
 void accumulateDependency(double additionalDependency)
          Accumulates the dependency of this node
 void accumulateSPCount(long additionalSPCount)
          Accumulates the number of shortest paths leading to this node
 double getBetweenness()
          Gets the betweenness value for this node.
 double getCloseness()
          Returns the closeness.
 double getDependency()
          Gets the dependency of this node to any other vertex
 long getSPCount()
          Gets the number of shortest paths to this node
 void reset()
          Clears the predecessor list, resets the distance to the default value and resets the shortest path count and dependency to zero.
 void setBetweenness(double betweenness)
          Sets the betweenness.
 void setCloseness(double closeness)
          Sets the closeness.
 void setSource()
          Clears the predecessor list, sets the distance and dependency to zero and the shortest path count to one.
 void setSPCount(long newSPCount)
          Resets the number of shortest paths leading to this node
 
Methods inherited from class org.javanetworkanalyzer.data.VDijkstra
getDistance, setDistance
 
Methods inherited from class org.javanetworkanalyzer.data.VPredImpl
addPredecessor, addPredecessorEdge, clear, getPredecessorEdges, getPredecessors
 
Methods inherited from class org.javanetworkanalyzer.data.VId
getID, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.javanetworkanalyzer.data.VCent
getID, getPredecessors
 
Methods inherited from interface org.javanetworkanalyzer.data.VPred
addPredecessor, addPredecessorEdge, clear, getPredecessorEdges
 

Constructor Detail

VWCent

public VWCent(Integer id)
Constructor: sets the id and initializes a local VCentImpl.

Parameters:
id - Id
Method Detail

reset

public void reset()
Clears the predecessor list, resets the distance to the default value and resets the shortest path count and dependency to zero.

Specified by:
reset in interface VCent<VWCent,E>
Specified by:
reset in interface VDist<Double>
Overrides:
reset in class VDijkstra<VWCent,E>

setSource

public void setSource()
Clears the predecessor list, sets the distance and dependency to zero and the shortest path count to one.

Specified by:
setSource in interface VCent<VWCent,E>
Specified by:
setSource in interface VDist<Double>
Overrides:
setSource in class VDijkstra<VWCent,E>

getSPCount

public long getSPCount()
Description copied from interface: VCent
Gets the number of shortest paths to this node

Specified by:
getSPCount in interface VCent<VWCent,E>
Returns:
spCount Number of shortest paths to this node

accumulateSPCount

public void accumulateSPCount(long additionalSPCount)
Description copied from interface: VCent
Accumulates the number of shortest paths leading to this node

Specified by:
accumulateSPCount in interface VCent<VWCent,E>
Parameters:
additionalSPCount - Number of further shortest paths leading to this node

setSPCount

public void setSPCount(long newSPCount)
Description copied from interface: VCent
Resets the number of shortest paths leading to this node

Specified by:
setSPCount in interface VCent<VWCent,E>
Parameters:
newSPCount - New number shortest paths leading to this node

getDependency

public double getDependency()
Description copied from interface: VCent
Gets the dependency of this node to any other vertex

Specified by:
getDependency in interface VCent<VWCent,E>
Returns:
dependency Dependency of this node to any other vertex

accumulateDependency

public void accumulateDependency(double additionalDependency)
Description copied from interface: VCent
Accumulates the dependency of this node

Specified by:
accumulateDependency in interface VCent<VWCent,E>
Parameters:
additionalDependency - New dependency to be added

getBetweenness

public double getBetweenness()
Description copied from interface: VCent
Gets the betweenness value for this node.

Specified by:
getBetweenness in interface VCent<VWCent,E>
Returns:
The betweenness value of this node.

accumulateBetweenness

public void accumulateBetweenness(double additionalBetweenness)
Description copied from interface: VCent
Accumulates the betweenness value in each run by adding the new betweenness value to the old

Specified by:
accumulateBetweenness in interface VCent<VWCent,E>
Parameters:
additionalBetweenness - betweenness value from a run starting at certain source node

setBetweenness

public void setBetweenness(double betweenness)
Description copied from interface: VCent
Sets the betweenness.

Specified by:
setBetweenness in interface VCent<VWCent,E>
Parameters:
betweenness - The betweenness to set.

getCloseness

public double getCloseness()
Description copied from interface: VCent
Returns the closeness.

Specified by:
getCloseness in interface VCent<VWCent,E>
Returns:
The closeness.

setCloseness

public void setCloseness(double closeness)
Description copied from interface: VCent
Sets the closeness.

Specified by:
setCloseness in interface VCent<VWCent,E>
Parameters:
closeness - The closeness to set.


Copyright © 2014. All Rights Reserved.