compute_tempdistance.tempnetwork: Is a function that computes the temporal distance between two...

Description Usage Arguments Value

View source: R/tempnetwork-tempflow-basics.R

Description

Is a function that computes the temporal distance between two points in time with respect to the 'tempflow'-object of the given 'tempnetwork'-object. Moreover, it allows for the choice, whether weights should be considered in the computation or not. The distance is based on the shortest path, that is if no shortest path can be found the distance will be infinite.

Usage

1
2
3
## S3 method for class 'tempnetwork'
compute_tempdistance(tempNetwork, startPoint,
  endPoint, considerWeights = TRUE, safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

startPoint

A point-name (or point-id) representing the name of the start-point of the shortest path computation.

endPoint

A point-name (or point-id) representing the name of the end-point of the shortest path computation.

considerWeights

If TRUE weights will be considered in the shortest path computation, otherwise the distance will be given by the number of steps between "startPoint" and endPoint"

safe

If TRUE, it will be ensured that both start- and end-point exist in the 'tempflow'-object.

Value

The length or size of the shortest path. If no such path exists, it returns "Inf".


KonstantinRK/tempnetwork documentation built on Dec. 23, 2019, 6:40 p.m.