[go: up one dir, main page]

Space

Trait Space 

Source
pub trait Space<T> {
    type Output: AsMut<[T]>;

    // Required methods
    fn len(&self) -> usize;
    fn workspace(&self) -> Self::Output;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Trait for constant or dynamic workspace handling.

The method workspace() is called every time a curve needs space to do calculations on.

Required Associated Types§

Source

type Output: AsMut<[T]>

The workspace given, this should be an array or a vector (AsMut<[T]>)

Required Methods§

Source

fn len(&self) -> usize

Returns the length of the workspace given.

Source

fn workspace(&self) -> Self::Output

The workspace itself.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the workspace is empty.

Implementors§

Source§

impl<T> Space<T> for DynSpace<T>
where T: Default + Copy,

Available on crate feature std only.
Source§

impl<T, const N: usize> Space<T> for ConstSpace<T, N>
where T: Default + Copy,