Examples of cols()


Examples of io.crate.action.sql.SQLResponse.cols()

        assertEquals(112, response.rows()[0][0]);

        response = executor.exec("select min(name) from characters");

        assertEquals(1, response.rowCount());
        assertEquals("min(name)", response.cols()[0]);
        assertEquals("Anjie", response.rows()[0][0]);

        response = executor.exec("select avg(age) as median_age from characters");
        assertEquals(1, response.rowCount());
        assertEquals("median_age", response.cols()[0]);
View Full Code Here

Examples of io.crate.action.sql.SQLResponse.cols()

        assertEquals("min(name)", response.cols()[0]);
        assertEquals("Anjie", response.rows()[0][0]);

        response = executor.exec("select avg(age) as median_age from characters");
        assertEquals(1, response.rowCount());
        assertEquals("median_age", response.cols()[0]);
        assertEquals(55.25d, response.rows()[0][0]);

        response = executor.exec("select sum(age) as sum_age from characters");
        assertEquals(1, response.rowCount());
        assertEquals("sum_age", response.cols()[0]);
View Full Code Here

Examples of io.crate.action.sql.SQLResponse.cols()

        assertEquals("median_age", response.cols()[0]);
        assertEquals(55.25d, response.rows()[0][0]);

        response = executor.exec("select sum(age) as sum_age from characters");
        assertEquals(1, response.rowCount());
        assertEquals("sum_age", response.cols()[0]);
        assertEquals(221.0d, response.rows()[0][0]);
    }

    @Test
    public void testGlobalAggregateWithoutNulls() throws Exception {
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array.cols()

        if (a.size() != mA.rows()) {
            fail("'mul' failed");
        }

        final int offset = a.flags().contains(Address.Flags.FORTRAN) ? 1 : 0;
        for (int col=offset; col<a.cols()+offset; col++) {
            if (a.get(col) != 10.0) {
                fail("'mul' failed");
            }
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

        final Array a2 = clone.mul(mB);

        if (a2 == clone) {
            fail("'mul' must return a new instance");
        }
        if (a2.size() != mB.cols()) {
            fail("'mul' failed");
        }

        for (int i=a2.begin(); i<a2.end(); i++) {
            final double elem = aB2.get(i);
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

            fail("addAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (m.get(row, col) != row-offset+5) {
                    fail("addAssign failed");
                }
            }
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

            fail("subAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (m.get(row, col) != row-offset+3) {
                    fail("subAssign failed");
                }
            }
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

            fail("mulAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (!Closeness.isClose(m.get(row, col), (col-offset+1)*2.5)) {
                    fail("mulAssign failed");
                }
            }
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

            fail("divAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (!Closeness.isClose(m.get(row, col), (col-offset+1)/2.5)) {
                    fail("divAssign failed");
                }
            }
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.cols()

        final Matrix m = mA.add(mB);
        if (m == mA) {
            fail("'add' must return a new instance");
        }
        if (m.rows() != mA.rows() || m.cols() != mA.cols()) {
            fail("'add' failed");
        }

        for (int row=0; row<m.rows(); row++) {
            for (int col=0; col<m.cols(); col++) {
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.