pub trait SparseInstance: TensorInstance + Debug {
    type CoordBlock: Access<u64>;
    type ValueBlock: Access<Self::DType>;
    type Blocks: Stream<Item = Result<(Array<u64, Self::CoordBlock>, Array<Self::DType, Self::ValueBlock>), TCError>> + Send;
    type DType: CType + DType;

    // Required methods
    fn blocks<'async_trait>(
        self,
        txn_id: TxnId,
        range: Range,
        order: Axes
    ) -> Pin<Box<dyn Future<Output = Result<Self::Blocks, TCError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn elements<'async_trait>(
        self,
        txn_id: TxnId,
        range: Range,
        order: Axes
    ) -> Pin<Box<dyn Future<Output = Result<Elements<Self::DType>, TCError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn read_value<'life0, 'async_trait>(
        &'life0 self,
        txn_id: TxnId,
        coord: Coord
    ) -> Pin<Box<dyn Future<Output = Result<Self::DType, TCError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn filled_at<'async_trait>(
        self,
        txn_id: TxnId,
        range: Range,
        order: Axes,
        axes: Axes
    ) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'static, Coord>>> + Send + 'async_trait>>
       where Self: Sized + Send + 'async_trait { ... }
}

Required Associated Types§

source

type CoordBlock: Access<u64>

source

type ValueBlock: Access<Self::DType>

source

type Blocks: Stream<Item = Result<(Array<u64, Self::CoordBlock>, Array<Self::DType, Self::ValueBlock>), TCError>> + Send

source

type DType: CType + DType

Required Methods§

source

fn blocks<'async_trait>( self, txn_id: TxnId, range: Range, order: Axes ) -> Pin<Box<dyn Future<Output = Result<Self::Blocks, TCError>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn elements<'async_trait>( self, txn_id: TxnId, range: Range, order: Axes ) -> Pin<Box<dyn Future<Output = Result<Elements<Self::DType>, TCError>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn read_value<'life0, 'async_trait>( &'life0 self, txn_id: TxnId, coord: Coord ) -> Pin<Box<dyn Future<Output = Result<Self::DType, TCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn filled_at<'async_trait>( self, txn_id: TxnId, range: Range, order: Axes, axes: Axes ) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'static, Coord>>> + Send + 'async_trait>>
where Self: Sized + Send + 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Cond, Then, OrElse, T> SparseInstance for SparseCond<Cond, Then, OrElse>
where Cond: SparseInstance<DType = u8>, Then: SparseInstance<DType = T>, OrElse: SparseInstance<DType = T>, T: CType + DType + Debug,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = AccessBuf<Buffer<T>>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCond<Cond, Then, OrElse> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCond<Cond, Then, OrElse> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<FE, T> SparseInstance for SparseVersion<FE, T>
where FE: AsType<Node> + ThreadSafe, T: CType + DType, Number: From<T> + CastInto<T>,

§

type CoordBlock = <SparseFile<FE, T> as SparseInstance>::CoordBlock

§

type ValueBlock = <SparseFile<FE, T> as SparseInstance>::ValueBlock

§

type Blocks = <SparseFile<FE, T> as SparseInstance>::Blocks

§

type DType = <SparseFile<FE, T> as SparseInstance>::DType

source§

impl<FE, T, S> SparseInstance for SparseCow<FE, T, S>
where FE: AsType<Node> + ThreadSafe, T: CType + DType + Debug, S: SparseInstance<DType = T>, Number: CastInto<T>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = AccessBuf<Buffer<T>>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCow<FE, T, S> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCow<FE, T, S> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<L, R, T> SparseInstance for SparseCombine<L, R, T>
where L: SparseInstance<DType = T>, R: SparseInstance<DType = T>, T: CType + DType + PartialEq + Debug, Accessor<T>: From<L::ValueBlock> + From<R::ValueBlock>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCombine<L, R, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCombine<L, R, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<L, R, T> SparseInstance for SparseCombineLeft<L, R, T>
where L: SparseInstance<DType = T>, R: SparseInstance<DType = T>, T: CType + DType + PartialEq + Debug, Accessor<T>: From<L::ValueBlock> + From<R::ValueBlock>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCombineLeft<L, R, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCombineLeft<L, R, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<S> SparseInstance for SparseSlice<S>
where S: SparseInstance,

source§

impl<S> SparseInstance for SparseTranspose<S>
where S: SparseInstance,

source§

impl<S, T> SparseInstance for SparseCombineConst<S, T>
where S: SparseInstance<DType = T>, T: CType + DType, Accessor<T>: From<S::ValueBlock>, Accessor<u64>: From<S::CoordBlock>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCombineConst<S, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCombineConst<S, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<S: SparseInstance + Clone> SparseInstance for SparseBroadcastAxis<S>

source§

impl<S: SparseInstance> SparseInstance for SparseExpand<S>

source§

impl<S: SparseInstance> SparseInstance for SparseReshape<S>

source§

impl<S: SparseInstance<DType = T>, T: CType + DType> SparseInstance for SparseUnary<S, T>
where Accessor<T>: From<S::ValueBlock>,

§

type CoordBlock = <S as SparseInstance>::CoordBlock

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseUnary<S, T> as SparseInstance>::CoordBlock, Platform>, Array<<S as SparseInstance>::DType, <SparseUnary<S, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseAccess<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + AsType<Buffer<T>>, T: CType + DType + Debug, Buffer<T>: FromStream<Context = ()>, Number: From<T> + CastInto<T>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseAccess<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseAccess<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseBroadcast<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + AsType<Buffer<T>>, T: CType + DType + Debug, Buffer<T>: FromStream<Context = ()>, Number: From<T> + CastInto<T>,

§

type CoordBlock = AccessBuf<Buffer<u64>>

§

type ValueBlock = AccessBuf<Buffer<<SparseBroadcast<Txn, FE, T> as SparseInstance>::DType>>

§

type Blocks = BlockCoords<Pin<Box<dyn Stream<Item = Result<(SmallVec<[u64; 8]>, <SparseBroadcast<Txn, FE, T> as SparseInstance>::DType), TCError>> + Send>>, <SparseBroadcast<Txn, FE, T> as SparseInstance>::DType>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseCompare<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>, T: CType + DType,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCompare<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCompare<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseCompareConst<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>, T: CType + DType + Debug, Number: From<T> + CastInto<T>,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCompareConst<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCompareConst<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseCompareLeft<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>, T: CType + DType,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseCompareLeft<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseCompareLeft<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseDense<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Buffer<T>> + AsType<Node>, T: CType + DType + Debug, Buffer<T>: FromStream<Context = ()>, Number: From<T> + CastInto<T>,

§

type CoordBlock = AccessBuf<Vec<u64>>

§

type ValueBlock = AccessBuf<Vec<T>>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseDense<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseDense<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseReduce<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Buffer<T>> + AsType<Node>, T: CType + DType + Debug, Buffer<T>: FromStream<Context = ()>, Number: From<T> + CastInto<T>,

§

type CoordBlock = AccessBuf<Buffer<u64>>

§

type ValueBlock = AccessBuf<Buffer<T>>

§

type Blocks = BlockCoords<Pin<Box<dyn Stream<Item = Result<(SmallVec<[u64; 8]>, <SparseReduce<Txn, FE, T> as SparseInstance>::DType), TCError>> + Send>>, <SparseReduce<Txn, FE, T> as SparseInstance>::DType>

§

type DType = T

source§

impl<Txn, FE, T> SparseInstance for SparseUnaryCast<Txn, FE, T>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>, T: CType + DType,

§

type CoordBlock = Accessor<u64>

§

type ValueBlock = Accessor<T>

§

type Blocks = Pin<Box<dyn Stream<Item = Result<(Array<u64, <SparseUnaryCast<Txn, FE, T> as SparseInstance>::CoordBlock, Platform>, Array<T, <SparseUnaryCast<Txn, FE, T> as SparseInstance>::ValueBlock, Platform>), TCError>> + Send>>

§

type DType = T