org.javanetworkanalyzer.data
Class WeightedPathLengthData

java.lang.Object
  extended by org.javanetworkanalyzer.data.PathLengthData<Double>
      extended by org.javanetworkanalyzer.data.WeightedPathLengthData

public class WeightedPathLengthData
extends PathLengthData<Double>

PathLengthData for weighted graphs.

Author:
Adam Gouge

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.data.PathLengthData
count, SPL_ERROR
 
Constructor Summary
WeightedPathLengthData()
          Constructor.
 
Method Summary
 void addSPLength(Double length)
          Accumulates a new shortest path length to this data instance.
 void clear()
          Clears all path length data information.
 double getAverageLength()
          Average shortest path length.
 Double getMaxLength()
          Longest among the shortest path lengths added to this data instance.
 Double getTotalLength()
          Gets the total length of shortest paths.
 
Methods inherited from class org.javanetworkanalyzer.data.PathLengthData
getCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedPathLengthData

public WeightedPathLengthData()
Constructor.

Method Detail

clear

public void clear()
Description copied from class: PathLengthData
Clears all path length data information.

Overrides:
clear in class PathLengthData<Double>

addSPLength

public void addSPLength(Double length)
Description copied from class: PathLengthData
Accumulates a new shortest path length to this data instance.

Specified by:
addSPLength in class PathLengthData<Double>
Parameters:
length - Length of a new shortest path to be accumulated.

getMaxLength

public Double getMaxLength()
Description copied from class: PathLengthData
Longest among the shortest path lengths added to this data instance.

Specified by:
getMaxLength in class PathLengthData<Double>
Returns:
Maximum length of a shortest path accumulated in this instance.

getTotalLength

public Double getTotalLength()
Description copied from class: PathLengthData
Gets the total length of shortest paths.

Specified by:
getTotalLength in class PathLengthData<Double>
Returns:
Sum of all shortest path lengths accumulated in this instance.

getAverageLength

public double getAverageLength()
Description copied from class: PathLengthData
Average shortest path length.

Specified by:
getAverageLength in class PathLengthData<Double>
Returns:
Average length of a shortest path accumulated in this instance.


Copyright © 2014. All Rights Reserved.