Struct tc_tensor::DenseTensor
source · [−]pub struct DenseTensor<FD, FS, D, T, B> { /* private fields */ }
Implementations
sourceimpl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>
sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Consume this DenseTensor
handle and return its underlying DenseAccessor
sourceimpl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
sourcepub async fn create(file: FD, schema: Schema, txn_id: TxnId) -> TCResult<Self>
pub async fn create(file: FD, schema: Schema, txn_id: TxnId) -> TCResult<Self>
Create a new DenseTensor
with the given Schema
.
sourcepub async fn constant<S>(
file: FD,
txn_id: TxnId,
shape: S,
value: Number
) -> TCResult<Self> where
Shape: From<S>,
pub async fn constant<S>(
file: FD,
txn_id: TxnId,
shape: S,
value: Number
) -> TCResult<Self> where
Shape: From<S>,
Create a new DenseTensor
filled with the given value
.
sourcepub async fn range<S>(
file: FD,
txn_id: TxnId,
shape: S,
start: Number,
stop: Number
) -> TCResult<Self> where
Shape: From<S>,
pub async fn range<S>(
file: FD,
txn_id: TxnId,
shape: S,
start: Number,
stop: Number
) -> TCResult<Self> where
Shape: From<S>,
Create a new DenseTensor
filled with a range evenly distributed between start
and stop
.
pub async fn tile(
txn: T,
tensor: DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>,
multiples: Vec<u64>
) -> TCResult<Self>
Trait Implementations
sourceimpl<FD: Clone, FS: Clone, D: Clone, T: Clone, B: Clone> Clone for DenseTensor<FD, FS, D, T, B>
impl<FD: Clone, FS: Clone, D: Clone, T: Clone, B: Clone> Clone for DenseTensor<FD, FS, D, T, B>
sourcefn clone(&self) -> DenseTensor<FD, FS, D, T, B>
fn clone(&self) -> DenseTensor<FD, FS, D, T, B>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<FD, FS, D, T, B> CopyFrom<D, DenseTensor<FD, FS, D, T, B>> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> CopyFrom<D, DenseTensor<FD, FS, D, T, B>> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T, B> Display for DenseTensor<FD, FS, D, T, B> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> Display for DenseTensor<FD, FS, D, T, B> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
sourceimpl<FD, FS, D, T, B> From<B> for DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> From<B> for DenseTensor<FD, FS, D, T, B>
sourceimpl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourcefn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
fn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
Converts to this type from the input type.
sourceimpl<FD, FS, D, T> FromStream for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType> + Send,
impl<FD, FS, D, T> FromStream for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType> + Send,
type Context = T
type Context = T
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
sourcefn from_stream<'life0, 'async_trait, De>(
txn: T,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
fn from_stream<'life0, 'async_trait, De>(
txn: T,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
Parse this value using the given Decoder
.
sourceimpl<FD, FS, D, T, B> Instance for DenseTensor<FD, FS, D, T, B> where
Self: Send + Sync,
impl<FD, FS, D, T, B> Instance for DenseTensor<FD, FS, D, T, B> where
Self: Send + Sync,
sourceimpl<'en, FD, FS, D, T, B> IntoView<'en, D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<'en, FD, FS, D, T, B> IntoView<'en, D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T> Persist<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> Persist<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T> Restore<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> Restore<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T, B> TensorAccess for DenseTensor<FD, FS, D, T, B> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> TensorAccess for DenseTensor<FD, FS, D, T, B> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
sourceimpl<FD, FS, D, T, B, O> TensorBoolean<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B, O> TensorBoolean<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a boolean operation.
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a boolean operation which may ignore right-hand values.
sourcefn and(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn and(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Logical and
sourcefn or(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn or(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Logical or
sourcefn xor(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn xor(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Logical xor
sourceimpl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a boolean operation which may ignore right-hand values.
sourceimpl<FD, FS, D, T, B> TensorBooleanConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> TensorBooleanConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a boolean operation.
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a boolean operation with a result expected to be dense.
sourceimpl<FD, FS, D, T, B, O> TensorCompare<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B, O> TensorCompare<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Compare = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Compare = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result of a comparison operation
type Dense = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Dense = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result of a comparison operation which can only return a dense Tensor
sourcefn eq(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
fn eq(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
Element-wise equality
sourcefn gt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
fn gt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
Element-wise greater-than
sourcefn gte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
fn gte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
Element-wise greater-or-equal
sourcefn lt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
fn lt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
Element-wise less-than
sourcefn lte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
fn lte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
Element-wise less-or-equal
sourcefn ne(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
fn ne(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
Element-wise not-equal
sourceimpl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
sourceimpl<FD, FS, D, T, B> TensorCompareConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> TensorCompareConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
type Compare = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Compare = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The result of a comparison operation
sourceimpl<FD, FS, D, T, B> TensorDiagonal<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorDiagonal<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
type Diagonal = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
type Diagonal = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
The type of Tensor
returned by diagonal
fn diagonal<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<Self::Diagonal>> + Send + 'async_trait>> where
Self: 'async_trait,
sourceimpl<FD, FS, D, T, B> TensorDualIO<D, DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorDualIO<D, DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourceimpl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourceimpl<FD, FS, D, T, B> TensorIO<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorIO<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
sourcefn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>> where
Self: 'async_trait,
fn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>> where
Self: 'async_trait,
Read a single value from this Tensor
.
sourceimpl<FD, FS, D, T, B> TensorIndex<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorIndex<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseWrite<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
type Index = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
type Index = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
The type of Tensor
returned by argmax
.
sourceimpl<FD, FS, D, T, B> TensorInstance for DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> TensorInstance for DenseTensor<FD, FS, D, T, B>
type Dense = DenseTensor<FD, FS, D, T, B>
type Dense = DenseTensor<FD, FS, D, T, B>
A dense representation of this Tensor
type Sparse = SparseTensor<FD, FS, D, T, DenseToSparse<FD, FS, D, T, B>>
type Sparse = SparseTensor<FD, FS, D, T, DenseToSparse<FD, FS, D, T, B>>
A sparse representation of this Tensor
sourcefn into_dense(self) -> Self::Dense
fn into_dense(self) -> Self::Dense
Return a dense representation of this Tensor
.
sourcefn into_sparse(self) -> Self::Sparse
fn into_sparse(self) -> Self::Sparse
Return a sparse representation of this Tensor
.
sourceimpl<FD, FS, D, T, B, O> TensorMath<D, DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B, O> TensorMath<D, DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a math operation
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a math operation which may ignore right-hand-side values
sourcefn add(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn add(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Add two tensors together.
sourcefn div(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn div(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Divide self
by other
.
sourcefn log(self, base: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::LeftCombine>
fn log(self, base: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of self
with respect to the given base
.
sourcefn mul(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn mul(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Multiply two tensors together.
sourcefn pow(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn pow(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Raise self
to the power of other
.
sourcefn sub(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn sub(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Subtract other
from self
.
sourceimpl<FD, FS, D, T, B> TensorMath<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorMath<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a math operation which may ignore right-hand-side values
sourcefn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
fn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of self
with respect to the given base
.
sourcefn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
fn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
Multiply two tensors together.
sourceimpl<FD, FS, D, T, B> TensorMathConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> TensorMathConst for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a math operation
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a math operation with a result expected to be dense
sourceimpl<FD, FS, D, T> TensorPersist for DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
impl<FD, FS, D, T> TensorPersist for DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
type Persistent = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
fn as_persistent(self) -> Option<Self::Persistent>
sourceimpl<FD, FS, D, T, B> TensorReduce<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorReduce<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
type Reduce = DenseTensor<FD, FS, D, T, BlockListReduce<FD, FS, D, T, B>>
type Reduce = DenseTensor<FD, FS, D, T, BlockListReduce<FD, FS, D, T, B>>
The result type of a reduce operation
sourcefn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the maximum of this Tensor
along the given axis
.
sourcefn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the maximum element in this Tensor
.
sourcefn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the minimum of this Tensor
along the given axis
.
sourcefn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the minimum element in this Tensor
.
sourcefn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the product of this Tensor
along the given axis
.
sourcefn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the product of all elements in this Tensor
.
sourcefn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the sum of this Tensor
along the given axis
.
sourcefn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the sum of all elements in this Tensor
.
sourceimpl<FD, FS, D, T, B> TensorTransform for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorTransform for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Broadcast = DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
type Broadcast = DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
A broadcast Tensor
type Cast = DenseTensor<FD, FS, D, T, BlockListCast<FD, FS, D, T, B>>
type Cast = DenseTensor<FD, FS, D, T, BlockListCast<FD, FS, D, T, B>>
A type-cast Tensor
type Expand = DenseTensor<FD, FS, D, T, BlockListExpand<FD, FS, D, T, B>>
type Expand = DenseTensor<FD, FS, D, T, BlockListExpand<FD, FS, D, T, B>>
A Tensor
with an expanded dimension
type Flip = DenseTensor<FD, FS, D, T, BlockListFlip<FD, FS, D, T, B>>
type Flip = DenseTensor<FD, FS, D, T, BlockListFlip<FD, FS, D, T, B>>
A Tensor
flipped around one axis
type Reshape = DenseTensor<FD, FS, D, T, BlockListReshape<FD, FS, D, T, B>>
type Reshape = DenseTensor<FD, FS, D, T, BlockListReshape<FD, FS, D, T, B>>
A reshaped Tensor
type Slice = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Slice>
type Slice = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Slice>
A Tensor
slice
type Transpose = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Transpose>
type Transpose = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Transpose>
A transposed Tensor
sourcefn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
fn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
Broadcast this Tensor
to the given shape
.
sourcefn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>
fn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>
Cast this Tensor
to the given dtype
.
sourcefn expand_dims(self, axis: usize) -> TCResult<Self::Expand>
fn expand_dims(self, axis: usize) -> TCResult<Self::Expand>
Insert a new dimension of size 1 at the given axis
.
sourceimpl<FD, FS, D, T, B> TensorTrig for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
impl<FD, FS, D, T, B> TensorTrig for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
B: DenseAccess<FD, FS, D, T>,
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
The return type of a unary operation
sourceimpl<FD, FS, D, T, B> TensorUnary<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T, B> TensorUnary<D> for DenseTensor<FD, FS, D, T, B> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
B: DenseAccess<FD, FS, D, T>,
D::FileClass: From<TensorType>,
type Txn = T
type Txn = T
The type of Transaction
to expect
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
The return type of a unary operation
sourcefn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
Self: 'async_trait,
fn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
Self: 'async_trait,
Return true
if all elements in this Tensor
are nonzero.
sourceimpl<FD, FS, D, T> Transact for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array> + Transact,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> Transact for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>> where
D: Dir,
T: Transaction<D>,
FD: File<Array> + Transact,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
T: Transaction<D>,
D::FileClass: From<TensorType>,
Auto Trait Implementations
impl<FD, FS, D, T, B> RefUnwindSafe for DenseTensor<FD, FS, D, T, B> where
B: RefUnwindSafe,
D: RefUnwindSafe,
FD: RefUnwindSafe,
FS: RefUnwindSafe,
T: RefUnwindSafe,
impl<FD, FS, D, T, B> Send for DenseTensor<FD, FS, D, T, B> where
B: Send,
D: Send,
FD: Send,
FS: Send,
T: Send,
impl<FD, FS, D, T, B> Sync for DenseTensor<FD, FS, D, T, B> where
B: Sync,
D: Sync,
FD: Sync,
FS: Sync,
T: Sync,
impl<FD, FS, D, T, B> Unpin for DenseTensor<FD, FS, D, T, B> where
B: Unpin,
D: Unpin,
FD: Unpin,
FS: Unpin,
T: Unpin,
impl<FD, FS, D, T, B> UnwindSafe for DenseTensor<FD, FS, D, T, B> where
B: UnwindSafe,
D: UnwindSafe,
FD: UnwindSafe,
FS: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn 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
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.