LorentzianTime

Struct LorentzianTime 

Source
pub struct LorentzianTime { /* private fields */ }
Expand description

A time model representing Lorentzian (physical) time in relativistic spacetimes.

LorentzianTime corresponds to the real-valued coordinate time used in special and general relativity. It is the standard temporal axis in Minkowski and Lorentzian manifolds with metric signature (− + + +).

This time coordinate governs:

  • Causal structure (what can affect what)
  • Relativistic dynamics (time dilation, simultaneity)
  • Spacetime intervals (light cones, timelike/spacelike separation)

§Fields

  • id: Unique numeric identifier for this time point
  • time_scale: Resolution or unit granularity (e.g., Seconds, Nanoseconds)
  • time_unit: Real-valued coordinate time in seconds or specified unit

§Example

use deep_causality::{Identifiable, LorentzianTime, Temporal, TimeScale};

let t = LorentzianTime::new(1, TimeScale::Second, std::f64::consts::E);

assert_eq!(t.id(), 1);
assert_eq!(t.time_scale(), TimeScale::Second);

§Use Cases

  • Relativistic spacetime models (Minkowski, Schwarzschild, FLRW, etc.)
  • General relativity simulations and geodesics
  • Causal propagation using light cones
  • Lorentz-invariant physical systems

§Trait Compatibility

  • Implements Identifiable via id
  • Implements Temporal<f64> via time_unit

§Theoretical Background

Coordinate time in Lorentzian geometry appears in the invariant spacetime interval:

s² = -c²·t² + x² + y² + z²

Unlike Euclidean time (used in QFT), Lorentzian time preserves causal order and reflects real-world physics.

§See also

  • EuclideanTime for Wick-rotated quantum/statistical domains
  • SymbolicTime for logic-based systems

Implementations§

Source§

impl LorentzianTime

Source

pub fn new(id: u64, time_scale: TimeScale, time_unit: f64) -> Self

Trait Implementations§

Source§

impl Adjustable<f64> for LorentzianTime

Source§

fn update<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<f64, W, H, D, C>, ) -> Result<(), UpdateError>

The default implementation does nothing to keep update optional. Override this method to implement a node update when needed. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

fn adjust<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<f64, W, H, D, C>, ) -> Result<(), AdjustmentError>

The default implementation does nothing to keep adjustment optional. Override this method to implement a node adjustment when needed. Depending on the type of node adjustment, select a 1, 2,3, or 4 dimensional array grid that contains the transformation data to apply to the node. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

impl Clone for LorentzianTime

Source§

fn clone(&self) -> LorentzianTime

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 LorentzianTime

Source§

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

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

impl Display for LorentzianTime

Source§

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

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

impl From<LorentzianTime> for TimeKind

Source§

fn from(t: LorentzianTime) -> Self

Converts to this type from the input type.
Source§

impl Identifiable for LorentzianTime

Source§

fn id(&self) -> u64

Source§

impl PartialEq for LorentzianTime

Source§

fn eq(&self, other: &LorentzianTime) -> 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 LorentzianTime

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 LorentzianTime

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 LorentzianTime

Source§

impl StructuralPartialEq for LorentzianTime

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.