Package water.fvec

Examples of water.fvec.Frame.numCols()


    }

    for (long r = 0; r < frame.anyVec().length(); r++) {
      Vector v = null;
      if (isSparse) {
        v = new SequentialAccessSparseVector(frame.numCols());
      } else {
        v = new DenseVector(frame.numCols());
      }

      for (int c = 0; c < frame.numCols(); c++) {
View Full Code Here


    for (long r = 0; r < frame.anyVec().length(); r++) {
      Vector v = null;
      if (isSparse) {
        v = new SequentialAccessSparseVector(frame.numCols());
      } else {
        v = new DenseVector(frame.numCols());
      }

      for (int c = 0; c < frame.numCols(); c++) {
        v.setQuick(c, frame.vecs()[c].at(r));
      }
View Full Code Here

        v = new SequentialAccessSparseVector(frame.numCols());
      } else {
        v = new DenseVector(frame.numCols());
      }

      for (int c = 0; c < frame.numCols(); c++) {
        v.setQuick(c, frame.vecs()[c].at(r));
      }

      if (labels != null) {
        writer.append(new Text(labels.atStr(vstr, r).toString()), new VectorWritable(v));
View Full Code Here

   * @return new DRM containing A (element-wise) B.
   */
  public static H2ODrm exec(H2ODrm drmA, final double s, final String op) {
    Frame A = drmA.frame;
    Vec keys = drmA.keys;
    int AewScalar_cols = A.numCols();

    // AewScalar is written into ncs[] with an MRTask on A, and therefore will
    // be similarly partitioned as A.
    Frame AewScalar = new MRTask() {
        private double opfn(String op, double a, double b) {
View Full Code Here

    Frame frame = drm.frame;
    Vec labels = drm.keys;
    Matrix m;

    if (isSparse(frame)) {
      m = new SparseMatrix((int)frame.numRows(), frame.numCols());
    } else {
      m = new DenseMatrix((int)frame.numRows(), frame.numCols());
    }

    int c = 0;
View Full Code Here

    Matrix m;

    if (isSparse(frame)) {
      m = new SparseMatrix((int)frame.numRows(), frame.numCols());
    } else {
      m = new DenseMatrix((int)frame.numRows(), frame.numCols());
    }

    int c = 0;
    // Fill matrix, column at a time.
    for (Vec v : frame.vecs()) {
View Full Code Here

    // Take the result in .atx[], and convert into a Frame
    // using existing helper functions (creating a Matrix
    // along the way for the Helper)
    Vector v = new DenseVector(new MRTaskAtx().doAll(A).atx);
    Matrix m = new DenseMatrix(A.numCols(), 1);
    m.assignColumn(0, v);
    return H2OHelper.drmFromMatrix(m, -1, -1);
  }
}
View Full Code Here

      if( sb.length()!=0 ) sb.append("\n");
      if (env.isAry()) {
        Frame fr = env.popAry();
        cascade._key = fr._key;
        cascade._num_rows = fr.numRows();
        cascade._num_cols = fr.numCols();
        cascade._col_names = fr.names();
        cascade._string = null;
        //TODO: colSummary  cols = new Inspect2.ColSummary[num_cols];
      } else if (env.isNum()) {
        cascade._scalar = env.popDbl();
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.