public static void printFancy(PrintStream out , CMatrix mat , int length ) {
printTypeSize(out, mat);
DecimalFormat format = new DecimalFormat("#");
StringBuilder builder = new StringBuilder(length);
final int cols = mat.getNumCols();
Complex_F32 c = new Complex_F32();
for( int y = 0; y < mat.getNumRows(); y++ ) {
for( int x = 0; x < cols; x++ ) {
mat.get(y,x,c);
String real = fancyString(c.real,format,length,4);
String img = fancyString(c.imaginary,format,length,4);
real = real+padSpace(builder,length-real.length());
img = img+padSpace(builder,length-img.length());
out.print(real+" + "+ img+"i ");
if( x < mat.getNumCols()-1 ) {
out.print(" , ");
}
}
out.println();
}
}