pub struct DataLayout { /* private fields */ }
Implementations§
Source§impl DataLayout
impl DataLayout
pub fn new(model: &DiscreteModel<'_>) -> Self
pub fn tensors(&self) -> impl Iterator<Item = (&String, bool)>
pub fn get_layout(&self, name: &str) -> Option<&ArcLayout>
pub fn is_constant(&self, name: &str) -> bool
pub fn get_data_index(&self, name: &str) -> Option<usize>
pub fn format_data(&self, data: &[f64]) -> String
pub fn get_tensor_data(&self, name: &str) -> Option<&[f64]>
pub fn get_tensor_data_mut(&mut self, name: &str) -> Option<&mut [f64]>
pub fn get_data_length(&self, name: &str) -> Option<usize>
pub fn get_layout_index(&self, layout: &ArcLayout) -> Option<usize>
pub fn get_translation_index( &self, from: &ArcLayout, to: &ArcLayout, ) -> Option<usize>
pub fn data(&self) -> &[f64]
pub fn data_mut(&mut self) -> &mut [f64]
pub fn constants(&self) -> &[f64]
pub fn constants_mut(&mut self) -> &mut [f64]
pub fn indices(&self) -> &[i32]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataLayout
impl RefUnwindSafe for DataLayout
impl Send for DataLayout
impl Sync for DataLayout
impl Unpin for DataLayout
impl UnwindSafe for DataLayout
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