[−][src]Struct n5::DatasetAttributes
Attributes of a tensor dataset.
Implementations
impl DatasetAttributes
[src]
pub fn coord_iter(&self) -> impl Iterator<Item = Vec<u64>> + ExactSizeIterator
[src]
pub fn bounded_coord_iter(
&self,
bbox: &BoundingBox
) -> impl Iterator<Item = Vec<u64>> + ExactSizeIterator
[src]
&self,
bbox: &BoundingBox
) -> impl Iterator<Item = Vec<u64>> + ExactSizeIterator
pub fn get_bounds(&self) -> BoundingBox
[src]
pub fn get_block_bounds(&self, coord: &GridCoord) -> BoundingBox
[src]
impl DatasetAttributes
[src]
pub fn new(
dimensions: GridCoord,
block_size: BlockCoord,
data_type: DataType,
compression: CompressionType
) -> DatasetAttributes
[src]
dimensions: GridCoord,
block_size: BlockCoord,
data_type: DataType,
compression: CompressionType
) -> DatasetAttributes
pub fn get_dimensions(&self) -> &[u64]
[src]
pub fn get_block_size(&self) -> &[u32]
[src]
pub fn get_data_type(&self) -> &DataType
[src]
pub fn get_compression(&self) -> &CompressionType
[src]
pub fn get_ndim(&self) -> usize
[src]
pub fn get_num_elements(&self) -> usize
[src]
Get the total number of elements possible given the dimensions.
pub fn get_block_num_elements(&self) -> usize
[src]
Get the total number of elements possible in a block.
pub fn get_grid_extent(&self) -> GridCoord
[src]
Get the upper bound extent of grid coordinates.
pub fn get_num_blocks(&self) -> u64
[src]
Get the total number of blocks.
use n5::prelude::*; use n5::smallvec::smallvec; let attrs = DatasetAttributes::new( smallvec![50, 40, 30], smallvec![11, 10, 10], DataType::UINT8, n5::compression::CompressionType::default(), ); assert_eq!(attrs.get_num_blocks(), 60);
pub fn in_bounds(&self, grid_position: &GridCoord) -> bool
[src]
Check whether a block grid position is in the bounds of this dataset.
use n5::prelude::*; use n5::smallvec::smallvec; let attrs = DatasetAttributes::new( smallvec![50, 40, 30], smallvec![11, 10, 10], DataType::UINT8, n5::compression::CompressionType::default(), ); assert!(attrs.in_bounds(&smallvec![4, 3, 2])); assert!(!attrs.in_bounds(&smallvec![5, 3, 2]));
Trait Implementations
impl Clone for DatasetAttributes
[src]
fn clone(&self) -> DatasetAttributes
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DatasetAttributes
[src]
impl<'de> Deserialize<'de> for DatasetAttributes
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<DatasetAttributes> for DatasetAttributes
[src]
fn eq(&self, other: &DatasetAttributes) -> bool
[src]
fn ne(&self, other: &DatasetAttributes) -> bool
[src]
impl Serialize for DatasetAttributes
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for DatasetAttributes
[src]
Auto Trait Implementations
impl RefUnwindSafe for DatasetAttributes
impl Send for DatasetAttributes
impl Sync for DatasetAttributes
impl Unpin for DatasetAttributes
impl UnwindSafe for DatasetAttributes
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,