Type Definition quantity::QuantityArray1

source · []
pub type QuantityArray1<U> = QuantityArray<U, Ix1>;

Implementations

Create a one-dimensional array with n evenly spaced elements from start to end (inclusive) if start and end have the same unit.

Example
let x = SIArray1::linspace(1.0 * METER, 3.0 * METER, 5)?;
assert_relative_eq!(x, &(arr1(&[1.0, 1.5, 2.0, 2.5, 3.0]) * METER));

Create a one-dimensional array with n logarithmically spaced elements from start to end (inclusive) if start and end have the same unit.

Example
let x = SIArray1::logspace(1.0 * METER, 16.0 * METER, 5)?;
assert_relative_eq!(x, &(arr1(&[1.0, 2.0, 4.0, 8.0, 16.0]) * METER));

Create a one-dimensional array from a vector of scalar quantities.

Trait Implementations

Creates a value from an iterator. Read more