Trait tc_tensor::DenseAccess
source · pub trait DenseAccess<FD, FS, D, T>: ReadValueAt<D, Txn = T> + TensorAccess + Clone + Display + Send + Sync + Sized + 'staticwhere
FD: File<Key = u64, Block = Array>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,{
type Slice: DenseAccess<FD, FS, D, T>;
type Transpose: DenseAccess<FD, FS, D, T>;
fn accessor(self) -> DenseAccessor<FD, FS, D, T>;
fn slice(self, bounds: Bounds) -> TCResult<Self::Slice>;
fn transpose(
self,
permutation: Option<Vec<usize>>
) -> TCResult<Self::Transpose>;
fn read_values<'async_trait>(
self,
txn: Self::Txn,
coords: Coords
) -> Pin<Box<dyn Future<Output = TCResult<Array>> + Send + 'async_trait>>
where
Self: 'async_trait;
fn block_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Array>> { ... }
fn value_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Number>> { ... }
}
Expand description
Common DenseTensor
access methods
Required Associated Types§
sourcetype Slice: DenseAccess<FD, FS, D, T>
type Slice: DenseAccess<FD, FS, D, T>
The type returned by slice
sourcetype Transpose: DenseAccess<FD, FS, D, T>
type Transpose: DenseAccess<FD, FS, D, T>
The type returned by transpose
Required Methods§
sourcefn accessor(self) -> DenseAccessor<FD, FS, D, T>
fn accessor(self) -> DenseAccessor<FD, FS, D, T>
Return a DenseAccessor
enum which contains this accessor.
Provided Methods§
sourcefn block_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Array>>
fn block_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Array>>
Return a stream of the Array
s which this DenseTensor
comprises.
sourcefn value_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Number>>
fn value_stream<'a>(
self,
txn: Self::Txn
) -> TCBoxTryFuture<'a, TCBoxTryStream<'a, Number>>
Return a stream of the elements of this DenseTensor
.