pub struct Series<A: SerialAlphabet> { /* private fields */ }Expand description
An ordered series of alphabet symbols validated against an aggregate rule.
Implementations§
Source§impl<A: SerialAlphabet> Series<A>
impl<A: SerialAlphabet> Series<A>
Sourcepub fn try_new(
alphabet: A,
rule: AggregateRule,
order: Vec<A::Symbol>,
) -> Result<Self, SeriesError>
pub fn try_new( alphabet: A, rule: AggregateRule, order: Vec<A::Symbol>, ) -> Result<Self, SeriesError>
Constructs a series after validating alphabet, membership, and aggregate policy.
Sourcepub fn rule(&self) -> &AggregateRule
pub fn rule(&self) -> &AggregateRule
Returns the aggregate rule retained by this series.
Sourcepub fn order(&self) -> &[A::Symbol]
pub fn order(&self) -> &[A::Symbol]
Returns the ordered symbols, never caller-provided ordinals.
Sourcepub fn ledger(&self) -> &AggregateLedger<A::Symbol>
pub fn ledger(&self) -> &AggregateLedger<A::Symbol>
Returns construction evidence for membership and aggregate counts.
Sourcepub fn permutation_rank(&self) -> Result<Nat, SeriesError>
pub fn permutation_rank(&self) -> Result<Nat, SeriesError>
Returns the shared Lehmer rank when the series is exactly one permutation.
This method delegates to PermutationSpace and does not enumerate any
permutations in this crate.
Sourcepub fn into_parts(self) -> (A, AggregateRule, Vec<A::Symbol>)
pub fn into_parts(self) -> (A, AggregateRule, Vec<A::Symbol>)
Consumes the series into its validated parts.
Source§impl<A: SerialAlphabet> Series<A>
impl<A: SerialAlphabet> Series<A>
Sourcepub fn apply(
&self,
operation: &SeriesTransform<A>,
) -> Result<TransformedSeries<A>, SeriesTransformError>
pub fn apply( &self, operation: &SeriesTransform<A>, ) -> Result<TransformedSeries<A>, SeriesTransformError>
Applies a validated transform and returns a valid series plus algebra evidence.
Trait Implementations§
impl<A: Eq + SerialAlphabet> Eq for Series<A>
impl<A: PartialEq + SerialAlphabet> StructuralPartialEq for Series<A>
Auto Trait Implementations§
impl<A> Freeze for Series<A>where
A: Freeze,
impl<A> RefUnwindSafe for Series<A>
impl<A> Send for Series<A>
impl<A> Sync for Series<A>
impl<A> Unpin for Series<A>
impl<A> UnsafeUnpin for Series<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Series<A>
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