pub struct TTCore {
pub data: Vec<f64>,
pub rank_left: usize,
pub mode_size: usize,
pub rank_right: usize,
}Expand description
A single TT-core: 3D tensor of shape (rank_left, mode_size, rank_right)
Fields§
§data: Vec<f64>Core data in row-major order: [rank_left, mode_size, rank_right]
rank_left: usizeLeft rank
mode_size: usizeMode size
rank_right: usizeRight rank
Implementations§
Source§impl TTCore
impl TTCore
Sourcepub fn new(
data: Vec<f64>,
rank_left: usize,
mode_size: usize,
rank_right: usize,
) -> Self
pub fn new( data: Vec<f64>, rank_left: usize, mode_size: usize, rank_right: usize, ) -> Self
Create new TT-core
Sourcepub fn get_matrix(&self, i: usize) -> Vec<f64>
pub fn get_matrix(&self, i: usize) -> Vec<f64>
Get the (r_l × r_r) matrix for index i
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TTCore
impl RefUnwindSafe for TTCore
impl Send for TTCore
impl Sync for TTCore
impl Unpin for TTCore
impl UnwindSafe for TTCore
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