Skip to main content

CalibrationChecker

Struct CalibrationChecker 

Source
pub struct CalibrationChecker {
    pub form: [[f64; 3]; 3],
}
Expand description

Checks if a 2-plane (given by two tangent vectors) is calibrated by a 2-form φ.

A 2-plane spanned by (u, v) is calibrated if φ(u,v) = Area(u,v) = |u×v|.

Fields§

§form: [[f64; 3]; 3]

The calibration 2-form stored as skew-symmetric matrix: φ_ij with φ(e_i, e_j) = mat[i][j]

Implementations§

Source§

impl CalibrationChecker

Source

pub fn new(form: [[f64; 3]; 3]) -> Self

Source

pub fn area_form_r3() -> Self

Special Lagrangian calibration form Re(dz_1 ∧ dz_2 ∧ dz_3) restricted to R^3. In the (e_1, e_2, e_3) basis: φ = dx ∧ dy ∧ dz (volume form in R^3 treated as 3D). Here we return a simpler 2D version: φ = dx ∧ dy.

Source

pub fn evaluate(&self, u: &[f64; 3], v: &[f64; 3]) -> f64

Evaluate φ(u, v) = Σ_{ij} φ_{ij} u^i v^j.

Source

pub fn area(&self, u: &[f64; 3], v: &[f64; 3]) -> f64

Area of the 2-plane spanned by u, v: |u × v|.

Source

pub fn is_calibrated(&self, u: &[f64; 3], v: &[f64; 3]) -> bool

Check if the 2-plane spanned by u, v is calibrated: φ(u,v) ≥ Area(u,v) · comass.

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> 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, 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.