Search in sources :

Example 6 with VectorBlockEntry

use of org.apache.ignite.ml.math.impls.vector.VectorBlockEntry in project ignite by apache.

the class BlockVectorStorage method getEntryById.

/**
 */
private VectorBlockEntry getEntryById(long blockId) {
    VectorBlockKey key = getCacheKey(blockId);
    VectorBlockEntry entry = cache.localPeek(key, CachePeekMode.PRIMARY);
    entry = entry != null ? entry : cache.get(key);
    if (entry == null)
        entry = getEmptyBlockEntry(blockId);
    return entry;
}
Also used : VectorBlockKey(org.apache.ignite.ml.math.distributed.keys.impl.VectorBlockKey) VectorBlockEntry(org.apache.ignite.ml.math.impls.vector.VectorBlockEntry)

Aggregations

VectorBlockEntry (org.apache.ignite.ml.math.impls.vector.VectorBlockEntry)6 VectorBlockKey (org.apache.ignite.ml.math.distributed.keys.impl.VectorBlockKey)4 Collection (java.util.Collection)1 Ignite (org.apache.ignite.Ignite)1 ClusterNode (org.apache.ignite.cluster.ClusterNode)1 IgnitePair (org.apache.ignite.internal.util.lang.IgnitePair)1 CardinalityException (org.apache.ignite.ml.math.exceptions.CardinalityException)1 BlockVectorStorage (org.apache.ignite.ml.math.impls.storage.matrix.BlockVectorStorage)1 SparseBlockDistributedVector (org.apache.ignite.ml.math.impls.vector.SparseBlockDistributedVector)1 NotNull (org.jetbrains.annotations.NotNull)1