Search in sources :

Example 1 with ElementElementStorage

use of com.tencent.angel.ps.storage.vector.storage.ElementElementStorage in project angel by Tencent.

the class ComplexRowFormat method save.

private void save(ServerAnyAnyRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta partMeta, DataOutputStream output) throws IOException {
    ElementElementStorage storage = row.getStorage();
    ObjectIterator<Object2ObjectMap.Entry<IElement, IElement>> iter = storage.iterator();
    while (iter.hasNext()) {
        Object2ObjectMap.Entry<IElement, IElement> entry = iter.next();
        save(entry.getKey(), entry.getValue(), output);
    }
}
Also used : ElementElementStorage(com.tencent.angel.ps.storage.vector.storage.ElementElementStorage) Entry(java.util.Map.Entry) IElement(com.tencent.angel.ps.storage.vector.element.IElement) Object2ObjectMap(it.unimi.dsi.fastutil.objects.Object2ObjectMap)

Aggregations

IElement (com.tencent.angel.ps.storage.vector.element.IElement)1 ElementElementStorage (com.tencent.angel.ps.storage.vector.storage.ElementElementStorage)1 Object2ObjectMap (it.unimi.dsi.fastutil.objects.Object2ObjectMap)1 Entry (java.util.Map.Entry)1