TimeKind

Enum TimeKind 

Source
pub enum TimeKind {
    Euclidean(EuclideanTime),
    Entropic(EntropicTime),
    Discrete(DiscreteTime),
    Lorentzian(LorentzianTime),
}
Expand description

An enumeration of supported time models for unified, heterogeneous temporal reasoning.

TimeKind provides a polymorphic abstraction over multiple time semantics used in both physical and symbolic systems. It allows causal models, simulations, or reasoning engines to switch between continuous, discrete, and qualitative time representations in a unified way.

This is especially useful in hybrid environments where:

  • Time may be physical in one subsystem and symbolic in another
  • Models must support both discrete and continuous timelines
  • Simulation layers require flexible temporal modes

§Use Cases

  • Dynamic systems with configurable time semantics
  • Spacetime graphs mixing physics and logic
  • Abstract symbolic timelines
  • Causal models across domains (AI, physics, engineering)

§Variants

  • Lorentzian(LorentzianTime)

    • Real-valued time coordinate used in special/general relativity
    • Metric signature: (-+++), t ∈ ℝ
    • Appears in causal structure and physical propagation
  • Euclidean(EuclideanTime)

    • Imaginary time (Wick-rotated), used in quantum/statistical physics
    • Metric signature: (++++)
    • Common in quantum field theory (QFT), path integrals, and lattice simulations
  • Discrete(DiscreteTime)

    • Integer-valued ticks or steps (e.g., for simulation time, state machines)
    • Unitless or context-dependent
    • Used in agent-based models, control systems, and RL environments

§Example

use deep_causality::*;

let lorentz = TimeKind::Lorentzian(LorentzianTime::new(1, TimeScale::Second, 3.14));
let discrete = TimeKind::Discrete(DiscreteTime::new(2, TimeScale::Second, 42));

println!("L: {}, ID: {}", lorentz, lorentz.id());
println!("D: {}, ID: {}", discrete, discrete.id());

§Trait Compatibility

  • Implements Identifiable based on the inner ID
  • Implements Display for readable output
  • Can be extended to support Temporal<f64> and Temporal<u64>

§See also

  • LorentzianTime, EuclideanTime, DiscreteTime, SymbolicTime
  • SpaceKind for spatial equivalents
  • SpacetimeInterval for reasoning over separation or causality

§Design Note

For models that need a single time field but must support multiple representations of time (e.g., symbolic vs physical), TimeKind provides a principled and type-safe solution.

Variants§

§

Euclidean(EuclideanTime)

Imaginary-time axis for quantum/statistical models via Wick rotation.

§

Entropic(EntropicTime)

Entropic time for emergent causal models via entropy.

§

Discrete(DiscreteTime)

Discrete tick-based time (steps, iterations, simulation frames).

§

Lorentzian(LorentzianTime)

Real-valued coordinate time in Lorentzian (causal, relativistic) geometry.

Trait Implementations§

Source§

impl Clone for TimeKind

Source§

fn clone(&self) -> TimeKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TimeKind

Source§

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

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

impl Display for TimeKind

Source§

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

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

impl From<DiscreteTime> for TimeKind

Source§

fn from(t: DiscreteTime) -> Self

Converts to this type from the input type.
Source§

impl From<EntropicTime> for TimeKind

Source§

fn from(t: EntropicTime) -> Self

Converts to this type from the input type.
Source§

impl From<EuclideanTime> for TimeKind

Source§

fn from(t: EuclideanTime) -> Self

Converts to this type from the input type.
Source§

impl From<LorentzianTime> for TimeKind

Source§

fn from(t: LorentzianTime) -> Self

Converts to this type from the input type.
Source§

impl Identifiable for TimeKind

Source§

fn id(&self) -> u64

Source§

impl PartialEq for TimeKind

Source§

fn eq(&self, other: &TimeKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ScalarProjector for TimeKind

Source§

type Scalar = f64

The scalar value extracted from the input (must implement ScalarValue)
Source§

fn project(&self) -> Self::Scalar

Extracts a scalar from self.
Source§

impl Temporal<f64> for TimeKind

Source§

fn time_scale(&self) -> TimeScale

Returns the unit scale of time (e.g. TimeScale::Milliseconds).
Source§

fn time_unit(&self) -> f64

Returns a reference to the numeric time unit (e.g. 0, 100, 32768).
Source§

impl Copy for TimeKind

Source§

impl StructuralPartialEq for TimeKind

Auto Trait Implementations§

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> Satisfies<NoConstraint> for T