pub struct Tensor4D {
pub components: [[f64; 4]; 4],
}Expand description
Tensor4D for General Relativity (4x4 spacetime tensor)
Fields§
§components: [[f64; 4]; 4]4x4 matrix components [row][col]
Implementations§
Source§impl Tensor4D
impl Tensor4D
Sourcepub fn schwarzschild_metric(mass: f64, r: f64) -> Self
pub fn schwarzschild_metric(mass: f64, r: f64) -> Self
Create Schwarzschild metric (black hole)
Sourcepub fn determinant(&self) -> f64
pub fn determinant(&self) -> f64
Calculate determinant (for volume elements)
Trait Implementations§
impl Copy for Tensor4D
impl StructuralPartialEq for Tensor4D
Auto Trait Implementations§
impl Freeze for Tensor4D
impl RefUnwindSafe for Tensor4D
impl Send for Tensor4D
impl Sync for Tensor4D
impl Unpin for Tensor4D
impl UnwindSafe for Tensor4D
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)