tape
Stable type · Replay and adjoint
Tier: stable · Kind: type · Topic: Replay and adjoint
| Julia | Rust |
|---|---|
| not exported | tape::Tape |
Julia
Julia does not export this type.
Rust
pub struct Tape {
pub records: Vec<TapeRecord>,
}
impl Tape { pub fn to_jsonl(&self) -> String }
impl Tape { pub fn from_jsonl(text: &str) -> Result<Tape, String> }
impl Tape { pub fn index(&self) -> HashMap<&str, &TapeRecord> }
impl Tape { pub fn macro_segment(&self, k: usize) -> &[TapeRecord] }
impl Tape { pub fn step_counts(&self) -> (u64, u64) }
The tape of a run.
Example (replay)
let again = spec.replay(&u0, &p, &fwd.tape).unwrap();
assert_eq!(again.final_state(), fwd.final_state());