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-------------------------------------------------------------- }
Sets all elements in this matrix to their absolute values . Note that this operation is in - place .