pub struct QNIndex<S>where
S: Sector,{ /* private fields */ }Expand description
Quantum-number index for one tensor leg.
Maps each sector to a block dimension, with a direction for flux computation.
§Invariants (enforced by constructor)
blocksis sorted by sector (Ord)- No duplicate sectors
- Every block dimension is > 0
Implementations§
Source§impl<S> QNIndex<S>where
S: Sector,
impl<S> QNIndex<S>where
S: Sector,
Sourcepub fn new(blocks: Vec<(S, usize)>, direction: Direction) -> QNIndex<S>
pub fn new(blocks: Vec<(S, usize)>, direction: Direction) -> QNIndex<S>
Create a new QN index.
blocks is sorted by sector. Panics if any block dimension is zero
or if duplicate sectors are present.
Sourcepub fn num_blocks(&self) -> usize
pub fn num_blocks(&self) -> usize
Number of distinct sectors (blocks) in this index.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for QNIndex<S>
impl<S> RefUnwindSafe for QNIndex<S>where
S: RefUnwindSafe,
impl<S> Send for QNIndex<S>where
S: Send,
impl<S> Sync for QNIndex<S>where
S: Sync,
impl<S> Unpin for QNIndex<S>where
S: Unpin,
impl<S> UnsafeUnpin for QNIndex<S>
impl<S> UnwindSafe for QNIndex<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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