pub struct SparseTensor {
pub type_: Type,
pub shape: Vec<TensorDim>,
pub non_zero_length: i64,
pub sparse_index: SparseTensorIndex,
pub data: Buffer,
}Expand description
The table SparseTensor in the namespace org.apache.arrow.flatbuf
Generated from these locations:
- Table
SparseTensorin the fileSparseTensor.fbs:209
Fields§
§type_: TypeThe type of data contained in a value cell. Currently only fixed-width value types are supported, no strings or nested types.
shape: Vec<TensorDim>The dimensions of the tensor, optionally named.
non_zero_length: i64The number of non-zero values in a sparse tensor.
sparse_index: SparseTensorIndexSparse tensor index
data: BufferThe location and size of the tensor’s data
Implementations§
Source§impl SparseTensor
impl SparseTensor
Sourcepub fn builder() -> SparseTensorBuilder<()>
pub fn builder() -> SparseTensorBuilder<()>
Creates a SparseTensorBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_type_: impl WriteAsUnion<Type>, field_shape: impl WriteAs<Offset<[Offset<TensorDim>]>>, field_non_zero_length: impl WriteAsDefault<i64, i64>, field_sparse_index: impl WriteAsUnion<SparseTensorIndex>, field_data: impl WriteAs<Buffer>, ) -> Offset<Self>
Trait Implementations§
Source§impl Clone for SparseTensor
impl Clone for SparseTensor
Source§fn clone(&self) -> SparseTensor
fn clone(&self) -> SparseTensor
Returns a copy 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 SparseTensor
impl Debug for SparseTensor
Source§impl<'de> Deserialize<'de> for SparseTensor
impl<'de> Deserialize<'de> for SparseTensor
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
Source§impl Hash for SparseTensor
impl Hash for SparseTensor
Source§impl Ord for SparseTensor
impl Ord for SparseTensor
Source§fn cmp(&self, other: &SparseTensor) -> Ordering
fn cmp(&self, other: &SparseTensor) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SparseTensor
impl PartialEq for SparseTensor
Source§impl PartialOrd for SparseTensor
impl PartialOrd for SparseTensor
Source§impl Serialize for SparseTensor
impl Serialize for SparseTensor
Source§impl<'a> TryFrom<SparseTensorRef<'a>> for SparseTensor
impl<'a> TryFrom<SparseTensorRef<'a>> for SparseTensor
impl Eq for SparseTensor
impl StructuralPartialEq for SparseTensor
impl VectorWrite<Offset<SparseTensor>> for SparseTensor
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<SparseTensor>> for SparseTensor
impl WriteAsOffset<SparseTensor> for SparseTensor
impl<T0: WriteAsUnion<Type>, T1: WriteAs<Offset<[Offset<TensorDim>]>>, T2: WriteAsDefault<i64, i64>, T3: WriteAsUnion<SparseTensorIndex>, T4: WriteAs<Buffer>> WriteAsOffset<SparseTensor> for SparseTensorBuilder<(T0, T1, T2, T3, T4)>
impl WriteAsOptional<Offset<SparseTensor>> for SparseTensor
Auto Trait Implementations§
impl Freeze for SparseTensor
impl RefUnwindSafe for SparseTensor
impl Send for SparseTensor
impl Sync for SparseTensor
impl Unpin for SparseTensor
impl UnwindSafe for SparseTensor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more