Skip to main content

Trace

Struct Trace 

Source
pub struct Trace {
Show 13 fields pub config_n_modes: usize, pub config_latent_dim: usize, pub config_eps: f64, pub config_seed: Option<u64>, pub config_schedule: String, pub config_condition: Condition, pub config_match_policy: MatchPolicy, pub config_diff_policy: DiffPolicy, pub config_stutter_k: u64, pub config_optical: Option<String>, pub config_merge_tau: f64, pub initial_graph: Option<Graph>, pub entries: Vec<TraceEntry>,
}
Expand description

Full trace: a sequence of entries.

The header (config_* fields) must carry everything aria emit needs to replay Φ byte-for-byte without a matching --config: n_modes, latent_dim, and eps alone are not enough. seed, schedule, condition, and match_policy select the trajectory; diff_policy (consumed by Engine::apply), stutter_k (consumed by the scheduler), and optical/merge_tau (consumed by engine_with when the backends are built) all change the replayed latents just as much. initial_graph records G₀ so a run seeded with a non-empty graph is self-describing rather than silently replayed from Graph::empty(). Omitting any of these makes replay silently diverge from the run that produced the trace (see aria emit’s doc comment).

Fields§

§config_n_modes: usize§config_latent_dim: usize§config_eps: f64§config_seed: Option<u64>

Seed the run used — None only if the run itself used no fixed seed.

§config_schedule: String

Schedule string (“opmd” or a custom action-char sequence).

§config_condition: Condition

Conditioning a_t the run used.

§config_match_policy: MatchPolicy

Match policy ℙ3 the run used.

§config_diff_policy: DiffPolicy

Diffusion policy for Diff_G(z) — consumed by Engine::apply.

§config_stutter_k: u64

Stutter budget K (𝐂5) — consumed by the scheduler.

§config_optical: Option<String>

Optical backend selection ("fft"/"householder", None = automatic) — consumed by engine_with when the backend is built.

§config_merge_tau: f64

Graph merge distance threshold τ (spec §0.4) — consumed by engine_with via SimGraphBackend::with_merge_tau.

§initial_graph: Option<Graph>

The graph the run started from (G₀). None iff the run started from Graph::empty(); recorded (not just a flag) so a seeded run stays self-describing. aria emit replays from an empty graph, so it must reject a trace whose initial_graph is non-empty rather than silently diverge.

§entries: Vec<TraceEntry>

Implementations§

Source§

impl Trace

Source

pub fn new( n_modes: usize, latent_dim: usize, eps: f64, seed: Option<u64>, schedule: &str, condition: Condition, match_policy: MatchPolicy, diff_policy: DiffPolicy, stutter_k: u64, optical: Option<String>, merge_tau: f64, initial_graph: Option<Graph>, ) -> Self

Source

pub fn push( &mut self, t: u64, action: Action, residual: f64, energy: f64, graph_size: usize, condition: &str, )

Source

pub fn to_jsonl(&self) -> String

Export as JSONL string.

Source

pub fn action_sequence(&self) -> String

Action symbol sequence for trace pattern matching.

Trait Implementations§

Source§

impl Clone for Trace

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Trace

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Trace

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Trace

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Trace

§

impl RefUnwindSafe for Trace

§

impl Send for Trace

§

impl Sync for Trace

§

impl Unpin for Trace

§

impl UnsafeUnpin for Trace

§

impl UnwindSafe for Trace

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.