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

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

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

Matrix.showGUI介绍

暂无

代码示例

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

public static void main(String[] args) throws Exception {

    // create a matrix representing the local computer with its services
    Matrix localhost = Matrix.Factory.localhostMatrix();

    // show on screen
    localhost.showGUI();

    // double click on matrix entries to navigate and see how everything is
    // a matrix. Have fun exploring, but be careful when you change data!

  }
}

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

public static void main(String[] args) throws Exception {

    // create matrix with random values between 0 and 1
    Matrix rand = Matrix.Factory.rand(100, 10);

    // create matrix with random values between -1 and - 1
    Matrix randn = Matrix.Factory.randn(100, 10);

    // show on screen
    rand.showGUI();
    randn.showGUI();
  }
}

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

public static void main(String[] args) throws Exception {

    // get an image
    InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("org/ujmp/examples/data/bigdata.jpg");

    // load image into matrix. of course, this works with files, too.
    Matrix imageMatrix = new ImageMatrix(is);

    // show on screen
    imageMatrix.showGUI();

    is.close();
  }
}

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

public static void main(String[] args) throws Exception {
  // create matrix with 10 correlated columns, 100 rows, correlation 0.1
  Matrix correlated = Matrix.Factory.correlatedColumns(100, 10, 0.1);
  // calculate similarity and store in new matrix,
  // ignore missing values if present
  Matrix similarity = correlated.cosineSimilarity(Ret.NEW, true);
  // show on screen
  correlated.showGUI();
  similarity.showGUI();
}

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

public static void main(String[] args) throws Exception {
  // create matrix with 10 correlated columns, 100 rows, correlation 0.1
  Matrix correlated = Matrix.Factory.correlatedColumns(100, 10, 0.1);
  // calculate similarity and store in new matrix,
  // ignore missing values if present
  Matrix similarity = correlated.cosineSimilarity(Ret.NEW, true);
  // show on screen
  correlated.showGUI();
  similarity.showGUI();
}

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

public static void main(String args[]) throws Exception {

    // create a matrix from the Mandelbrot set
    Matrix m = new MandelbrotMatrix();

    // show on screen
    m.showGUI();
  }
}

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

public static void main(String[] args) throws Exception {

    // get an image
    InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("org/ujmp/examples/data/bigdata.jpg");

    // load image into matrix. of course, this works with files, too.
    Matrix imageMatrix = new ImageMatrix(is);

    // show on screen
    imageMatrix.showGUI();

    is.close();
  }
}

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

public static void main(String[] args) throws Exception {

    // create matrix with random values between 0 and 1
    Matrix rand = Matrix.Factory.rand(100, 10);

    // create matrix with random values between -1 and - 1
    Matrix randn = Matrix.Factory.randn(100, 10);

    // show on screen
    rand.showGUI();
    randn.showGUI();
  }
}

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

public static void main(String args[]) throws Exception {

    // create a matrix from the Mandelbrot set
    Matrix m = new MandelbrotMatrix();

    // show on screen
    m.showGUI();
  }
}

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

public static void main(String[] args) throws Exception {

    // create a matrix representing the local computer with its services
    Matrix localhost = Matrix.Factory.localhostMatrix();

    // show on screen
    localhost.showGUI();

    // double click on matrix entries to navigate and see how everything is
    // a matrix. Have fun exploring, but be careful when you change data!

  }
}

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

public Object call() {
  Matrix[] result = getMatrixObject().getMatrix().svd();
  result[0].showGUI();
  result[1].showGUI();
  result[2].showGUI();
  return result;
}

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

public static void main(String[] args) throws Exception {
  Matrix m = Matrix.Factory.welcomeMatrix();
  m.showGUI();
}

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

public Object call() {
  Matrix[] result = getMatrixObject().getMatrix().qr();
  result[0].showGUI();
  result[1].showGUI();
  return result;
}

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

public Object call() {
  Matrix[] result = getMatrixObject().getMatrix().lu();
  result[0].showGUI();
  result[1].showGUI();
  return result;
}

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

public Object call() {
  Matrix[] result = getMatrixObject().getMatrix().eig();
  result[0].showGUI();
  result[1].showGUI();
  return result;
}

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

public Map<String, Object> calculateObjects(Map<String, Object> input) {
  Map<String, Object> result = new HashMap<String, Object>();
  Object o = input.get(SOURCE);
  Object ret = null;
  if (o instanceof CoreObject) {
    ret = ((CoreObject) o).showGUI();
  } else if (o instanceof GUIObject) {
    ret = ((GUIObject) o).showGUI();
  } else if (o instanceof Matrix) {
    ret = ((Matrix) o).showGUI();
  } else if (o instanceof JFrame) {
    ((JFrame) o).setVisible(true);
    ret = o;
  } else if (o instanceof Container) {
    JFrame frame = new JFrame();
    frame.setSize(1024, 768);
    frame.setContentPane((Container) o);
    frame.setVisible(true);
  }
  result.put(TARGET, ret);
  return result;
}

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

public void mouseClicked(MouseEvent e) {
  int row = jTable.rowAtPoint(e.getPoint());
  int col = jTable.columnAtPoint(e.getPoint());
  // seems to happen sometimes
  if (row < 0 || col < 0) {
    return;
  }
  if (e.getButton() == MouseEvent.BUTTON3) {
    // right click: show menu
    JPopupMenu popup = new MatrixPopupMenu(null, dataModel, row, col);
    popup.show(jTable, e.getX(), e.getY());
  } else if (e.getButton() == MouseEvent.BUTTON1) {
    // left click: show new window if value is a matrix
    Object o = dataModel.getMatrix().getAsObject(row, col);
    if (o instanceof Matrix) {
      ((Matrix) o).showGUI();
    }
  }
}

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

public void mouseClicked(MouseEvent e) {
  long newRow = getRowPos(e.getY());
  long newCol = getColPos(e.getX());
  if (e.getButton() == MouseEvent.BUTTON3) {
    newRow = newRow < 0 ? 0 : newRow;
    newCol = newCol < 0 ? 0 : newCol;
    newRow = newRow >= matrixGUIObject.getRowCount() ? matrixGUIObject.getRowCount() - 1 : newRow;
    newCol = newCol >= matrixGUIObject.getColumnCount() ? matrixGUIObject.getColumnCount() - 1 : newCol;
    JPopupMenu popup = new MatrixPopupMenu(this, matrixGUIObject, newRow, newCol);
    popup.show(this, e.getX(), e.getY());
  } else if (e.getButton() == MouseEvent.BUTTON1) {
    // left click: show new window if value is a matrix
    Object o = matrixGUIObject.getValueAt(newRow, newCol);
    if (o instanceof Matrix) {
      ((Matrix) o).showGUI();
    }
  }
}

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

public static void main(String[] args) throws Exception {
  // create a very large sparse matrix
  SparseMatrix m1 = SparseMatrix.Factory.zeros(1000000, 500000);
  // set some values
  m1.setAsDouble(MathUtil.nextGaussian(), 0, 0);
  m1.setAsDouble(MathUtil.nextGaussian(), 1, 1);
  for (int i = 0; i < 10000; i++) {
    m1.setAsDouble(MathUtil.nextGaussian(), MathUtil.nextInteger(0, 1000), MathUtil.nextInteger(0, 1000));
  }
  // show on screen
  m1.showGUI();
  // create another matrix
  SparseMatrix m2 = SparseMatrix.Factory.zeros(3000000, 500000);
  // set some values
  m2.setAsDouble(MathUtil.nextGaussian(), 0, 0);
  m2.setAsDouble(MathUtil.nextGaussian(), 1, 1);
  for (int i = 0; i < 10000; i++) {
    m2.setAsDouble(MathUtil.nextGaussian(), MathUtil.nextInteger(0, 1000), MathUtil.nextInteger(0, 1000));
  }
  // show on screen
  m2.showGUI();
  // do some operations
  Matrix m3 = m1.mtimes(m2.transpose());
  // show on screen
  m3.showGUI();
}

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

public static void main(String[] args) throws Exception {
  // create a very large sparse matrix
  SparseMatrix m1 = SparseMatrix.Factory.zeros(1000000, 500000);
  // set some values
  m1.setAsDouble(MathUtil.nextGaussian(), 0, 0);
  m1.setAsDouble(MathUtil.nextGaussian(), 1, 1);
  for (int i = 0; i < 10000; i++) {
    m1.setAsDouble(MathUtil.nextGaussian(), MathUtil.nextInteger(0, 1000), MathUtil.nextInteger(0, 1000));
  }
  // show on screen
  m1.showGUI();
  // create another matrix
  SparseMatrix m2 = SparseMatrix.Factory.zeros(3000000, 500000);
  // set some values
  m2.setAsDouble(MathUtil.nextGaussian(), 0, 0);
  m2.setAsDouble(MathUtil.nextGaussian(), 1, 1);
  for (int i = 0; i < 10000; i++) {
    m2.setAsDouble(MathUtil.nextGaussian(), MathUtil.nextInteger(0, 1000), MathUtil.nextInteger(0, 1000));
  }
  // show on screen
  m2.showGUI();
  // do some operations
  Matrix m3 = m1.mtimes(m2.transpose());
  // show on screen
  m3.showGUI();
}

相关文章

Matrix类方法