|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cern.colt.PersistentObject cern.colt.matrix.impl.AbstractFormatter cern.colt.matrix.objectalgo.Formatter
Flexible, well human readable matrix print formatting.
Each cell is converted using Object.toString()
.
For examples see doublealgo.Formatter
which is just the same except that it operates on doubles.
Field Summary |
Fields inherited from class cern.colt.matrix.impl.AbstractFormatter |
CENTER, DECIMAL, DEFAULT_COLUMN_SEPARATOR, DEFAULT_MIN_COLUMN_WIDTH, DEFAULT_ROW_SEPARATOR, DEFAULT_SLICE_SEPARATOR, LEFT, RIGHT |
Fields inherited from class cern.colt.PersistentObject |
serialVersionUID |
Constructor Summary | |
Formatter()
Constructs and returns a matrix formatter with alignment LEFT. |
|
Formatter(String alignment)
Constructs and returns a matrix formatter. |
Method Summary | |
String |
toSourceCode(ObjectMatrix1D matrix)
Returns a string s such that Object[] m = s is a legal Java statement. |
String |
toSourceCode(ObjectMatrix2D matrix)
Returns a string s such that Object[] m = s is a legal Java statement. |
String |
toSourceCode(ObjectMatrix3D matrix)
Returns a string s such that Object[] m = s is a legal Java statement. |
String |
toString(ObjectMatrix1D matrix)
Returns a string representation of the given matrix. |
String |
toString(ObjectMatrix2D matrix)
Returns a string representation of the given matrix. |
String |
toString(ObjectMatrix3D matrix)
Returns a string representation of the given matrix. |
String |
toTitleString(ObjectMatrix2D matrix,
String[] rowNames,
String[] columnNames,
String rowAxisName,
String columnAxisName,
String title)
Returns a string representation of the given matrix with axis as well as rows and columns labeled. |
String |
toTitleString(ObjectMatrix3D matrix,
String[] sliceNames,
String[] rowNames,
String[] columnNames,
String sliceAxisName,
String rowAxisName,
String columnAxisName,
String title)
Returns a string representation of the given matrix with axis as well as rows and columns labeled. |
Methods inherited from class cern.colt.matrix.impl.AbstractFormatter |
demo1, demo2, demo3, setAlignment, setColumnSeparator, setFormat, setMinColumnWidth, setPrintShape, setRowSeparator, setSliceSeparator, shape, shape, shape |
Methods inherited from class cern.colt.PersistentObject |
clone |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Formatter()
public Formatter(String alignment)
alignment
- the given alignment used to align a column.Method Detail |
public String toSourceCode(ObjectMatrix1D matrix)
matrix
- the matrix to format.public String toSourceCode(ObjectMatrix2D matrix)
matrix
- the matrix to format.public String toSourceCode(ObjectMatrix3D matrix)
matrix
- the matrix to format.public String toString(ObjectMatrix1D matrix)
matrix
- the matrix to convert.public String toString(ObjectMatrix2D matrix)
matrix
- the matrix to convert.public String toString(ObjectMatrix3D matrix)
matrix
- the matrix to convert.public String toTitleString(ObjectMatrix2D matrix, String[] rowNames, String[] columnNames, String rowAxisName, String columnAxisName, String title)
matrix
- The matrix to format.rowNames
- The headers of all rows (to be put to the left of the matrix).columnNames
- The headers of all columns (to be put to above the matrix).rowAxisName
- The label of the y-axis.columnAxisName
- The label of the x-axis.title
- The overall title of the matrix to be formatted.
public String toTitleString(ObjectMatrix3D matrix, String[] sliceNames, String[] rowNames, String[] columnNames, String sliceAxisName, String rowAxisName, String columnAxisName, String title)
matrix
- The matrix to format.sliceNames
- The headers of all slices (to be put above each slice).rowNames
- The headers of all rows (to be put to the left of the matrix).columnNames
- The headers of all columns (to be put to above the matrix).sliceAxisName
- The label of the z-axis (to be put above each slice).rowAxisName
- The label of the y-axis.columnAxisName
- The label of the x-axis.title
- The overall title of the matrix to be formatted.
|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |