package fehu

  1. Overview
  2. Docs

Module Space.SequenceSource

Sourcetype 'a element = 'a list

Variable-length homogeneous sequence.

Sourceval create : ?min_length:int -> ?max_length:int -> 'a t -> 'a element t

create ~min_length ~max_length subspace creates a sequence space.

Valid values are lists of elements from subspace, with length constraints:

  • If min_length is provided, list length must be >= min_length
  • If max_length is provided, list length must be <= max_length (otherwise, no upper bound is enforced)

Sampling uses the provided max_length range when bounded; otherwise the sampler returns sequences of length min_length (default: 0).

Common use: Variable-length observations (e.g., lists of detected objects, sequences of variable horizon length).