org.javanetworkanalyzer.data
Class VCentImpl

java.lang.Object
  extended by org.javanetworkanalyzer.data.VId
      extended by org.javanetworkanalyzer.data.VPredImpl
          extended by org.javanetworkanalyzer.data.VCentImpl
All Implemented Interfaces:
VCent, VPred

public class VCentImpl
extends VPredImpl
implements VCent

Centrality vertex implementation.

Author:
Adam Gouge

Field Summary
protected  double dependency
          Dependency of this node on any other vertex.
protected  long spCount
          Number of shortest paths leading to this node starting from a certain source.
 
Constructor Summary
VCentImpl(Integer id)
          Constructor: sets the id; sets the shortest paths count, dependency, betweenness and closeness to zero.
 
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()
          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()
          Sets the shortest path count to one and the dependency to zero.
 void setSPCount(long newSPCount)
          Resets the number of shortest paths leading to this node
 
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
 

Field Detail

spCount

protected long spCount
Number of shortest paths leading to this node starting from a certain source.


dependency

protected double dependency
Dependency of this node on any other vertex.

Constructor Detail

VCentImpl

public VCentImpl(Integer id)
Constructor: sets the id; sets the shortest paths count, dependency, betweenness and closeness to zero.

Parameters:
id - Node id
Method Detail

reset

public void reset()
Description copied from interface: VCent
Resets the shortest path count and dependency to zero.

Specified by:
reset in interface VCent

setSource

public void setSource()
Description copied from interface: VCent
Sets the shortest path count to one and the dependency to zero.

Specified by:
setSource in interface VCent

getSPCount

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

Specified by:
getSPCount in interface VCent
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
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
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
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
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
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
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
Parameters:
betweenness - The betweenness to set.

getCloseness

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

Specified by:
getCloseness in interface VCent
Returns:
The closeness.

setCloseness

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

Specified by:
setCloseness in interface VCent
Parameters:
closeness - The closeness to set.


Copyright © 2014. All Rights Reserved.