Environments

Extensions functions of generic environments.

Functions

Link copied to clipboard
fun <T> Environment<T, *>.allShortestHopPaths(): <Error class: unknown class><Double>

Calculates the shortest paths using the Floyd-Warshall algorithm calculating the Hop Distance between nodes.

Link copied to clipboard
fun <T> Environment<T, *>.allSubNetworks(computeDistance: (Node<T>, Node<T>) -> Double = environmentMetricDistance()): Set<Network<T>>

Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes. Returns a Map containing the SubNetwork related to each Node of the environment.

Link copied to clipboard
fun <T> Environment<T, *>.allSubNetworksByNode(computeDistance: (Node<T>, Node<T>) -> Double = environmentMetricDistance()): Map<Node<T>, Network<T>>

Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes. Returns a Set containing the SubNetworks.

Link copied to clipboard

Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes, evaluated using the allShortestHopPaths method. Returns a Set containing the SubNetworks.

Link copied to clipboard

Computes the diameter of all subnetworks in the environment. The diameter is the longest shortest path between any two nodes, evaluated using the allShortestHopPaths method. Returns a Set containing the SubNetworks.

Link copied to clipboard

Returns true the network is segmented, false otherwise.

Link copied to clipboard

Returns the diameter of the network in environment units if it is not segmented, and NaN otherwise.

Link copied to clipboard

Returns the hop-distance diameter of the network if it is not segmented, and NaN otherwise.

Computes the network diameter of the segment containing node.