Examples of MatrixBuilder


Examples of com.mockturtlesolutions.snifflib.util.MatrixBuilder

    this.contentPane = this.getContentPane();
   
    this.contentPane.setLayout(new BoxLayout(this.contentPane,BoxLayout.Y_AXIS));
    this.pH = new DblMatrix(new Double(7.0));
   
    this.matrixBuilder = new MatrixBuilder();
    this.matrixBuilder.setMinVal(new DblMatrix(2.0));
    this.matrixBuilder.setMaxVal(new DblMatrix(12.0));
    this.matrixBuilder.setStepVal(new DblMatrix(25.0));
   
    this.okButton = new JButton("Ok");
View Full Code Here

Examples of edu.ucla.sspace.matrix.MatrixBuilder

            verbose("Generating a new reference set");

            List<SparseDoubleVector> vectors =
                new ArrayList<SparseDoubleVector>();
            // Assume that data is sparse.
            MatrixBuilder builder = new ClutoSparseMatrixBuilder();
            for (int i = 0; i < rows; ++i) {
                int cols = minValues.length;

                // If the average number of values per row is significantly
                // smaller than the total number of columns then select a subset
View Full Code Here

Examples of org.renjin.primitives.matrix.MatrixBuilder

  public static Vector Rrowsum_matrix(Vector x, int ncol, AtomicVector groups, AtomicVector ugroup, boolean naRm) {
   
    int numGroups = ugroup.length();
   
    Matrix source = new Matrix(x, ncol);
    MatrixBuilder result = source.newBuilder(numGroups, ncol);
   
    for(int col=0;col!=ncol;++col) {
     
      // sum the rows in this column by group
     
      double groupSums[] = new double[numGroups];
      for(int row=0;row!=source.getNumRows();++row) {
        int group = ugroup.indexOf(groups, row, 0);
        groupSums[group] += source.getElementAsDouble(row, col);
      }
     
      // copy sums to matrix
      for(int group=0;group!=ugroup.length();++group) {
        result.setValue(group, col, groupSums[group]);
      }
     
    }
    return result.build();
  }
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.