pub struct AxisMetadata {
pub var_to_axis: IndexMap<String, usize>,
pub axis_to_domain: IndexMap<usize, String>,
pub axis_to_char: IndexMap<usize, char>,
}Expand description
Axis metadata linking variables to tensor dimensions
Fields§
§var_to_axis: IndexMap<String, usize>§axis_to_domain: IndexMap<usize, String>§axis_to_char: IndexMap<usize, char>Implementations§
Source§impl AxisMetadata
impl AxisMetadata
pub fn new() -> Self
pub fn assign( &mut self, var: impl Into<String>, domain: impl Into<String>, ) -> usize
pub fn get_axis(&self, var: &str) -> Option<usize>
pub fn get_domain(&self, axis: usize) -> Option<&str>
pub fn get_char(&self, axis: usize) -> Option<char>
pub fn build_spec(&self, vars: &[String]) -> String
Trait Implementations§
Source§impl Clone for AxisMetadata
impl Clone for AxisMetadata
Source§fn clone(&self) -> AxisMetadata
fn clone(&self) -> AxisMetadata
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 moreSource§impl Debug for AxisMetadata
impl Debug for AxisMetadata
Source§impl Default for AxisMetadata
impl Default for AxisMetadata
Source§impl<'de> Deserialize<'de> for AxisMetadata
impl<'de> Deserialize<'de> for AxisMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AxisMetadata
impl RefUnwindSafe for AxisMetadata
impl Send for AxisMetadata
impl Sync for AxisMetadata
impl Unpin for AxisMetadata
impl UnwindSafe for AxisMetadata
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