Struct ArrayUnit

Source
pub struct ArrayUnit<T, D>
where T: Data, D: Dimension,
{ /* private fields */ }

Implementations§

Source§

impl<T, D> ArrayUnit<T, D>
where T: Data, D: Dimension,

Source

pub fn new(arr: ArrayBase<T, D>, u: Unit) -> ArrayUnit<T, D>

Create an ArrayUnit from a ndarray::ArrayBase and an Unit

Source

pub fn array(&self) -> &ArrayBase<T, D>

Return a reference to the underlying ndarray::ArrayBase

Trait Implementations§

Source§

impl<T, D> Add for &ArrayUnit<T, D>
where T: Data, D: Dimension, for<'a> &'a ArrayBase<T, D>: Add<Output = ArrayBase<T, D>>,

Source§

type Output = ArrayUnit<T, D>

The resulting type after applying the + operator.
Source§

fn add(self, other: &ArrayUnit<T, D>) -> ArrayUnit<T, D>

Performs the + operation. Read more
Source§

impl<A: Display, T, D> Display for ArrayUnit<T, D>
where T: Data<Elem = A>, D: Dimension,

Source§

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

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

impl<T, D> Div for &ArrayUnit<T, D>
where T: Data, D: Dimension, for<'a> &'a ArrayBase<T, D>: Div<Output = ArrayBase<T, D>>,

Source§

type Output = ArrayUnit<T, D>

The resulting type after applying the / operator.
Source§

fn div(self, other: &ArrayUnit<T, D>) -> ArrayUnit<T, D>

Performs the / operation. Read more
Source§

impl<T, D> Mul for &ArrayUnit<T, D>
where T: Data, D: Dimension, for<'a> &'a ArrayBase<T, D>: Mul<Output = ArrayBase<T, D>>,

Source§

type Output = ArrayUnit<T, D>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &ArrayUnit<T, D>) -> ArrayUnit<T, D>

Performs the * operation. Read more
Source§

impl<T, D> Sub for &ArrayUnit<T, D>
where T: Data, D: Dimension, for<'a> &'a ArrayBase<T, D>: Sub<Output = ArrayBase<T, D>>,

Source§

type Output = ArrayUnit<T, D>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &ArrayUnit<T, D>) -> ArrayUnit<T, D>

Performs the - operation. Read more

Auto Trait Implementations§

§

impl<T, D> Freeze for ArrayUnit<T, D>
where T: Freeze, D: Freeze,

§

impl<T, D> RefUnwindSafe for ArrayUnit<T, D>

§

impl<T, D> Send for ArrayUnit<T, D>
where T: Send,

§

impl<T, D> Sync for ArrayUnit<T, D>
where T: Sync,

§

impl<T, D> Unpin for ArrayUnit<T, D>
where T: Unpin, D: Unpin,

§

impl<T, D> UnwindSafe for ArrayUnit<T, D>

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