Examples of elementSquaredSum()


Examples of mikera.matrixx.AMatrix.elementSquaredSum()

    private double diffNormF(AMatrix tempA, AMatrix tempB)
    {
        AMatrix temp = tempA.copy();
        temp.sub(tempB);
        double total = temp.elementSquaredSum();
        temp.abs();
        double scale = temp.elementMax();
        return Math.abs(scale-0) > 1e-12 ? total/scale : 0;
    }
View Full Code Here

Examples of mikera.matrixx.impl.SparseColumnMatrix.elementSquaredSum()

    SparseColumnMatrix M=SparseColumnMatrix.create(3, 3);
    Vector v=Vector.of(-1,2,3);
    M.replaceColumn(1, v);

    assertEquals(4, M.elementSum(), 0.01);
    assertEquals(14, M.elementSquaredSum(), 0.01);
    assertEquals(-1, M.elementMin(), 0.01);
    assertEquals(3, M.elementMax(), 0.01);
    assertEquals(3, M.nonZeroCount());

    SparseRowMatrix N = SparseRowMatrix.create(3,3);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.