pub struct FactorizationLevel { /* private fields */ }Expand description
A factorization level containing columns at the same nesting depth.
Implementations§
Source§impl FactorizationLevel
impl FactorizationLevel
Sourcepub fn flat(columns: Vec<FactorizedVector>, column_names: Vec<String>) -> Self
pub fn flat(columns: Vec<FactorizedVector>, column_names: Vec<String>) -> Self
Creates a new flat level (level 0) from columns.
Sourcepub fn unflat(
columns: Vec<FactorizedVector>,
column_names: Vec<String>,
multiplicities: Vec<usize>,
) -> Self
pub fn unflat( columns: Vec<FactorizedVector>, column_names: Vec<String>, multiplicities: Vec<usize>, ) -> Self
Creates a new unflat level with the given multiplicities.
Note: multiplicities[i] is the number of values for parent i.
The total number of values (group_count) is the sum of all multiplicities.
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Returns the number of columns at this level.
Sourcepub fn group_count(&self) -> usize
pub fn group_count(&self) -> usize
Returns the number of groups at this level.
Sourcepub fn physical_value_count(&self) -> usize
pub fn physical_value_count(&self) -> usize
Returns the total physical value count across all columns.
Sourcepub fn multiplicities(&self) -> &[usize]
pub fn multiplicities(&self) -> &[usize]
Returns the multiplicities for this level.
Sourcepub fn column(&self, index: usize) -> Option<&FactorizedVector>
pub fn column(&self, index: usize) -> Option<&FactorizedVector>
Returns a column by index.
Sourcepub fn column_mut(&mut self, index: usize) -> Option<&mut FactorizedVector>
pub fn column_mut(&mut self, index: usize) -> Option<&mut FactorizedVector>
Returns a mutable column by index.
Sourcepub fn column_names(&self) -> &[String]
pub fn column_names(&self) -> &[String]
Returns the column names.
Trait Implementations§
Source§impl Clone for FactorizationLevel
impl Clone for FactorizationLevel
Source§fn clone(&self) -> FactorizationLevel
fn clone(&self) -> FactorizationLevel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FactorizationLevel
impl RefUnwindSafe for FactorizationLevel
impl Send for FactorizationLevel
impl Sync for FactorizationLevel
impl Unpin for FactorizationLevel
impl UnwindSafe for FactorizationLevel
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