<p>Performs absolute value of a matrix:<br>
<br>
a = abs(a)<br>
a<sub>ij</sub> = abs(a<sub>ij</sub>)
</p>

@param a A matrix. Modified.
359650
public static void abs(DMatrixD1 a ) {
        final int length = a.getNumElements();

        for ( int i = 0; i < length; i++ ) {
            a.data[i] = Math.abs(a.data[i]);
        }
    }
964415
@Override
    public boolean setA(DMatrixRMaj A) {
        blockA.reshape(A.numRows,A.numCols,false);
        MatrixOps_DDRB.convert(A,blockA);

        return alg.setA(blockA);
    }
819024
public static void standard(DMatrix1Row A, DMatrix1Row A_tran)
    {
        int index = 0;
        for( int i = 0; i < A_tran.numRows; i++ ) {
            int index2 = i;

            int end = index + A_tran.numCols;
            while( index < end ) {
                A_tran.data[index++ ] = A.data[ index2 ];
                index2 += A.numCols;
            }
        }
    }
1145792
public static void multRow(Matrix A, int i, double c)
    {
        multRow(A, i, 0, A.cols(), c);
    }
823767
public static void scale( double alpha , DMatrix6 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
        a.a4 *= alpha;
        a.a5 *= alpha;
        a.a6 *= alpha;
    }
192302
public static void changeSign( DMatrix2 a )
    {
        a.a1 = -a.a1;
        a.a2 = -a.a2;
    }
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;
    }
1130591
public static void divide( DMatrix2x2 a , double alpha ) {
        a.a11 /= alpha; a.a12 /= alpha;
        a.a21 /= alpha; a.a22 /= alpha;
    }
403396
public static IntegerBinding abs(final ObservableIntegerValue a) {
        return createIntegerBinding(() -> Math.abs(a.get()), a);
    }
394707
public static DoubleMatrix absi(DoubleMatrix x) { 
		/*# mapfct('Math.abs') #*/
//RJPP-BEGIN------------------------------------------------------------
	   for (int i = 0; i < x.length; i++)
	      x.put(i, (double) Math.abs(x.get(i)));
	   return x;
//RJPP-END--------------------------------------------------------------
	}
713083
private void computeA( DenseMatrix64F A , DenseMatrix64F H , double lambda )
    {
        final int numParam = param.getNumElements();

        A.set(H);
        for( int i = 0; i < numParam; i++ ) {
            A.set(i,i, A.get(i,i) + lambda);
        }
    }
938622
public double rcond(Matrix A) {
        if (n != A.numRows())
            throw new IllegalArgumentException("n != A.numRows()");
        if (!A.isSquare())
            throw new IllegalArgumentException("!A.isSquare()");

        double anorm = A.norm(Norm.One);

        double[] work = new double[3 * n];
        int[] iwork = new int[n];

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        if (upper)
            LAPACK.getInstance().dpocon(UpLo.Upper.netlib(), n, Cu.getData(),
                    Matrices.ld(n), anorm, rcond, work, iwork, info);
        else
            LAPACK.getInstance().dpocon(UpLo.Lower.netlib(), n, Cl.getData(),
                    Matrices.ld(n), anorm, rcond, work, iwork, info);

        if (info.val < 0)
            throw new IllegalArgumentException();

        return rcond.val;
    }
956647
@Override
    public Matrix applyCommon(Matrix a, Matrix b) {
        int n = a.rows() * b.rows();
        int m = a.columns() * b.columns();
        int p = b.rows();
        int q = b.columns();

        Matrix result = a.blankOfShape(n, m);

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                result.set(i, j, a.get(i / p, j / q) * b.get(i % p, j % q));
            }
        }

        return result;
    }
1125824
public static void multRows(double[] values, DMatrixRMaj A) {
        if( values.length < A.numRows ) {
            throw new IllegalArgumentException("Not enough elements in values.");
        }

        int index = 0;
        for (int row = 0; row < A.numRows; row++) {
            double v = values[row];
            for (int col = 0; col < A.numCols; col++, index++) {
                A.data[index] *= v;
            }
        }
    }
726928
public static boolean cholL( DMatrix6x6 A ) {

        A.a11 = Math.sqrt(A.a11);
        A.a12 = 0;
        A.a13 = 0;
        A.a14 = 0;
        A.a15 = 0;
        A.a16 = 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.a26 = 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.a36 = 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.a46 = 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);
        A.a56 = 0;
        A.a61 = (A.a61)/A.a11;
        A.a62 = (A.a62-A.a61*A.a21)/A.a22;
        A.a63 = (A.a63-A.a61*A.a31-A.a62*A.a32)/A.a33;
        A.a64 = (A.a64-A.a61*A.a41-A.a62*A.a42-A.a63*A.a43)/A.a44;
        A.a65 = (A.a65-A.a61*A.a51-A.a62*A.a52-A.a63*A.a53-A.a64*A.a54)/A.a55;
        A.a66 = Math.sqrt(A.a66-A.a61*A.a61-A.a62*A.a62-A.a63*A.a63-A.a64*A.a64-A.a65*A.a65);
        return !UtilEjml.isUncountable(A.a66);
    }
910903
public void set( T a ) {
        if( a.getType() == getType() )
            mat.set(a.getMatrix());
        else {
            setMatrix(a.mat.copy());
        }
    }
1292340
public static void scale( double alpha , DMatrix2x2 a ) {
        a.a11 *= alpha; a.a12 *= alpha;
        a.a21 *= alpha; a.a22 *= alpha;
    }