pub enum SymbolicTimeUnit {
Before(String, i64),
Named(String, i64),
After(String, i64),
Simultaneous(Vec<String>, i64),
}Expand description
Represents a symbolic unit of time with a qualitative relationship to named events.
Each variant carries a human-readable label (or multiple labels) and a numeric scalar
i64 value for optional ordering, interval estimation, or compatibility with systems
that require Temporal<i64>.
§Variants
-
Before(label, t)- Indicates a time before the given label (e.g.,
"Before(SensorTrigger)") - Scalar
tis expected to be negative
- Indicates a time before the given label (e.g.,
-
Named(label, t)- A named symbolic anchor point in time (e.g.,
"Init","Decision") - Scalar
tis typically zero or positive
- A named symbolic anchor point in time (e.g.,
-
After(label, t)- Indicates a time after the given event
- Scalar
tis always positive
-
Simultaneous(labels, t)- Represents multiple symbolic labels occurring at the same scalar time
- Useful for modeling concurrency or grouped events
§Use Cases
- Symbolic and rule-based AI systems
- Temporal logic systems (e.g., LTL, CTL)
- Causal modeling without physical clocks
- Traceable inference timelines
§Example
use deep_causality::SymbolicTimeUnit;
let t = SymbolicTimeUnit::Simultaneous(
vec!["SensorA".into(), "SensorB".into()],
100,
);
match &t {
SymbolicTimeUnit::Simultaneous(labels, time) => {
assert_eq!(labels.len(), 2);
assert_eq!(*time, 100);
},
_ => unreachable!(),
}Variants§
Before(String, i64)
A symbolic time point before the given label (e.g., “Before(‘start’)”).
Named(String, i64)
A symbolic named anchor point in the timeline (e.g., “Init”, “Decision”).
After(String, i64)
A symbolic time point after the given label (e.g., “After(‘end’)”).
Simultaneous(Vec<String>, i64)
Multiple events that occur simultaneously and share a scalar time.
Trait Implementations§
Source§impl Clone for SymbolicTimeUnit
impl Clone for SymbolicTimeUnit
Source§fn clone(&self) -> SymbolicTimeUnit
fn clone(&self) -> SymbolicTimeUnit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SymbolicTimeUnit
impl Debug for SymbolicTimeUnit
Source§impl Hash for SymbolicTimeUnit
impl Hash for SymbolicTimeUnit
Source§impl PartialEq for SymbolicTimeUnit
impl PartialEq for SymbolicTimeUnit
impl Eq for SymbolicTimeUnit
impl StructuralPartialEq for SymbolicTimeUnit
Auto Trait Implementations§
impl Freeze for SymbolicTimeUnit
impl RefUnwindSafe for SymbolicTimeUnit
impl Send for SymbolicTimeUnit
impl Sync for SymbolicTimeUnit
impl Unpin for SymbolicTimeUnit
impl UnwindSafe for SymbolicTimeUnit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more