public static double[][] clone(double[][] source){
  ParamChecks.nullNotPermitted(source,"source");
  double[][] clone=new double[source.length][];
  for (int i=0; i < source.length; i++) {
    if (source[i] != null) {
      double[] row=new double[source[i].length];
      System.arraycopy(source[i],0,row,0,source[i].length);
      clone[i]=row;
    }
  }
  return clone;
}

public static double [ ] [ ] clone ( double [ ] [ ] source ) { ParamChecks . nullNotPermitted ( source , "source" ) ; double [ ] [ ] clone = new double [ source . length ] [ ] ; for ( int i = 0 ; i < source . length ; i ++ ) { if ( source [ i ] != null ) { double [ ] row = new double [ source [ i ] . length ] ; System . arraycopy ( source [ i ] , 0 , row , 0 , source [ i ] . length ) ; clone [ i ] = row ; } } return clone ; }
returns a clone of the specified array .
