public synchronized void setMatrix( D1Matrix64F A ) { double maxValue = CommonOps.elementMaxAbs(A); renderMatrix(A,image,maxValue); repaint(); }
public MatrixComponent( int width , int height ) { image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); setPreferredSize(new Dimension(width,height)); setMinimumSize(new Dimension(width,height)); }
/** * Creates a window visually showing the matrix's state. Block means an element is zero. * Red positive and blue negative. More intense the color larger the element's absolute value * is. * * @param A A matrix. * @param title Name of the window. */ public static void show( D1Matrix64F A , String title ) { JFrame frame = new JFrame(title); int width = 300; int height = 300; if( A.numRows > A.numCols) { width = width*A.numCols/A.numRows; } else { height = height*A.numRows/A.numCols; } MatrixComponent panel = new MatrixComponent(width,height); panel.setMatrix(A); frame.add(panel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } }
/** * Creates a window visually showing the matrix's state. Block means an element is zero. * Red positive and blue negative. More intense the color larger the element's absolute value * is. * * @param A A matrix. * @param title Name of the window. */ public static void show( D1Matrix64F A , String title ) { JFrame frame = new JFrame(title); int width = 300; int height = 300; if( A.numRows > A.numCols) { width = width*A.numCols/A.numRows; } else { height = height*A.numRows/A.numCols; } MatrixComponent panel = new MatrixComponent(width,height); panel.setMatrix(A); frame.add(panel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } }
public MatrixComponent( int width , int height ) { image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); setPreferredSize(new Dimension(width,height)); setMinimumSize(new Dimension(width,height)); }
public synchronized void setMatrix( D1Matrix64F A ) { double maxValue = CommonOps.elementMaxAbs(A); renderMatrix(A,image,maxValue); repaint(); }
/** * Creates a window visually showing the matrix's state. Block means an element is zero. * Red positive and blue negative. More intense the color larger the element's absolute value * is. * * @param A A matrix. * @param title Name of the window. */ public static void show( D1Matrix64F A , String title ) { JFrame frame = new JFrame(title); int width = 300; int height = 300; if( A.numRows > A.numCols) { width = width*A.numCols/A.numRows; } else { height = height*A.numRows/A.numCols; } MatrixComponent panel = new MatrixComponent(width,height); panel.setMatrix(A); frame.add(panel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } }
public MatrixComponent( int width , int height ) { image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); setPreferredSize(new Dimension(width,height)); setMinimumSize(new Dimension(width,height)); }
public synchronized void setMatrix( D1Matrix64F A ) { double maxValue = CommonOps.elementMaxAbs(A); renderMatrix(A,image,maxValue); repaint(); }