Examples of decompose()


Examples of cern.colt.matrix.linalg.LUDecompositionQuick.decompose()

      Assert.assertEquals(i+1, s.j_x[i],comparisonAccuracy);
    verifyAxb(s);
   
    // Test 2
    LUDecompositionQuick solver = new LUDecompositionQuick();
    solver.decompose(testMatrix);solver.setLU(testMatrix);
    solver.solve(x);
    for(int i=0;i<testMatrix.rows();++i)
      Assert.assertEquals(i+1, x.getQuick(i),comparisonAccuracy);
    verifyAxb(s);
View Full Code Here

Examples of cern.colt.matrix.linalg.LUDecompositionQuick.decompose()

    }, IllegalArgumentException.class,"singular");   

    checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LUDecompositionQuick coltSolver = new LUDecompositionQuick();
        coltSolver.decompose(matrix);coltSolver.setLU(matrix);
        coltSolver.solve(x);
      }
    }, IllegalArgumentException.class,"singular");   

    checkForCorrectException(new whatToRun() {
View Full Code Here

Examples of cern.colt.matrix.linalg.LUDecompositionQuick.decompose()

    b.assign(randomGenerator);

    final LSolver solver = new LSolver(matrix,b);
    long tmStarted = new Date().getTime();
    LUDecompositionQuick coltSolver = new LUDecompositionQuick();
    coltSolver.decompose(matrix);coltSolver.setLU(matrix);
   
    DoubleMatrix1D vector = b.copy();
    coltSolver.solve(vector);
    long tmFinished = new Date().getTime();
    System.out.println(" time taken: "+((double)tmFinished-tmStarted)/1000);
View Full Code Here

Examples of cern.colt.matrix.linalg.LUDecompositionQuick.decompose()

   
    if (!singular)
      TestSolver.verifyAxb(solver);
   
    LUDecompositionQuick coltSolver = new LUDecompositionQuick();
    coltSolver.decompose(matrix);coltSolver.setLU(matrix);
    DoubleMatrix1D vector = DoubleFactory1D.dense.make(matrix.rows(), 0);
   
    try
    {
      coltSolver.solve(vector);
View Full Code Here

Examples of cern.colt.matrix.linalg.LUDecompositionQuick.decompose()

   */ 
  public void solveUsingColt()
  {
    LUDecompositionQuick solver = new LUDecompositionQuick();
    DoubleMatrix2D matrix = toDoubleMatrix2D();
    solver.decompose(matrix);solver.setLU(matrix);
    DoubleMatrix1D result = toDoubleMatrix1D();
    solver.solve(result);result.toArray(j_x);   
  }
 
  /** The following two variables are not currently in use.
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.CompositeChannelBuffer.decompose()

            // Make sure the resulting cumulation buffer has no more than the configured components.
            CompositeChannelBuffer composite = (CompositeChannelBuffer) cumulation;
            if (composite.numComponents() >= maxCumulationBufferComponents) {
                currentMessage.setContent(ChannelBuffers.wrappedBuffer(composite.copy(), input));
            } else {
                List<ChannelBuffer> decomposed = composite.decompose(0, composite.readableBytes());
                ChannelBuffer[] buffers = decomposed.toArray(new ChannelBuffer[decomposed.size() + 1]);
                buffers[buffers.length - 1] = input;

                currentMessage.setContent(ChannelBuffers.wrappedBuffer(buffers));
            }
View Full Code Here

Examples of com.geophile.z.Space.decompose()

                    SpatialObject box = BoxLatLon.newBox(lat.subtract(r).doubleValue(),
                                                         lat.add(r).doubleValue(),
                                                         lon.subtract(r).doubleValue(),
                                                         lon.add(r).doubleValue());
                    long[] zValues = new long[box.maxZ()];
                    space.decompose(box, zValues);
                    for (int i = 0; i < box.maxZ(); i++) {
                        long z = zValues[i];
                        if (z != -1L) {
                            ExpressionNode lo = new ConstantExpression(Space.zLo(z), InternalIndexTypes.LONG.instance(true));
                            ExpressionNode hi =  new ConstantExpression(Space.zHi(z), InternalIndexTypes.LONG.instance(true));
View Full Code Here

Examples of io.netty.buffer.CompositeByteBuf.decompose()

    }

    private static void checkContentBuffer(FullHttpRequest aggregatedMessage) {
        CompositeByteBuf buffer = (CompositeByteBuf) aggregatedMessage.content();
        assertEquals(2, buffer.numComponents());
        List<ByteBuf> buffers = buffer.decompose(0, buffer.capacity());
        assertEquals(2, buffers.size());
        for (ByteBuf buf: buffers) {
            // This should be false as we decompose the buffer before to not have deep hierarchy
            assertFalse(buf instanceof CompositeByteBuf);
        }
View Full Code Here

Examples of mikera.matrixx.decompose.impl.eigen.SymmetricQRAlgorithmDecomposition.decompose()

     * @param computeVectors Should it compute the eigenvectors or just eigenvalues.
     * @return an IEigenResult object that represents the solution to the decomposition.
     */
    public static IEigenResult decomposeSymmetric(AMatrix A, boolean computeVectors) {
        SymmetricQRAlgorithmDecomposition alg = new SymmetricQRAlgorithmDecomposition(computeVectors);
        return alg.decompose(A);
    }
    /**
     * <p>
     * Computes the eigenvalues and eigenvectors of a real symmetric matrix. Returns an object that represents
     * the solution of the decomposition.
View Full Code Here

Examples of mikera.matrixx.decompose.impl.hessenberg.TridiagonalDecompositionHouseholder.decompose()

                {-0.397037, 0.623341, 3.571302, -0.239631, -0.264573},
                {0.367426, 0.624798, -0.239631, 3.625034, -0.162896},
                {-0.208338, 0.401906, -0.264573, -0.162896, 3.835783}});

        TridiagonalDecompositionHouseholder tridiag = new TridiagonalDecompositionHouseholder();
        tridiag.decompose(A);

        double diag[] = new double[5];
        double off[] = new double[4];

        tridiag.getDiagonal(diag,off);
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.