Search in sources :

Example 11 with GetFunc

use of com.tencent.angel.ml.matrix.psf.get.base.GetFunc in project angel by Tencent.

the class AggrFuncTest method testMax.

@Test
public void testMax() throws InvalidParameterException, InterruptedException, ExecutionException {
    GetFunc func = new Max(w2Client.getMatrixId(), 1);
    double result = ((ScalarAggrResult) w2Client.get(func)).getResult();
    double max = Double.MIN_VALUE;
    for (double x : localArray1) {
        if (max < x)
            max = x;
    }
    Assert.assertEquals(result, max, delta);
}
Also used : GetFunc(com.tencent.angel.ml.matrix.psf.get.base.GetFunc) ScalarAggrResult(com.tencent.angel.ml.matrix.psf.aggr.enhance.ScalarAggrResult)

Aggregations

GetFunc (com.tencent.angel.ml.matrix.psf.get.base.GetFunc)11 ScalarAggrResult (com.tencent.angel.ml.matrix.psf.aggr.enhance.ScalarAggrResult)9 DenseDoubleVector (com.tencent.angel.ml.math.vector.DenseDoubleVector)1 Pull (com.tencent.angel.ml.matrix.psf.aggr.Pull)1 PartitionGetResult (com.tencent.angel.ml.matrix.psf.get.base.PartitionGetResult)1 GetRowResult (com.tencent.angel.ml.matrix.psf.get.single.GetRowResult)1 ByteBuf (io.netty.buffer.ByteBuf)1