Function compute_signature

Source
pub fn compute_signature(
    trajectory: &[(i64, &[f32])],
    config: &SignatureConfig,
) -> Result<PathSignatureResult, SignatureError>
Expand description

Compute the truncated path signature of a trajectory.

The trajectory is a sequence of (timestamp, vector) pairs. The signature captures the ordered, multi-scale structure of the path.

§Arguments

  • trajectory - Sequence of (timestamp, vector) pairs, ordered by time.
  • config - Truncation depth and options.

§Returns

The concatenated signature up to the specified depth:

  • Depth 1: K features (net displacement per dimension)
  • Depth 2: K + K² features (displacement + signed areas)
  • Depth 3: K + K² + K³ features

§Complexity

O(N × K^depth) where N = trajectory length, K = dimensionality.