public void print(PrintWriter output,int w,int d){
  DecimalFormat format=new DecimalFormat();
  format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US));
  format.setMinimumIntegerDigits(1);
  format.setMaximumFractionDigits(d);
  format.setMinimumFractionDigits(d);
  format.setGroupingUsed(false);
  print(output,format,w + 2);
}

public void print ( PrintWriter output , int w , int d ) { DecimalFormat format = new DecimalFormat ( ) ; format . setDecimalFormatSymbols ( new DecimalFormatSymbols ( Locale . US ) ) ; format . setMinimumIntegerDigits ( 1 ) ; format . setMaximumFractionDigits ( d ) ; format . setMinimumFractionDigits ( d ) ; format . setGroupingUsed ( false ) ; print ( output , format , w + 2 ) ; }
print the matrix to the output stream . line the elements up in columns with a fortran - like ' fw . d ' style format .
