code: private static Double[] double2DToDouble ( double[][] dd )
      {
          Double[] d = new Double[ dd.length*dd[0].length ];
          for ( int n = 0; n < dd[0].length; n++ )
          {
              for ( int m = 0; m < dd.length; m++ )
              {
                  d[ m+n*dd.length ] = dd[m][n]; 
              }
          }
          return d;
      }
docs: Converts double[][] to Double[]
  
  @param dd
  @return