FromGPSTrace

class FromGPSTrace @JvmOverloads constructor(nodeCount: Int? = null, path: String, cycle: Boolean = false, normalizer: String, args: Any) : Deployment<GeoPosition>

Distributes nodeCount nodes in the first positions of the GPSTraces found at path, whose time is aligned using the normalizer class created with the given args. If nodeCount is null, one node is deployed per available trace. If cycle is true and there are more nodes to deploy than available GPS traces, the traces are reused cyclically: e.g., if 10 nodes must be deployed but only 9 GPS traces are available, the first one is reused for the 10th node.

Throws

if there are errors accessing the file system

Constructors

Link copied to clipboard
constructor(nodeCount: Int? = null, path: String, cycle: Boolean = false, normalizer: String, vararg args: Any)

Functions

Link copied to clipboard

Returns the optional NetworkModel associated to the deployment, or null if there is none.

Link copied to clipboard
open operator override fun iterator(): Iterator<GeoPosition>
Link copied to clipboard
fun <R> Iterable<R>.randomElement(randomGenerator: RandomGenerator): R

Returns a random element of the Iterable using the provided randomGenerator.

Link copied to clipboard
fun <R> Iterable<R>.shuffled(randomGenerator: RandomGenerator): Iterable<R>

Fisher–Yates shuffle algorithm using a RandomGenerator. More information on Wikipedia.

Link copied to clipboard
open override fun stream(): Stream<GeoPosition>

Returns a Stream over the positions of this Deployment.