Enum tc_collection::tensor::sparse::SparseView
source · pub enum SparseView<Txn, FE> {
Bool(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u8>>),
C32((SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>)),
C64((SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>)),
F32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>),
F64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>),
I16(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i16>>),
I32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i32>>),
I64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i64>>),
U8(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u8>>),
U16(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u16>>),
U32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u32>>),
U64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u64>>),
}
Variants§
Bool(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u8>>)
C32((SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>))
C64((SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>))
F32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>)
F64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>)
I16(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i16>>)
I32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i32>>)
I64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, i64>>)
U8(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u8>>)
U16(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u16>>)
U32(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u32>>)
U64(SparseTensor<Txn, FE, SparseAccess<Txn, FE, u64>>)
Implementations§
source§impl<Txn, FE> SparseView<Txn, FE>
impl<Txn, FE> SparseView<Txn, FE>
Trait Implementations§
source§impl<Txn, FE> Clone for SparseView<Txn, FE>
impl<Txn, FE> Clone for SparseView<Txn, FE>
source§impl<Txn, FE> CopyFrom<FE, SparseView<Txn, FE>> for SparseBase<Txn, FE>
impl<Txn, FE> CopyFrom<FE, SparseView<Txn, FE>> for SparseBase<Txn, FE>
source§impl<Txn: ThreadSafe, FE: ThreadSafe> Debug for SparseView<Txn, FE>
impl<Txn: ThreadSafe, FE: ThreadSafe> Debug for SparseView<Txn, FE>
source§impl<Txn, FE> From<(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>)> for SparseView<Txn, FE>
impl<Txn, FE> From<(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>)> for SparseView<Txn, FE>
source§fn from(
tensors: (SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>)
) -> Self
fn from( tensors: (SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>) ) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>)> for SparseView<Txn, FE>
impl<Txn, FE> From<(SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>)> for SparseView<Txn, FE>
source§fn from(
tensors: (SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>)
) -> Self
fn from( tensors: (SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>, SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>) ) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<Sparse<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> From<Sparse<Txn, FE>> for SparseView<Txn, FE>
source§impl<Txn, FE> From<SparseBase<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> From<SparseBase<Txn, FE>> for SparseView<Txn, FE>
source§fn from(base: SparseBase<Txn, FE>) -> Self
fn from(base: SparseBase<Txn, FE>) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>> for SparseView<Txn, FE>
impl<Txn, FE> From<SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>> for SparseView<Txn, FE>
source§fn from(tensor: SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>) -> Self
fn from(tensor: SparseTensor<Txn, FE, SparseAccess<Txn, FE, f32>>) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>> for SparseView<Txn, FE>
impl<Txn, FE> From<SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>> for SparseView<Txn, FE>
source§fn from(tensor: SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>) -> Self
fn from(tensor: SparseTensor<Txn, FE, SparseAccess<Txn, FE, f64>>) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<SparseView<Txn, FE>> for Sparse<Txn, FE>
impl<Txn, FE> From<SparseView<Txn, FE>> for Sparse<Txn, FE>
source§fn from(view: SparseView<Txn, FE>) -> Self
fn from(view: SparseView<Txn, FE>) -> Self
Converts to this type from the input type.
source§impl<Txn, FE> From<SparseView<Txn, FE>> for Tensor<Txn, FE>
impl<Txn, FE> From<SparseView<Txn, FE>> for Tensor<Txn, FE>
source§fn from(sparse: SparseView<Txn, FE>) -> Self
fn from(sparse: SparseView<Txn, FE>) -> Self
Converts to this type from the input type.
source§impl<State> Route<State> for SparseView<State::Txn, State::FE>where
State: StateInstance + From<Tensor<State::Txn, State::FE>> + From<Tuple<Value>>,
State::Class: From<NumberType>,
State::FE: DenseCacheFile + AsType<Node>,
Number: TryCastFrom<State>,
Tensor<State::Txn, State::FE>: TryCastFrom<State>,
Value: TryCastFrom<State>,
bool: TryCastFrom<State>,
impl<State> Route<State> for SparseView<State::Txn, State::FE>where
State: StateInstance + From<Tensor<State::Txn, State::FE>> + From<Tuple<Value>>,
State::Class: From<NumberType>,
State::FE: DenseCacheFile + AsType<Node>,
Number: TryCastFrom<State>,
Tensor<State::Txn, State::FE>: TryCastFrom<State>,
Value: TryCastFrom<State>,
bool: TryCastFrom<State>,
source§impl<Txn, FE> TensorBoolean<SparseView<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> TensorBoolean<SparseView<Txn, FE>> for SparseView<Txn, FE>
§type Combine = SparseView<Txn, FE>
type Combine = SparseView<Txn, FE>
The result type of a boolean operation.
§type LeftCombine = SparseView<Txn, FE>
type LeftCombine = SparseView<Txn, FE>
The result type of a boolean operation which may ignore right-hand values.
source§fn and(self, other: Self) -> TCResult<Self::LeftCombine>
fn and(self, other: Self) -> TCResult<Self::LeftCombine>
Logical and
source§impl<Txn, FE> TensorBooleanConst for SparseView<Txn, FE>
impl<Txn, FE> TensorBooleanConst for SparseView<Txn, FE>
§type Combine = SparseView<Txn, FE>
type Combine = SparseView<Txn, FE>
The return type of a boolean operation.
source§impl<Txn, FE> TensorCast for SparseView<Txn, FE>
impl<Txn, FE> TensorCast for SparseView<Txn, FE>
source§impl<Txn, FE> TensorCompare<SparseView<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> TensorCompare<SparseView<Txn, FE>> for SparseView<Txn, FE>
§type Compare = SparseView<Txn, FE>
type Compare = SparseView<Txn, FE>
The result of a comparison operation
source§impl<Txn, FE> TensorCompareConst for SparseView<Txn, FE>
impl<Txn, FE> TensorCompareConst for SparseView<Txn, FE>
§type Compare = SparseView<Txn, FE>
type Compare = SparseView<Txn, FE>
The result of a comparison operation
source§impl<Txn, FE> TensorCond<SparseView<Txn, FE>, SparseView<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> TensorCond<SparseView<Txn, FE>, SparseView<Txn, FE>> for SparseView<Txn, FE>
source§impl<Txn, FE> TensorConvert for SparseView<Txn, FE>
impl<Txn, FE> TensorConvert for SparseView<Txn, FE>
§type Sparse = SparseView<Txn, FE>
type Sparse = SparseView<Txn, FE>
A sparse representation of this
Tensor
source§fn into_dense(self) -> Self::Dense
fn into_dense(self) -> Self::Dense
Return a dense representation of this
Tensor
.source§fn into_sparse(self) -> Self::Sparse
fn into_sparse(self) -> Self::Sparse
Return a sparse representation of this
Tensor
.source§impl<Txn, FE> TensorDiagonal for SparseView<Txn, FE>
impl<Txn, FE> TensorDiagonal for SparseView<Txn, FE>
source§impl<Txn: ThreadSafe, FE: ThreadSafe> TensorInstance for SparseView<Txn, FE>
impl<Txn: ThreadSafe, FE: ThreadSafe> TensorInstance for SparseView<Txn, FE>
source§impl<Txn, FE> TensorMatMul<SparseView<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> TensorMatMul<SparseView<Txn, FE>> for SparseView<Txn, FE>
source§impl<Txn, FE> TensorMath<SparseView<Txn, FE>> for SparseView<Txn, FE>
impl<Txn, FE> TensorMath<SparseView<Txn, FE>> for SparseView<Txn, FE>
§type Combine = SparseView<Txn, FE>
type Combine = SparseView<Txn, FE>
The result type of a math operation
§type LeftCombine = SparseView<Txn, FE>
type LeftCombine = SparseView<Txn, FE>
The result type of a math operation which may ignore right-hand-side values
source§fn div(self, other: Self) -> TCResult<Self::LeftCombine>
fn div(self, other: Self) -> TCResult<Self::LeftCombine>
Divide
self
by other
.source§fn log(self, base: Self) -> TCResult<Self::LeftCombine>
fn log(self, base: Self) -> TCResult<Self::LeftCombine>
Element-wise logarithm of
self
with respect to the given base
.source§fn mul(self, other: Self) -> TCResult<Self::LeftCombine>
fn mul(self, other: Self) -> TCResult<Self::LeftCombine>
Multiply two tensors together.
source§fn pow(self, other: Self) -> TCResult<Self::LeftCombine>
fn pow(self, other: Self) -> TCResult<Self::LeftCombine>
Raise
self
to the power of other
.source§impl<Txn, FE> TensorMathConst for SparseView<Txn, FE>
impl<Txn, FE> TensorMathConst for SparseView<Txn, FE>
§type Combine = SparseView<Txn, FE>
type Combine = SparseView<Txn, FE>
The return type of a math operation
source§impl<Txn: ThreadSafe, FE: ThreadSafe> TensorPermitRead for SparseView<Txn, FE>
impl<Txn: ThreadSafe, FE: ThreadSafe> TensorPermitRead for SparseView<Txn, FE>
source§impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorRead for SparseView<Txn, FE>
impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorRead for SparseView<Txn, FE>
source§impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorReduce for SparseView<Txn, FE>
impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorReduce for SparseView<Txn, FE>
§type Reduce = SparseView<Txn, FE>
type Reduce = SparseView<Txn, FE>
The result type of a reduce operation
source§fn all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
fn all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
Return
true
if all elements in this Tensor
are nonzero.source§fn any<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
fn any<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
Return
true
if any element in this Tensor
is nonzero.source§fn max(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
fn max(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
Return the maximum of this
Tensor
along the given axis
.source§fn max_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
fn max_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
Return the maximum element in this
Tensor
.source§fn min(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
fn min(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
Return the minimum of this
Tensor
along the given axis
.source§fn min_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
fn min_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
Return the minimum element in this
Tensor
.source§fn product(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
fn product(self, axes: Axes, keepdims: bool) -> TCResult<Self::Reduce>
Return the product of this
Tensor
along the given axis
.source§fn product_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
fn product_all<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
Return the product of all elements in this
Tensor
.source§impl<Txn, FE> TensorTransform for SparseView<Txn, FE>
impl<Txn, FE> TensorTransform for SparseView<Txn, FE>
§type Broadcast = SparseView<Txn, FE>
type Broadcast = SparseView<Txn, FE>
A broadcast
Tensor
§type Expand = SparseView<Txn, FE>
type Expand = SparseView<Txn, FE>
A
Tensor
with an expanded dimension§type Reshape = SparseView<Txn, FE>
type Reshape = SparseView<Txn, FE>
A reshaped
Tensor
§type Slice = SparseView<Txn, FE>
type Slice = SparseView<Txn, FE>
A
Tensor
slice§type Transpose = SparseView<Txn, FE>
type Transpose = SparseView<Txn, FE>
A transposed
Tensor
source§fn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
fn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
Broadcast this
Tensor
to the given shape
.source§fn expand(self, axes: Axes) -> TCResult<Self::Expand>
fn expand(self, axes: Axes) -> TCResult<Self::Expand>
Insert a new dimension of size 1 at each of the given
axes
.source§impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorTrig for SparseView<Txn, FE>
impl<Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>> TensorTrig for SparseView<Txn, FE>
§type Unary = SparseView<Txn, FE>
type Unary = SparseView<Txn, FE>
The return type of a unary operation
source§impl<Txn, FE> TensorUnary for SparseView<Txn, FE>
impl<Txn, FE> TensorUnary for SparseView<Txn, FE>
§type Unary = SparseView<Txn, FE>
type Unary = SparseView<Txn, FE>
The return type of a unary operation
source§impl<Txn: ThreadSafe, FE: ThreadSafe> TensorUnaryBoolean for SparseView<Txn, FE>
impl<Txn: ThreadSafe, FE: ThreadSafe> TensorUnaryBoolean for SparseView<Txn, FE>
source§impl<Txn, FE> TensorWriteDual<SparseView<Txn, FE>> for SparseBase<Txn, FE>
impl<Txn, FE> TensorWriteDual<SparseView<Txn, FE>> for SparseBase<Txn, FE>
Auto Trait Implementations§
impl<Txn, FE> !RefUnwindSafe for SparseView<Txn, FE>
impl<Txn, FE> Send for SparseView<Txn, FE>
impl<Txn, FE> Sync for SparseView<Txn, FE>
impl<Txn, FE> Unpin for SparseView<Txn, FE>
impl<Txn, FE> !UnwindSafe for SparseView<Txn, FE>
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<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<State, T> Public<State> for T
impl<State, T> Public<State> for T
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value,
value: State
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
params: Map<State>
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.