Examples of rows()


Examples of edu.ucla.sspace.matrix.SparseMatrix.rows()

                                            DoubleVector newV,
                                            DoubleVector v) {
        // Special case for sparse matrices.
        if (matrix instanceof SparseMatrix) {
            SparseMatrix smatrix = (SparseMatrix) matrix;
            for (int r = 0; r < smatrix.rows(); ++r) {
                double vValue = 0;
                SparseDoubleVector row = smatrix.getRowVector(r);
                int[] nonZeros = row.getNonZeroIndices();
                for (int c : nonZeros)
                    vValue += row.get(c) * newV.get(c);
 
View Full Code Here

Examples of edu.ucla.sspace.matrix.YaleSparseMatrix.rows()

        corpusReader.close();

        // If the term is to be processed using fewer than all of its contexts,
        // then randomly select the maximum allowable contexts from the matrix
        if (maxContextsPerWord < Integer.MAX_VALUE &&
                contextsForCurTerm.rows() > maxContextsPerWord) {
            BitSet randomContexts = Statistics.randomDistribution(
                maxContextsPerWord, contextsForCurTerm.rows());
            contextsForCurTerm =
                new SparseRowMaskedMatrix(contextsForCurTerm, randomContexts);
        }
View Full Code Here

Examples of edu.ucla.sspace.matrix.YaleSparseMatrix.rows()

        // If the term is to be processed using fewer than all of its contexts,
        // then randomly select the maximum allowable contexts from the matrix
        if (maxContextsPerWord < Integer.MAX_VALUE &&
                contextsForCurTerm.rows() > maxContextsPerWord) {
            BitSet randomContexts = Statistics.randomDistribution(
                maxContextsPerWord, contextsForCurTerm.rows());
            contextsForCurTerm =
                new SparseRowMaskedMatrix(contextsForCurTerm, randomContexts);
        }
       
        return contextsForCurTerm;
View Full Code Here

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

    @Test
    public void testXContentInt() throws Exception {
        SQLResponse r = new SQLResponse();
        r.cols(new String[]{"col1", "col2"});
        r.rows(new Object[][]{new Object[]{1, 2}});
        r.rowCount(1L);
        //System.out.println(json(r));
        JSONAssert.assertEquals(
                "{\"cols\":[\"col1\",\"col2\"],\"rows\":[[1,2]],\"rowcount\":1,\"duration\":-1}",
                json(r), true);
View Full Code Here

Examples of io.crate.executor.TaskResult.rows()

        Job job = executor.newJob(plan);
        ESDeleteByQueryTask task = (ESDeleteByQueryTask) job.tasks().get(0);

        task.start();
        TaskResult taskResult = task.result().get(0).get();
        Object[][] rows = taskResult.rows();
        assertThat(rows.length, is(0));
        assertThat(taskResult.rowCount(), is(-1L));

        // verify deletion
        DocTableInfo characters = docSchemaInfo.getTableInfo("characters");
View Full Code Here

Examples of io.crate.executor.transport.distributed.DistributedResultRequest.rows()

        rows[0] = new Object[] {1, new BytesRef("Arthur")};
        rows[1] = new Object[] {2, new BytesRef("Trillian")};
        rows[2] = new Object[] {3, new BytesRef("Marvin")};

        DistributedResultRequest requestSender = new DistributedResultRequest(contextId, streamers);
        requestSender.rows(rows);

        BytesStreamOutput streamOutput = new BytesStreamOutput();
        requestSender.writeTo(streamOutput);
        // -- end sender
View Full Code Here

Examples of jcgp.backend.resources.Resources.rows()

    super();
   
    final Resources resources = gui.getExperiment().getResources();
    this.parent = parent;
   
    rows = resources.rows();
    columns = resources.columns();
   
    connectionLines = new ArrayList<Line>();
   
    content = new Pane();
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.matrix.ByteMatrix.rows()

    public void testCreateDiagonalMatrix_3x3() {

        byte diagonal[] = new byte[] {1, 2, 3};
        ByteMatrix a = factory().createDiagonalMatrix(diagonal);

        assertEquals(3, a.rows());
        assertEquals(3, a.columns());

        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (i == j) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.orc.Reader.rows()

                        path,
                        offset,
                        fragmentSize));
            }
            boolean[] availableColumns = computeAvailableColumns(orc);
            reader = orc.rows(offset, fragmentSize, availableColumns);
            currentReader = reader;
        }
        return reader;
    }
View Full Code Here

Examples of org.apache.mahout.math.matrix.DoubleMatrix2D.rows()

            }
        }

        // Convert stemsToInclude into tdMatrixStemIndices
        final IntIntOpenHashMap stemToRowIndex = new IntIntOpenHashMap();
        for (int i = 0; i < stemWeightOrder.length && i < tdMatrix.rows(); i++)
        {
            stemToRowIndex.put(stemsToInclude[stemWeightOrder[i]], i);
        }

        // Store the results
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.