TransferMatrix

Struct TransferMatrix 

Source
pub struct TransferMatrix {
    pub t22: Complex<f64>,
    /* private fields */
}
Expand description

Struct representing the transfer matrix.

Fields§

§t22: Complex<f64>

t22 element of the matrix.

Implementations§

Source§

impl TransferMatrix

Source

pub fn compose(self, other: TransferMatrix) -> TransferMatrix

Returns a new TransferMatrix which is the composition of two matrices..

§Arguments:
  • other - The other matrix to compose with.
§Returns:

The composition of the two matrices.

Source

pub fn matrix_start() -> TransferMatrix

Creates the idendity transfer matrix. Useful to start the recursion..

§Returns:

The identity transfer matrix.

Source

pub fn matrix_propagation(n: f64, d: f64, k0: f64, k: f64) -> TransferMatrix

Creates the transfer matrix for a homogeneous layer.

§Arguments:
  • n - The refractive index of the layer.
  • d - The thickness of the layer.
  • k0 - The vacuum wavevector.
  • k - The parallel component of the wavevector.
§Returns:

The propagation transfer matrix for the layer.

Source

pub fn matrix_interface_te(n1: f64, n2: f64, k0: f64, k: f64) -> TransferMatrix

Creates the transfer matrix representing the interafce between two layers for TE polarization.

§Arguments:
  • n1 - The refractive index of the first layer.
  • n2 - The refractive index of the second layer.
  • k0 - The vacuum wavevector.
  • k - The parallel component of the wavevector.
§Returns:

The interface transfer matrix for TE polarization.

Source

pub fn matrix_interface_tm(n1: f64, n2: f64, k0: f64, k: f64) -> TransferMatrix

Creates the transfer matrix representing the interafce between two layers for TM polarization./

§Arguments:
  • n1 - The refractive index of the first layer.
  • n2 - The refractive index of the second layer.
  • k0 - The vacuum wavevector.
  • k - The parallel component of the wavevector.
§Returns:

The interface transfer matrix for TM polarization.

Source

pub fn matrix_interface( n1: f64, n2: f64, k0: f64, k: f64, polarization: Polarization, ) -> TransferMatrix

Creates the transfer matrix representing the interafce between two layers..

§Arguments:
  • n1 - The refractive index of the first layer.
  • n2 - The refractive index of the second layer.
  • k0 - The vacuum wavevector.
  • k - The parallel component of the wavevector.
  • polarization - The polarization of the light.
§Returns:

The interface transfer matrix.

Source

pub fn multiply( &self, coefficient_vector: &LayerCoefficientVector, ) -> LayerCoefficientVector

Calculates the modal coefficient on the right of the matrix starting from the ones on the left.

§Arguments:
  • coefficient_vector - The modal coefficient on the left of the matrix.
§Returns:

The modal coefficient on the right of the matrix.

Trait Implementations§

Source§

impl Debug for TransferMatrix

Source§

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

Formats the value using the given formatter. Read more

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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> Ungil for T
where T: Send,