Package org.ejml.data

Examples of org.ejml.data.D1Submatrix64F


        if( A.blockLength != B.blockLength || A.blockLength != C.blockLength )
            throw new IllegalArgumentException("Block lengths are not all the same.");

        final int blockLength = A.blockLength;

        D1Submatrix64F Asub = new D1Submatrix64F(A,0, A.numRows, 0, A.numCols);
        D1Submatrix64F Bsub = new D1Submatrix64F(B,0, B.numRows, 0, B.numCols);
        D1Submatrix64F Csub = new D1Submatrix64F(C,0, C.numRows, 0, C.numCols);

        BlockMultiplication.multTransA(blockLength,Asub,Bsub,Csub);
    }
View Full Code Here


        if( A.blockLength != B.blockLength || A.blockLength != C.blockLength )
            throw new IllegalArgumentException("Block lengths are not all the same.");

        final int blockLength = A.blockLength;

        D1Submatrix64F Asub = new D1Submatrix64F(A,0, A.numRows, 0, A.numCols);
        D1Submatrix64F Bsub = new D1Submatrix64F(B,0, B.numRows, 0, B.numCols);
        D1Submatrix64F Csub = new D1Submatrix64F(C,0, C.numRows, 0, C.numCols);

        BlockMultiplication.multTransB(blockLength,Asub,Bsub,Csub);
    }
View Full Code Here

    public static void solveL( final int blockLength ,
                               final D1Submatrix64F L,
                               final D1Submatrix64F B ,
                               boolean transL ) {

        D1Submatrix64F Y = new D1Submatrix64F(B.original);

        D1Submatrix64F Linner = new D1Submatrix64F(L.original);
        D1Submatrix64F Binner = new D1Submatrix64F(B.original);

        int lengthL = B.row1 - B.row0;

        int startI,stepI;
View Full Code Here

            throw new IllegalArgumentException("Number of columns in R must be equal to the number of rows in B");
        } else if( R.getRows() != lengthR ) {
            throw new IllegalArgumentException("Number of rows in R must be equal to the number of rows in B");
        }

        D1Submatrix64F Y = new D1Submatrix64F(B.original);

        D1Submatrix64F Rinner = new D1Submatrix64F(R.original);
        D1Submatrix64F Binner = new D1Submatrix64F(B.original);

        int startI,stepI;

        if( transR ) {
            startI = 0;
View Full Code Here

     * @param isIdentity If B is an identity matrix.
     */
    public void applyQ( BlockMatrix64F B , boolean isIdentity ) {
        int minDimen = Math.min(dataA.numCols,dataA.numRows);

        D1Submatrix64F subB = new D1Submatrix64F(B);

        W.col0 = W.row0 = 0;
        Y.row1 = W.row1 = dataA.numRows;
        WTA.row0 = WTA.col0 = 0;

View Full Code Here

     * @param B Matrix which Q is applied to.  Modified.
     */
    public void applyQTran( BlockMatrix64F B ) {
        int minDimen = Math.min(dataA.numCols,dataA.numRows);

        D1Submatrix64F subB = new D1Submatrix64F(B);

        W.col0 = W.row0 = 0;
        Y.row1 = W.row1 = dataA.numRows;
        WTA.row0 = WTA.col0 = 0;

View Full Code Here

        int height = Math.min(A.blockLength,A.numRows);
        V.reshape(height,A.numCols,false);
        tmp.reshape(height,A.numCols,false);

        D1Submatrix64F subQ = new D1Submatrix64F(Q);
        D1Submatrix64F subU = new D1Submatrix64F(A);
        D1Submatrix64F subW = new D1Submatrix64F(V);
        D1Submatrix64F tmp = new D1Submatrix64F(this.tmp);


        int N = A.numRows;

        int start = N - N % A.blockLength;
View Full Code Here

        if( orig.numCols != orig.numRows )
            throw new IllegalArgumentException("Input matrix must be square.");

        init(orig);

        D1Submatrix64F subA = new D1Submatrix64F(A);
        D1Submatrix64F subV = new D1Submatrix64F(V);
        D1Submatrix64F subU = new D1Submatrix64F(A);

        int N = orig.numCols;

        for( int i = 0; i < N; i += A.blockLength ) {
//            System.out.println("-------- triag i "+i);
            int height = Math.min(A.blockLength,A.numRows-i);

            subA.col0 = subU.col0 = i;
            subA.row0 = subU.row0 = i;

            subU.row1 = subU.row0 + height;

            subV.col0 = i;
            subV.row1 = height;
            subV.original.reshape(subV.row1,subV.col1,false);

            // bidiagonalize the top row
            TridiagonalBlockHelper.tridiagUpperRow(A.blockLength,subA,gammas,subV);

            // apply Householder reflectors to the lower portion using block multiplication

            if( subU.row1 < orig.numCols) {
                // take in account the 1 in the last row.  The others are skipped over.
                double before = subU.get(A.blockLength-1,A.blockLength);
                subU.set(A.blockLength-1,A.blockLength,1);

                // A = A + U*V^T + V*U^T
                multPlusTransA(A.blockLength,subU,subV,subA);
                multPlusTransA(A.blockLength,subV,subU,subA);

                subU.set(A.blockLength-1,A.blockLength,before);
            }
        }

        return true;
    }
View Full Code Here

    }

    private boolean decomposeLower() {
        int blockLength = T.blockLength;

        D1Submatrix64F subA = new D1Submatrix64F(T);
        D1Submatrix64F subB = new D1Submatrix64F(T);
        D1Submatrix64F subC = new D1Submatrix64F(T);

        for( int i = 0; i < T.numCols; i += blockLength ) {
            int widthA = Math.min(blockLength, T.numCols-i);

            subA.col0 = i;           subA.col1 = i+widthA;
View Full Code Here


    private boolean decomposeUpper() {
        int blockLength = T.blockLength;

        D1Submatrix64F subA = new D1Submatrix64F(T);
        D1Submatrix64F subB = new D1Submatrix64F(T);
        D1Submatrix64F subC = new D1Submatrix64F(T);

        for( int i = 0; i < T.numCols; i += blockLength ) {
            int widthA = Math.min(blockLength, T.numCols-i);

            subA.col0 = i;          subA.col1 = i+widthA;
View Full Code Here

TOP

Related Classes of org.ejml.data.D1Submatrix64F

Copyright © 2018 www.massapicom. 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.