pub struct MinkowskiTime<R>where
R: RealField,{ /* private fields */ }Expand description
The coordinate time t of an inertial frame of Minkowski spacetime, counted in time_scale
units.
An event of Minkowski spacetime has coordinates (t, x, y, z) in an inertial frame, with
x⁰ = ct (Carroll 1997, eq. (1.5)). Unlike the absolute time of a classical spacetime, t
depends on the frame: whether two events are simultaneous depends on the coordinates used
(Carroll 1997, §1, after eq. (1.4)). The frame-independent quantity is the interval, which
MinkowskiSpacetime computes.
A translation x^μ → x^μ + a^μ leaves the interval unchanged (Carroll 1997, eq. (1.10)), so
the zero of t is a choice. Adjustable accepts any finite coordinate
time, zero and negative included, and refuses NaN and infinity.
§Example
use deep_causality_context::{Identifiable, MinkowskiTime, Temporal, TimeScale};
let t = MinkowskiTime::new(1, TimeScale::Second, core::f64::consts::E);
assert_eq!(t.id(), 1);
assert_eq!(t.time_scale(), TimeScale::Second);§References
- Carroll, S. M. (1997). Lecture Notes on General Relativity. arXiv:gr-qc/9712019, ch. 1.
Copy:
papers/carroll_1997_lecture_notes_on_general_relativity_arXiv_gr-qc_9712019.pdf.
Implementations§
Source§impl<R: RealField> MinkowskiTime<R>
impl<R: RealField> MinkowskiTime<R>
pub fn new(id: ContextoidId, time_scale: TimeScale, time_unit: R) -> Self
Trait Implementations§
Source§impl<R: RealField + Default> Adjustable<R> for MinkowskiTime<R>
impl<R: RealField + Default> Adjustable<R> for MinkowskiTime<R>
Source§fn update<const W: usize, const H: usize, const D: usize, const C: usize>(
&mut self,
array_grid: &ArrayGrid<R, W, H, D, C>,
) -> Result<(), UpdateError>
fn update<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<R, 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<R, W, H, D, C>,
) -> Result<(), AdjustmentError>
fn adjust<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<R, 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<R> Clone for MinkowskiTime<R>
impl<R> Clone for MinkowskiTime<R>
impl<R> Copy for MinkowskiTime<R>
Source§impl<R> Debug for MinkowskiTime<R>
impl<R> Debug for MinkowskiTime<R>
Source§impl<R: RealField> From<MinkowskiTime<R>> for TimeKind<R>
impl<R: RealField> From<MinkowskiTime<R>> for TimeKind<R>
Source§fn from(t: MinkowskiTime<R>) -> Self
fn from(t: MinkowskiTime<R>) -> Self
Converts to this type from the input type.
Source§impl<R: RealField> Identifiable for MinkowskiTime<R>
impl<R: RealField> Identifiable for MinkowskiTime<R>
Source§fn id(&self) -> ContextoidId
fn id(&self) -> ContextoidId
Returns the unique id of this item.
Source§impl<R> PartialEq for MinkowskiTime<R>
impl<R> PartialEq for MinkowskiTime<R>
Source§impl<R: RealField + Into<f64> + FromPrimitive> Recordable<TimeRecord> for MinkowskiTime<R>
impl<R: RealField + Into<f64> + FromPrimitive> Recordable<TimeRecord> for MinkowskiTime<R>
Source§fn to_record(&self) -> Result<TimeRecord, ProjectionError>
fn to_record(&self) -> Result<TimeRecord, ProjectionError>
The node as a record.
Source§fn from_record(
id: ContextoidId,
record: TimeRecord,
) -> Result<Self, ProjectionError>
fn from_record( id: ContextoidId, record: TimeRecord, ) -> Result<Self, ProjectionError>
The node a record describes, under the given identifier.
Source§impl<R: RealField + Default> ScalarProjector for MinkowskiTime<R>
impl<R: RealField + Default> ScalarProjector for MinkowskiTime<R>
impl<R> StructuralPartialEq for MinkowskiTime<R>
Source§impl<R: RealField> Temporal for MinkowskiTime<R>
impl<R: RealField> Temporal for MinkowskiTime<R>
Auto Trait Implementations§
impl<R> Freeze for MinkowskiTime<R>where
R: Freeze,
impl<R> RefUnwindSafe for MinkowskiTime<R>where
R: RefUnwindSafe,
impl<R> Send for MinkowskiTime<R>where
R: Send,
impl<R> Sync for MinkowskiTime<R>where
R: Sync,
impl<R> Unpin for MinkowskiTime<R>where
R: Unpin,
impl<R> UnsafeUnpin for MinkowskiTime<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for MinkowskiTime<R>where
R: UnwindSafe,
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