Version: dev

forcing_set (type)

Stable type · Other

Tier: stable · Kind: type · Topic: Other

JuliaTypeScriptPythonRustGo
ForcingSetnot exportednot exportedForcingSetnot exported

Julia

mutable struct ForcingSet
ForcingSet(slots::Vector{ForcingSlot}, bufs::Vector{Vector{Float64}}, epoch::UInt64)
ForcingSet(slots, bufs, epoch)
ForcingSet

The forcing inputs of an evaluation (API_SPEC §5.8): one column-major buffer per forcing_slots entry, in slot order, and an epoch no other set in the process carries. Never mutated: the set holds its buffers by reference, so writing into one after building the set is undefined behaviour (the epoch would not change); build a new set instead (replace_forcing shares every other buffer). Build one with forcing_set or default_forcing_set .

Source

TypeScript

TypeScript does not export this type.

Python

Python does not export this type.

Rust

pub struct ForcingSet {
    /* private fields */
}

impl ForcingSet { pub fn new(prog: &RhsProgram, bufs: Vec<Arc<[f64]>>) -> Result<ForcingSet, RhsError> }

impl ForcingSet { pub fn replace(&self, slot: usize, buf: Arc<[f64]>) -> Result<ForcingSet, RhsError> }

impl ForcingSet { pub fn epoch(&self) -> u64 }

impl ForcingSet { pub fn slots(&self) -> &[ForcingSlot] }

impl ForcingSet { pub fn buffer(&self, k: usize) -> &[f64] }

The forcing a program evaluation reads (API_SPEC §5.8): one immutable buffer per RhsProgram::forcing_slots entry, stamped with a process-unique epoch. Refresh is a swap: Self::replace makes a new set (a new epoch) sharing every other buffer, and a call on the new set re-runs what reads forcing. Cheap to clone; Send + Sync.

Source · Rust docs

Go

Go does not export this type.