Search in sources :

Example 11 with IntIntDenseVectorStorage

use of com.tencent.angel.ml.math2.storage.IntIntDenseVectorStorage in project angel by Tencent.

the class RBLongIntMatrix method diag.

@Override
public Vector diag() {
    int[] resArr = new int[rows.length];
    for (int i = 0; i < rows.length; i++) {
        if (null == rows[i]) {
            resArr[i] = 0;
        } else {
            resArr[i] = rows[i].get(i);
        }
    }
    IntIntDenseVectorStorage storage = new IntIntDenseVectorStorage(resArr);
    return new IntIntVector(getMatrixId(), 0, getClock(), resArr.length, storage);
}
Also used : IntIntVector(com.tencent.angel.ml.math2.vector.IntIntVector) IntIntDenseVectorStorage(com.tencent.angel.ml.math2.storage.IntIntDenseVectorStorage)

Aggregations

IntIntDenseVectorStorage (com.tencent.angel.ml.math2.storage.IntIntDenseVectorStorage)11 IntIntVector (com.tencent.angel.ml.math2.vector.IntIntVector)8 IntIntSortedVectorStorage (com.tencent.angel.ml.math2.storage.IntIntSortedVectorStorage)3 IntIntSparseVectorStorage (com.tencent.angel.ml.math2.storage.IntIntSparseVectorStorage)3 IntIntVectorStorage (com.tencent.angel.ml.math2.storage.IntIntVectorStorage)3 IntDoubleVector (com.tencent.angel.ml.math2.vector.IntDoubleVector)2 PSModel (com.tencent.angel.ml.model.PSModel)2 MatrixClient (com.tencent.angel.psagent.matrix.MatrixClient)2 Worker (com.tencent.angel.worker.Worker)2 Int2IntMap (it.unimi.dsi.fastutil.ints.Int2IntMap)2 Location (com.tencent.angel.common.location.Location)1 AngelException (com.tencent.angel.exception.AngelException)1 TConnection (com.tencent.angel.ipc.TConnection)1 ParameterServerManager (com.tencent.angel.master.ps.ParameterServerManager)1 PSAttempt (com.tencent.angel.master.ps.attempt.PSAttempt)1 AMParameterServer (com.tencent.angel.master.ps.ps.AMParameterServer)1 SplitEntry (com.tencent.angel.ml.GBDT.algo.tree.SplitEntry)1 GBDTGradHistGetRowFunc (com.tencent.angel.ml.GBDT.psf.GBDTGradHistGetRowFunc)1 HistAggrParam (com.tencent.angel.ml.GBDT.psf.HistAggrParam)1 IntDoubleDenseVectorStorage (com.tencent.angel.ml.math2.storage.IntDoubleDenseVectorStorage)1