Skip to main content

Basis

Trait Basis 

Source
pub trait Basis {
    type Item;
    type BasisIter<'b>: Iterator<Item = Result<Self::Item, Error>>
       where Self: 'b;

    // Required methods
    fn n_items(&self) -> usize;
    fn iter(&self) -> Self::BasisIter<'_>;
    fn first(&self) -> Option<Self::Item>;
}
Expand description

Trait defining behaviours of a basis consisting of linear-space items.

Required Associated Types§

Source

type Item

Type of the item in the basis.

Source

type BasisIter<'b>: Iterator<Item = Result<Self::Item, Error>> where Self: 'b

Type of the iterator over items in the basis.

Required Methods§

Source

fn n_items(&self) -> usize

Returns the number of items in the basis.

Source

fn iter(&self) -> Self::BasisIter<'_>

An iterator over items in the basis.

Source

fn first(&self) -> Option<Self::Item>

Shared reference to the first item in the basis.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T, SC> Basis for FCIBasis<'a, T, SC>
where T: ComplexFloat + Lapack, SC: 'a + StructureConstraint + Display + Clone,

Source§

type Item = SlaterDeterminant<'a, T, SC>

Source§

type BasisIter<'b> = FCIBasisIterator<'b, 'a, T, SC> where Self: 'b

Source§

impl<'g, G, I> Basis for OrbitBasis<'g, G, I>
where G: GroupProperties, I: Clone,

Source§

type Item = I

Source§

type BasisIter<'b> = OrbitBasisIterator<G, I> where Self: 'b

Source§

impl<I: Clone> Basis for EagerBasis<I>

Source§

type Item = I

Source§

type BasisIter<'b> = IntoIter<Result<I, Error>> where Self: 'b