package sd_logic

  1. Overview
  2. Docs

Module Sd_logic.Robot_state_historySource

Sourcetype t
Sourceval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
Sourceval create : ?default_length:int -> ?sd_lengths:(Sd.Packed.t, int, Sd.Packed.comparator_witness) Core.Map.t -> unit -> t
Sourceval nth_state : t -> int -> Robot_state.t option

nth_state t i returns Some of the ith most recent state from t, or None if t doesn't have more than i states. O(log(n)) time complexity in length of t.

Sourceval curr_state : t -> Robot_state.t

get_current_state t is equivalent to get_state 0. O(1) time complexity.

Sourceval add_empty_state : t -> t

add_state t state adds state to t. O(log(n)) time complexity in length of t.

Sourceval add_state : t -> Robot_state.t -> t
Sourceval use : t -> ?to_use:Sd.set option -> Robot_state.t -> t

use t state replaces the current state with Robot_state.use (curr_state t) state

Sourceval use_extras : t -> Robot_state.t -> t
Sourceval find : t -> 'a Sd.t -> 'a option

find t sd is equivilant to Robot_state.find (curr_state t) sd

Sourceval find_exn : t -> 'a Sd.t -> 'a
Sourceval find_past : t -> int -> 'a Sd.t -> 'a option

find_past t n sd is equivalent to Robot_state.find (nth_state t n) sd

Sourceval find_past_exn : t -> int -> 'a Sd.t -> 'a
Sourceval find_past_def : t -> default:'a -> int -> 'a Sd.t -> 'a
Sourceval find_past_last_def : t -> int -> 'a Sd.t -> 'a option
Sourceval mem : t -> 'a Sd.t -> bool

mem t sd is equivilant to Robot_state.mem (curr_state t) sd

Sourceval mem_past : t -> int -> 'a Sd.t -> bool option

mem_past t n sd is equivilant to Robot_state.mem (nth_state t n) sd

Sourceval memp : t -> Sd.Packed.t -> bool

memp t sd is equivilant to Robot_state.memp (curr_state t) sd

Sourceval memp_past : t -> int -> Sd.Packed.t -> bool option

memp_past t n sd is equivilant to Robot_state.memp (nth_state t n) sd

Sourceval max_length : t -> int

max_length t returns the maximum length of t. O(1) time complexity.

Sourceval length : t -> int

length t returns the length of t. O(n) time complexity in the length of t.

OCaml

Innovation. Community. Security.