DiscretePath

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def sampleContinuous[V, F : Order](f: Double => V, maximumRangeGap: F, maximumDomainGap: Double)(implicit evidence$2: Order[F], nvs: NormedVectorSpace[V, F]): DiscretePath[V, F]

Sample the continuous function f on the closed interval I = [0.0, 1.0].

Sample the continuous function f on the closed interval I = [0.0, 1.0].

The sampled path π satisfies the following conditions:

  • π starts with f(0.0): V and ends with f(1.0): V
  • each point v: V of π is a "sample" of f, in a sense that there is t_v: Double in the closed interval I such that f(t_v) = v. Moreover, the sampling is done in an increasing order, meaning that if v appears before w in π, then t_v < t_w.
  • two consecutive v: V and w: V of π are "sufficiently close" samples, in a sense that
    • |t_v - w_v| < maximumDomainGap
    • distance(v, w) < maximumRangeGap

This function is undefined for f which is not continuous (with respect to the metric induced by the norm structure of V; see NormedVectorSpace).

def sampleDouble[V](f: Double => V, maximumRangeGap: Double, maximumDomainGap: Double)(using nvs: NormedVectorSpace[V, Double]): DiscretePath[V, Double]

A wrapper for sampleContinuous that operates on a normed vector space over Double.

A wrapper for sampleContinuous that operates on a normed vector space over Double.

def zero[V, F](using nvs: NormedVectorSpace[V, F], order: Order[F]): DiscretePath[V, F]

The constant path containing just one zero vector.

The constant path containing just one zero vector.

Givens

Givens

given Semigroup_DiscretePath[V, F]: Semigroup[DiscretePath[V, F]]

The default semigroup instance that concats paths by rebasing.

The default semigroup instance that concats paths by rebasing.

Notice that this structure

  • is associative
  • is only unital if you identify x concatRebase zero with x, where the former has an extra point.
  • does not admit inverses. Concatenating a reverse path does not erase the original path.