toolbox
Class MathFormatter

java.lang.Object
  extended bytoolbox.MathFormatter

public class MathFormatter
extends java.lang.Object

Format mathematical entities (scalars, arrays, matrices) into formats readable by humans or external programs

Author:
Hendrik Dahlkamp

Constructor Summary
MathFormatter()
           
 
Method Summary
static java.lang.String formatMaple(double[] data)
           
static java.lang.String formatMaple(DoubleMatrix m)
           
static java.lang.String formatMaple(DoubleVector v)
           
static java.lang.String formatMaple(java.lang.String name, DoubleMatrix m)
           
static java.lang.String formatMaple(java.lang.String name, DoubleVector v)
           
static java.lang.String formatMaple(java.util.Vector data)
          convert to String in Maple format
static java.lang.String formatReadable(double d)
           
static java.lang.String formatReadableShort(double d)
           
static java.lang.String formatReadableShort(double[] values)
           
static java.lang.String formatReadableShort(double[] values, int length)
           
static java.lang.String formatReadableShort(double d, int length)
           
static java.lang.String formatReadableShort(DoubleMatrix value)
           
static java.lang.String formatReadableShort(DoubleMatrix value, int length)
           
static java.lang.String formatReadableShort(DoubleVector v)
           
static java.lang.String formatReadableShort(DoubleVector v, int length)
           
static void println(java.lang.String name, DoubleMatrix m)
           
static void println(java.lang.String name, DoubleVector v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathFormatter

public MathFormatter()
Method Detail

formatReadable

public static final java.lang.String formatReadable(double d)

formatReadableShort

public static final java.lang.String formatReadableShort(double d)

formatReadableShort

public static final java.lang.String formatReadableShort(double d,
                                                         int length)

formatReadableShort

public static final java.lang.String formatReadableShort(DoubleVector v)

formatReadableShort

public static final java.lang.String formatReadableShort(DoubleVector v,
                                                         int length)

formatReadableShort

public static final java.lang.String formatReadableShort(double[] values)

formatReadableShort

public static final java.lang.String formatReadableShort(double[] values,
                                                         int length)

formatReadableShort

public static final java.lang.String formatReadableShort(DoubleMatrix value)

formatReadableShort

public static final java.lang.String formatReadableShort(DoubleMatrix value,
                                                         int length)

formatMaple

public static java.lang.String formatMaple(DoubleMatrix m)

formatMaple

public static java.lang.String formatMaple(java.lang.String name,
                                           DoubleMatrix m)

println

public static void println(java.lang.String name,
                           DoubleMatrix m)

formatMaple

public static java.lang.String formatMaple(DoubleVector v)

formatMaple

public static java.lang.String formatMaple(double[] data)

formatMaple

public static java.lang.String formatMaple(java.util.Vector data)
convert to String in Maple format

Parameters:
data - must be a vector of doubles or ints, otherwise castingexception
Returns:
string in maple format

formatMaple

public static java.lang.String formatMaple(java.lang.String name,
                                           DoubleVector v)

println

public static void println(java.lang.String name,
                           DoubleVector v)