Struct alumina::shape::NodeShape [−][src]
pub struct NodeShape { /* fields omitted */ }
Methods
impl NodeShape
[src]
impl NodeShape
pub fn ndims(&self) -> usize
[src]
pub fn ndims(&self) -> usize
pub fn dimensions(&self) -> &[NodeDim]
[src]
pub fn dimensions(&self) -> &[NodeDim]
pub fn dimensions_mut(&mut self) -> &mut [NodeDim]
[src]
pub fn dimensions_mut(&mut self) -> &mut [NodeDim]
pub fn collapse_dimensions_to_minimum(&mut self)
[src]
pub fn collapse_dimensions_to_minimum(&mut self)
Should be called and only called by operations prior to propagating shape constraints The NodeDim::Interval0 are collapsed to the lower bound, and any NodeDim::Unknown entries will be replaced with 0
pub fn collapse_to_broadcastable_dimension(&self) -> NodeShape
[src]
pub fn collapse_to_broadcastable_dimension(&self) -> NodeShape
Returns a copy of the shape with all dimensions that arent Known(_) set to 1.
pub fn flat_size(&self) -> NodeDim
[src]
pub fn flat_size(&self) -> NodeDim
pub fn force_flat_size(&self) -> Result<usize>
[src]
pub fn force_flat_size(&self) -> Result<usize>
pub fn to_data_shape(&self) -> Result<IxDyn>
[src]
pub fn to_data_shape(&self) -> Result<IxDyn>
If all dimension values are Known
this will
This should generally only be called after collapse_dimensions_to_minimum
pub fn is_known(&self) -> bool
[src]
pub fn is_known(&self) -> bool
pub fn ndim(&self) -> usize
[src]
pub fn ndim(&self) -> usize
pub fn merge(&self, other: &NodeShape) -> Result<NodeShape>
[src]
pub fn merge(&self, other: &NodeShape) -> Result<NodeShape>
Trait Implementations
impl Clone for NodeShape
[src]
impl Clone for NodeShape
fn clone(&self) -> NodeShape
[src]
fn clone(&self) -> NodeShape
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for NodeShape
[src]
impl Debug for NodeShape
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for NodeShape
[src]
impl PartialEq for NodeShape
fn eq(&self, other: &NodeShape) -> bool
[src]
fn eq(&self, other: &NodeShape) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &NodeShape) -> bool
[src]
fn ne(&self, other: &NodeShape) -> bool
This method tests for !=
.
impl<T: Into<NodeDim> + Clone, I: IntoIterator<Item = T>> From<I> for NodeShape
[src]
impl<T: Into<NodeDim> + Clone, I: IntoIterator<Item = T>> From<I> for NodeShape