Examples of sum()


Examples of org.encog.mathutil.matrices.Matrix.sum()

 
  public void testSum() throws Throwable
  {
    double doubleData[][] = { {1,2}, {3,4} };
    Matrix matrix = new Matrix(doubleData);
    TestCase.assertEquals((int)matrix.sum(), 1+2+3+4);
  }
 
  public void testRowMatrix() throws Throwable
  {
    double matrixData[] = {1.0,2.0,3.0,4.0};

Examples of org.grouplens.lenskit.vectors.SparseVector.sum()

        ratings.add(Ratings.make(7, 5, 3.5));
        ratings.add(Ratings.make(3, 5, 1.5));
        ratings.add(Ratings.make(8, 5, 2));
        SparseVector v = Ratings.itemRatingVector(ratings);
        assertEquals(3, v.size());
        assertEquals(7, v.sum(), EPSILON);

        long[] keys = {3, 7, 8};
        double[] values = {1.5, 3.5, 2};
        SparseVector sv = MutableSparseVector.wrap(keys, values);
        assertEquals(sv, v);

Examples of org.integratedmodelling.riskwiz.pt.PT.sum()

                ClusterBundle cbundle = clusterHash.get(node);
                SJTVertex jtcluster = cbundle.jtcluster;
                PT utility = jtcluster.getPotential().getProbabilityPotential().clone();

                utility.multiplyBySubtable(node.getDiscreteCPT(), cbundle.fopmap);
                node.setMarginalUtility(utility.sum());
            }

        }
    }

Examples of org.jboss.as.test.smoke.osgi.bundle.SimpleService.sum()

        // Get the service for the reference
        SimpleService service = (SimpleService) context.getService(sref);
        assertNotNull("Service not null", service);

        // Invoke the service
        int sum = service.sum(1, 2, 3);
        assertEquals(6, sum);

        // Stop the bundle
        bundle.stop();
        Assert.assertEquals(Bundle.RESOLVED, bundle.getState());

Examples of org.jboss.test.arquillian.container.bundle.SimpleService.sum()

        // Get the service for the reference
        SimpleService service = context.getService(sref);
        assertNotNull("Service not null", service);

        // Invoke the service
        int sum = service.sum(1, 2, 3);
        assertEquals(6, sum);

        // Stop the bundle
        bundle.stop();
        assertEquals("Bundle RESOLVED", Bundle.RESOLVED, bundle.getState());

Examples of org.jdk8.backport.LongAdder.sum()

                X.println("__ active: " + exec.active());

                Thread.sleep(200);
            }

            assertEquals(threads * loops, sum.sum());

            X.println("_ ok");
        }

        assertTrue(exec.shutdown(0));

Examples of org.knowhowlab.osgi.testing.it.arquillian.simple.bundle.SimpleService.sum()

        // Get the service for the reference
        SimpleService service = (SimpleService) context.getService(sref);
        assertNotNull("Service not null", service);

        // Invoke the service
        int sum = service.sum(1, 2, 3);
        assertEquals(6, sum);

        // Stop the bundle
        bundle.stop();
        assertEquals(Bundle.RESOLVED, bundle.getState());

Examples of org.matrix.Matrix.sum()

    }
    @Test
    public void sumAllElements() {
        double []myData = {1.0, 2.0, 3.0};
        Matrix myMatrix = Matrix.createRowMatrix(myData);
        assertEquals(6.0, myMatrix.sum(), EPSILON);
    }
    @Test
    public void matrixIsVector() {
        double []myData = {1.0, 2.0, 3.0};
        Matrix myRowMatrix = Matrix.createRowMatrix(myData);

Examples of org.outerj.expression.FormulaParser.sum()

*/
public class DefaultExpressionManager implements ExpressionManager, ThreadSafe {
    public Expression parse(String expressionString) throws ParseException, ExpressionException
    {
        FormulaParser parser = new FormulaParser(new java.io.StringReader(expressionString)); //, functionFactory);
        parser.sum();

        Expression expression = parser.getExpression();
        expression.check();

        return expression;

Examples of org.outerj.expression.FormulaParser.sum()

    }
   
    public Expression parse(String expressionString) throws ParseException, ExpressionException {
       
        FormulaParser parser = new FormulaParser(new java.io.StringReader(expressionString), factory);
        parser.sum();

        Expression expression = parser.getExpression();
        expression.check();

        return expression;
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.