org.ujmp.core.Matrix.availableCoordinates()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.ujmp.core.Matrix.availableCoordinates()方法的一些代码示例,展示了Matrix.availableCoordinates()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.availableCoordinates()方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:availableCoordinates

Matrix.availableCoordinates介绍

暂无

代码示例

代码示例来源:origin: ujmp/universal-java-matrix-package

public static double calc(Matrix m) {
    double max = -Double.MAX_VALUE;
    double v = 0.0;
    for (long[] c : m.availableCoordinates()) {
      max = (v = m.getAsDouble(c)) > max ? v : max;
    }
    max = max == -Double.MAX_VALUE ? Double.NaN : max;
    return max;
  }
}

代码示例来源:origin: jdmp/java-data-mining-package

public final boolean isDiscrete() {
  for (Sample s : this) {
    Matrix input = s.getAsMatrix(INPUT);
    for (long[] c : input.availableCoordinates()) {
      if (!MathUtil.isDiscrete(input.getAsDouble(c))) {
        return false;
      }
    }
  }
  return true;
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public DiscretizeDictionary(Matrix matrix, Dictionary dictionary) {
  super(matrix);
  this.dictionary = dictionary;
  if (!dictionary.isFixed()) {
    for (long[] c : getSource().availableCoordinates()) {
      dictionary.add(getSource().getAsString(c));
    }
  }
}

代码示例来源:origin: org.ujmp/ujmp-commonsmath

public CommonsMathBlockDenseDoubleMatrix2D(org.ujmp.core.Matrix source) {
  this(source.getSize());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  MapMatrix<String, Object> a = source.getMetaData();
  if (a != null) {
    setMetaData(a.clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public SerializedSparseObjectMatrix(Matrix source) throws IOException {
  this(source.getSize());
  for (long[] c : source.availableCoordinates()) {
    setAsObject(source.getAsObject(c), c);
  }
  MapMatrix<String, Object> a = source.getMetaData();
  if (a != null) {
    setMetaData(a.clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-commonsmath

public CommonsMathArrayDenseDoubleMatrix2D(org.ujmp.core.Matrix source) {
  this(source.getSize());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  MapMatrix<String, Object> a = source.getMetaData();
  if (a != null) {
    setMetaData(a.clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public CommonsMathBlockDenseDoubleMatrix2D(org.ujmp.core.Matrix source) {
  this(source.getSize());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  MapMatrix<String, Object> a = source.getMetaData();
  if (a != null) {
    setMetaData(a.clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public AbstractMapToTiledMatrix2DWrapper(Map<Coordinates, ObjectMatrix2D> map, Matrix source) {
  this(map, source.getRowCount(), source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setObject(source.getAsObject(c), c);
  }
  MapMatrix<String, Object> a = source.getMetaData();
  if (a != null) {
    setMetaData(a.clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-jdbc

public JDBCSparseObjectMatrix(Matrix source) throws ClassNotFoundException, IOException, SQLException {
  this(source.getSize());
  for (long[] c : source.availableCoordinates()) {
    setAsObject(source.getAsObject(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-parallelcolt

public ParallelColtSparseDoubleMatrix2D(Matrix source) {
  this(MathUtil.longToInt(source.getRowCount()), MathUtil.longToInt(source.getColumnCount()));
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-vecmath

public VecMathDenseDoubleMatrix2D(Matrix source) {
  this(MathUtil.longToInt(source.getRowCount()), MathUtil.longToInt(source.getColumnCount()));
  for (long[] c : source.availableCoordinates()) {
    setAsDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public DefaultSparseRowDoubleMatrix2D(Matrix m) {
  super(m.getRowCount(), m.getColumnCount());
  setSize(m.getSize());
  for (long[] c : m.availableCoordinates()) {
    setDouble(m.getAsDouble(c), c);
  }
  if (m.getMetaData() != null) {
    setMetaData(m.getMetaData().clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public ParallelColtSparseDoubleMatrix2D(Matrix source) {
  this(MathUtil.longToInt(source.getRowCount()), MathUtil.longToInt(source.getColumnCount()));
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public JSciDenseDoubleMatrix2D(Matrix source) {
  this(MathUtil.longToInt(source.getRowCount()), MathUtil.longToInt(source.getColumnCount()));
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-colt

public ColtSparseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new SparseDoubleMatrix2D((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-la4j

public La4JDenseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new Basic2DMatrix((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public ColtSparseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new SparseDoubleMatrix2D((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public ColtDenseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new DenseDoubleMatrix2D((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-jama

public JamaDenseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new Jama.Matrix((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

代码示例来源:origin: org.ujmp/ujmp-colt

public ColtDenseDoubleMatrix2D(Matrix source) {
  super(source.getRowCount(), source.getColumnCount());
  this.matrix = new DenseDoubleMatrix2D((int) source.getRowCount(), (int) source.getColumnCount());
  for (long[] c : source.availableCoordinates()) {
    setDouble(source.getAsDouble(c), c);
  }
  if (source.getMetaData() != null) {
    setMetaData(source.getMetaData().clone());
  }
}

相关文章

Matrix类方法