Examples of reshape()


Examples of javax.swing.JInternalFrame.reshape()

                {
                  // Ignore.
                }
              }

              frame.reshape(xPos, yPos, width, height);
              xPos += width;
            }
          }
          xPos = 0;
          yPos += height;
View Full Code Here

Examples of javax.swing.JInternalFrame.reshape()

              frame.setMaximum(false);
            } catch (PropertyVetoException ex) {
              throw new RuntimeException(ex);
            }
          }
          frame.reshape(x, y, newWidth, newHeight);
          x += newWidth;
        }
      }
      x = 0;
      y += newHeight;
View Full Code Here

Examples of mikera.matrixx.Matrix.reshape()

        // see if there are any real eigenvectors
        if( N == off )
            return;

//        A.reshape(N-off,N, false);
        A = A.reshape(N-off, N);
       
        AltLU lu = new AltLU();
        lu._decompose(A);
        assertFalse(lu.isSingular());
//        assertTrue(MatrixFeatures.isRowsLinearIndependent(A));
View Full Code Here

Examples of mikera.matrixx.Matrix.reshape()

        // see if Q has the expected properties
        assertTrue(Q.isOrthogonal(1e-8));

        // see if it has the expected properties
        R = R.reshape(A.rowCount(), A.columnCount());
        Matrix A_found = Multiplications.multiply(Q, R);

        A.epsilonEquals(A_found,1e-6);
        assertTrue(Multiplications.multiply(Q.getTranspose(),A).epsilonEquals(R,1e-6));
    }
View Full Code Here

Examples of mikera.vectorz.AVector.reshape()

    a.toDoubleBuffer(buf);
    assertEquals(0, buf.remaining());
    buf.flip();
    AVector vv = Vectorz.create(buf);
    assertEquals(a.asVector(), vv);
    assertEquals(a, vv.reshape(a.getShape()));
  }

  private void testMultiply(INDArray a) {
    assertTrue(a.scaleCopy(0.0).isZero());
    assertEquals(a, a.scaleCopy(1.0));
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F.reshape()

    public void reshape() {
        SimpleMatrix a = SimpleMatrix.random(3,3, 0, 1, rand);
        DenseMatrix64F b = a.mat.copy();

        a.reshape(2,3);
        b.reshape(2,3, false);

        EjmlUnitTests.assertEquals(b,a.mat,1e-8);
    }

    @Test
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F.reshape()

    @Test
    public void elementSum() {
        DenseMatrix64F M = RandomMatrices.createRandom(5,5,rand);
        // make it smaller than the original size to make sure it is bounding
        // the summation correctly
        M.reshape(4,3, false);

        double sum = 0;
        for( int i = 0; i < M.numRows; i++ ) {
            for( int j = 0; j < M.numCols; j++ ) {
                sum += M.get(i,j);
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F.reshape()

    @Test
    public void elementSumAbs() {
        DenseMatrix64F M = RandomMatrices.createRandom(5,5,rand);
        // make it smaller than the original size to make sure it is bounding
        // the summation correctly
        M.reshape(4,3, false);

        double sum = 0;
        for( int i = 0; i < M.numRows; i++ ) {
            for( int j = 0; j < M.numCols; j++ ) {
                sum += Math.abs(M.get(i,j));
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F.reshape()

        // check tall matrix
        CommonOps.transpose(A);
        CommonOps.transpose(A_inv);
        b = new DenseMatrix64F(4,1,true,3,4,5,6);
        x.reshape(2,1);
        found.reshape(4,1);

        CommonOps.mult(A_inv,b,x);
        CommonOps.mult(A, x, found);

        assertTrue(MatrixFeatures.isIdentical(b,found,1e-4));
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F.reshape()

    public void isVector() {
        DenseMatrix64F a = new DenseMatrix64F(4,4);

        assertFalse(MatrixFeatures.isVector(a));

        a.reshape(3,1, false);
        assertTrue(MatrixFeatures.isVector(a));

        a.reshape(1,3, false);
        assertTrue(MatrixFeatures.isVector(a));
    }
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.