Converts 'A' into a block matrix and call setA() on the block matrix solver.

@param A The A matrix in the linear equation. Not modified. Reference saved.
@return true if it can solve the system.
964415
@Override
    public boolean setA(DMatrixRMaj A) {
        blockA.reshape(A.numRows,A.numCols,false);
        MatrixOps_DDRB.convert(A,blockA);

        return alg.setA(blockA);
    }
631931
public static void fill( DMatrix4x4 a , double v  ) {
        a.a11 = v; a.a12 = v; a.a13 = v; a.a14 = v;
        a.a21 = v; a.a22 = v; a.a23 = v; a.a24 = v;
        a.a31 = v; a.a32 = v; a.a33 = v; a.a34 = v;
        a.a41 = v; a.a42 = v; a.a43 = v; a.a44 = v;
    }
1236610
public static void fill( DMatrix3 a , double v  ) {
        a.a1 = v;
        a.a2 = v;
        a.a3 = v;
    }
1253729
public boolean eq(Matrix B) {
        Matrix A = this;
        if (B.M != A.M || B.N != A.N) {
            throw new RuntimeException("Illegal matrix dimensions.");
        }
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                if (A.data[i][j] != B.data[i][j]) {
                    return false;
                }
            }
        }
        return true;
    }
802870
public void setMatrix(int[] r, int j0, int j1, Matrix X)
    {
        try
        {
            for (int i = 0; i < r.length; i++)
            {
                for (int j = j0; j <= j1; j++)
                {
                    A[r[i]][j] = X.get(i, j - j0);
                }
            }
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            throw new ArrayIndexOutOfBoundsException("Submatrix indices");
        }
    }
1163257
public static void fill( DMatrix6x6 a , double v  ) {
        a.a11 = v; a.a12 = v; a.a13 = v; a.a14 = v; a.a15 = v; a.a16 = v;
        a.a21 = v; a.a22 = v; a.a23 = v; a.a24 = v; a.a25 = v; a.a26 = v;
        a.a31 = v; a.a32 = v; a.a33 = v; a.a34 = v; a.a35 = v; a.a36 = v;
        a.a41 = v; a.a42 = v; a.a43 = v; a.a44 = v; a.a45 = v; a.a46 = v;
        a.a51 = v; a.a52 = v; a.a53 = v; a.a54 = v; a.a55 = v; a.a56 = v;
        a.a61 = v; a.a62 = v; a.a63 = v; a.a64 = v; a.a65 = v; a.a66 = v;
    }
437481
@Override
    public boolean setA(DMatrixRMaj A) {
        if( A.numRows < A.numCols )
            throw new IllegalArgumentException("Can't solve for wide systems.  More variables than equations.");
        if( A.numRows > maxRows || A.numCols > maxCols )
            setMaxSize(A.numRows,A.numCols);

        R.reshape(A.numCols,A.numCols);
        a.reshape(A.numRows,1);
        temp.reshape(A.numRows,1);

        _setA(A);
        if( !decomposer.decompose(A) )
            return false;

        gammas = decomposer.getGammas();
        QR = decomposer.getQR();
        decomposer.getR(R,true);
        return true;
    }
457473
protected void updateA( DSubmatrixD1 A )
    {
        setW();

        A.row0 = Y.row0;
        A.row1 = Y.row1;
        A.col0 = Y.col1;
        A.col1 = Y.original.numCols;

        WTA.row0 = 0;
        WTA.col0 = 0;
        WTA.row1 = W.col1-W.col0;
        WTA.col1 = A.col1-A.col0;
        WTA.original.reshape(WTA.row1,WTA.col1,false);

        if( A.col1 > A.col0 ) {
            BlockHouseHolder_DDRB.computeW_Column(blockLength,Y,W,temp, gammas,Y.col0);

            MatrixMult_DDRB.multTransA(blockLength,W,A,WTA);
            BlockHouseHolder_DDRB.multAdd_zeros(blockLength,Y,WTA,A);
        } else if( saveW ) {
            BlockHouseHolder_DDRB.computeW_Column(blockLength,Y,W,temp, gammas,Y.col0);
        }
    }
993831
protected boolean computeH(DMatrixRMaj A, DMatrixRMaj H) {

		if( !solverNullspace.process(A.copy(),1,H) )
			return true;

		H.numRows = 3;
		H.numCols = 3;

		return false;
	}
958854
public static void changeSign( DMatrix3 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
        a.a3 = -a.a3;
    }
226487
public static void abs(DMatrixD1 a , DMatrixD1 c ) {
        c.reshape(a.numRows,a.numCols);

        final int length = a.getNumElements();

        for ( int i = 0; i < length; i++ ) {
            c.data[i] = Math.abs(a.data[i]);
        }
    }
144997
public void setToInverseL( double a[] ) {

        // the more direct method which takes full advantage of the sparsity of the data structures proved to
        // be difficult to get right due to the conjugates and reordering.
        // See comparable real number code for an example.
        for (int col = 0; col < n; col++) {
            Arrays.fill(vv,0);
            vv[col*2] = 1;
            TriangularSolver_ZDRM.solveL_diagReal(t, vv, n);
            TriangularSolver_ZDRM.solveConjTranL_diagReal(t, vv, n);
            for( int i = 0; i < n; i++ ) {
                a[(i*numCols+col)*2  ] = vv[i*2];
                a[(i*numCols+col)*2+1] = vv[i*2+1];
            }
        }
        // NOTE: If you want to make inverse faster take advantage of the sparsity
    }
1220736
public static void fill( DMatrix4 a , double v  ) {
        a.a1 = v;
        a.a2 = v;
        a.a3 = v;
        a.a4 = v;
    }
248740
public static void divide( DMatrix5 a , double alpha ) {
        a.a1 /= alpha;
        a.a2 /= alpha;
        a.a3 /= alpha;
        a.a4 /= alpha;
        a.a5 /= alpha;
    }
217705
public static boolean cholL( DMatrix5x5 A ) {

        A.a11 = Math.sqrt(A.a11);
        A.a12 = 0;
        A.a13 = 0;
        A.a14 = 0;
        A.a15 = 0;
        A.a21 = (A.a21)/A.a11;
        A.a22 = Math.sqrt(A.a22-A.a21*A.a21);
        A.a23 = 0;
        A.a24 = 0;
        A.a25 = 0;
        A.a31 = (A.a31)/A.a11;
        A.a32 = (A.a32-A.a31*A.a21)/A.a22;
        A.a33 = Math.sqrt(A.a33-A.a31*A.a31-A.a32*A.a32);
        A.a34 = 0;
        A.a35 = 0;
        A.a41 = (A.a41)/A.a11;
        A.a42 = (A.a42-A.a41*A.a21)/A.a22;
        A.a43 = (A.a43-A.a41*A.a31-A.a42*A.a32)/A.a33;
        A.a44 = Math.sqrt(A.a44-A.a41*A.a41-A.a42*A.a42-A.a43*A.a43);
        A.a45 = 0;
        A.a51 = (A.a51)/A.a11;
        A.a52 = (A.a52-A.a51*A.a21)/A.a22;
        A.a53 = (A.a53-A.a51*A.a31-A.a52*A.a32)/A.a33;
        A.a54 = (A.a54-A.a51*A.a41-A.a52*A.a42-A.a53*A.a43)/A.a44;
        A.a55 = Math.sqrt(A.a55-A.a51*A.a51-A.a52*A.a52-A.a53*A.a53-A.a54*A.a54);
        return !UtilEjml.isUncountable(A.a55);
    }
518700
@Override
    public void invert(DMatrixRBlock A_inv) {
        int M = Math.min(QR.numRows,QR.numCols);
        if( A_inv.numRows != M || A_inv.numCols != M )
            throw new IllegalArgumentException("A_inv must be square an have dimension "+M);


        // Solve for A^-1
        // Q*R*A^-1 = I

        // Apply householder reflectors to the identity matrix
        // y = Q^T*I = Q^T
        MatrixOps_DDRB.setIdentity(A_inv);
        decomposer.applyQTran(A_inv);

        // Solve using upper triangular R matrix
        // R*A^-1 = y
        // A^-1 = R^-1*y
        TriangularSolver_DDRB.solve(QR.blockLength,true,
                new DSubmatrixD1(QR,0,M,0,M),new DSubmatrixD1(A_inv),false);
    }
28304
public static void fill( DMatrix6 a , double v  ) {
        a.a1 = v;
        a.a2 = v;
        a.a3 = v;
        a.a4 = v;
        a.a5 = v;
        a.a6 = v;
    }