public function &random($m = null, $n = null, $a = RAND_MIN, $b = RAND_MAX)
    {
        if (is_int($m) && is_int($n) && is_numeric($a) && is_numeric($b)) {
            $R = new Matrix($m, $n);
 
            for ($i = 0; $i < $m; $i++) {
                for ($j = 0; $j < $n; $j++) {
                    $R->set($i, $j, mt_rand($a, $b));
                }
            }
 
            return $R;
        } else {
            trigger_error(ArgumentTypeException, ERROR);
        }
    }
public function &random($m = null, $n = null, $a = RAND_MIN, $b = RAND_MAX)
    {
        if (is_int($m) && is_int($n) && is_numeric($a) && is_numeric($b)) {
            $R = new Matrix($m, $n);
 
            for ($i = 0; $i < $m; $i++) {
                for ($j = 0; $j < $n; $j++) {
                    $R->set($i, $j, mt_rand($a, $b));
                }
            }
 
            return $R;
        } else {
            trigger_error(ArgumentTypeException, ERROR);
        }
    }
public function & random ( $ m = null , $ n = null , $ a = RAND_MIN , $ b = RAND_MAX ) { if ( is_int ( $ m ) && is_int ( $ n ) && is_numeric ( $ a ) && is_numeric ( $ b ) ) { $ R = new Matrix ( $ m , $ n ) ; for ( $ i = 0 ; $ i < $ m ; $ i ++ ) { for ( $ j = 0 ; $ j < $ n ; $ j ++ ) { $ R -> set ( $ i , $ j , mt_rand ( $ a , $ b ) ) ; } } return $ R ; } else { trigger_error ( ArgumentTypeException , ERROR ) ; } }
random
Generate a random matrix
@param int $m Row dimension
@param int $n Column dimension
@return Matrix Random matrix
random Generate a random matrix