pub struct Table {
pub id: u64,
pub dynamic: bool,
pub rows: usize,
pub cols: usize,
pub col_kinds: Vec<ValueKind>,
pub col_map: AliasMap,
pub row_map: AliasMap,
pub data: Vec<Column>,
pub nalgebra: Option<Rc<RefCell<DMatrix<f32>>>>,
pub dictionary: StringDictionary,
}Fields§
§id: u64§dynamic: bool§rows: usize§cols: usize§col_kinds: Vec<ValueKind>§col_map: AliasMap§row_map: AliasMap§data: Vec<Column>§nalgebra: Option<Rc<RefCell<DMatrix<f32>>>>§dictionary: StringDictionaryImplementations§
source§impl Table
impl Table
pub fn new(id: u64, rows: usize, cols: usize) -> Table
pub fn resize(&mut self, rows: usize, cols: usize) -> Result<(), MechError>
pub fn is_empty(&self) -> bool
pub fn get_col_raw(&self, col_ix: usize) -> Result<Column, MechError>
pub fn kind(&self) -> ValueKind
pub fn name(&self) -> Option<String>
pub fn get_column(&self, col: &TableIndex) -> Result<Column, MechError>
pub fn set_col_alias(&mut self, ix: usize, alias: u64) -> Result<(), MechError>
pub fn set_kind(&mut self, kind: ValueKind) -> Result<(), MechError>
pub fn extend(&mut self, other: &Table) -> Result<(), MechError>
pub fn set_col_kind( &mut self, col: usize, kind: ValueKind, ) -> Result<(), MechError>
pub fn get_by_index( &self, row: TableIndex, col: TableIndex, ) -> Result<Value, MechError>
pub fn set_col( &mut self, col_ix: usize, column: Column, ) -> Result<(), MechError>
pub fn get_columns(&self, col: &TableIndex) -> Result<Vec<Column>, MechError>
pub fn set( &self, row: &TableIndex, col: &TableIndex, val: Value, ) -> Result<(), MechError>
pub fn set_raw( &self, row: usize, col: usize, val: Value, ) -> Result<(), MechError>
pub fn get( &self, row: &TableIndex, col: &TableIndex, ) -> Result<Value, MechError>
pub fn get_raw(&self, row: usize, col: usize) -> Result<Value, MechError>
pub fn get_linear_raw(&self, ix: usize) -> Result<Value, MechError>
pub fn get_linear(&self, ix: usize) -> Result<Value, MechError>
pub fn len(&self) -> usize
pub fn get_column_unchecked(&self, col: usize) -> Column
pub fn has_col_aliases(&self) -> bool
pub fn subscript_to_index( &self, row: usize, col: usize, ) -> Result<usize, MechError>
pub fn index_to_subscript(&self, ix: usize) -> Result<(usize, usize), MechError>
pub fn set_linear(&self, ix: usize, val: Value) -> Result<(), MechError>
pub fn shape(&self) -> TableShape
pub fn logical_len(&self) -> usize
pub fn to_changes(&self) -> Vec<Change>
pub fn data_to_changes(&self) -> Vec<Change>
pub fn collect_columns_u8(&self) -> Vec<ColumnV<U8>>
pub fn collect_columns_u16(&self) -> Vec<ColumnV<U16>>
pub fn collect_columns_u32(&self) -> Vec<ColumnV<U32>>
pub fn collect_columns_u64(&self) -> Vec<ColumnV<U64>>
pub fn collect_columns_u128(&self) -> Vec<ColumnV<U128>>
pub fn collect_columns_i8(&self) -> Vec<ColumnV<I8>>
pub fn collect_columns_i16(&self) -> Vec<ColumnV<I16>>
pub fn collect_columns_i32(&self) -> Vec<ColumnV<I32>>
pub fn collect_columns_i64(&self) -> Vec<ColumnV<I64>>
pub fn collect_columns_i128(&self) -> Vec<ColumnV<I128>>
pub fn collect_columns_f32(&self) -> Vec<ColumnV<F32>>
pub fn collect_columns_f64(&self) -> Vec<ColumnV<F64>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl !RefUnwindSafe for Table
impl !Send for Table
impl !Sync for Table
impl Unpin for Table
impl !UnwindSafe for Table
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> 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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.