org.javanetworkanalyzer.data
Class UnweightedPathLengthData

java.lang.Object
  extended by org.javanetworkanalyzer.data.PathLengthData<Integer>
      extended by org.javanetworkanalyzer.data.UnweightedPathLengthData

public class UnweightedPathLengthData
extends PathLengthData<Integer>

PathLengthData for unweighted graphs.

Author:
Adam Gouge

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.data.PathLengthData
count, SPL_ERROR
 
Constructor Summary
UnweightedPathLengthData()
          Constructor.
 
Method Summary
 void addSPLength(Integer 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.
 Integer getMaxLength()
          Longest among the shortest path lengths added to this data instance.
 Integer 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

UnweightedPathLengthData

public UnweightedPathLengthData()
Constructor.

Method Detail

clear

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

Overrides:
clear in class PathLengthData<Integer>

addSPLength

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

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

getMaxLength

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

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

getTotalLength

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

Specified by:
getTotalLength in class PathLengthData<Integer>
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<Integer>
Returns:
Average length of a shortest path accumulated in this instance.


Copyright © 2014. All Rights Reserved.