org.apache.mahout.math.matrix.doublealgo
Class Formatter

java.lang.Object
  extended by org.apache.mahout.math.PersistentObject
      extended by org.apache.mahout.math.matrix.impl.AbstractFormatter
          extended by org.apache.mahout.math.matrix.doublealgo.Formatter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

Deprecated. until unit tests are in place. Until this time, this class/interface is unsupported.

@Deprecated
public class Formatter
extends AbstractFormatter

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.mahout.math.matrix.impl.AbstractFormatter
alignment, CENTER, DECIMAL, format, LEFT, printShape, RIGHT, rowSeparator, sliceSeparator
 
Constructor Summary
Formatter()
          Deprecated. Constructs and returns a matrix formatter with format "%G".
Formatter(java.lang.String format)
          Deprecated. Constructs and returns a matrix formatter.
 
Method Summary
protected  java.lang.String form(AbstractMatrix1D matrix, int index, Former formatter)
          Deprecated. Converts a given cell to a String; no alignment considered.
protected static java.lang.String form(DoubleMatrix1D matrix, int index, Former formatter)
          Deprecated. Converts a given cell to a String; no alignment considered.
protected  java.lang.String[][] format(AbstractMatrix2D matrix)
          Deprecated. Returns a string representations of all cells; no alignment considered.
 java.lang.String[][] format(DoubleMatrix2D matrix)
          Deprecated. Returns a string representations of all cells; no alignment considered.
protected static int indexOfDecimalPoint(java.lang.String s)
          Deprecated. Returns the index of the decimal point.
protected  int lead(java.lang.String s)
          Deprecated. Returns the number of characters before the decimal point.
 java.lang.String toSourceCode(DoubleMatrix1D matrix)
          Deprecated. Returns a string s such that Object[] m = s is a legal Java statement.
 java.lang.String toSourceCode(DoubleMatrix2D matrix)
          Deprecated. Returns a string s such that Object[] m = s is a legal Java statement.
 java.lang.String toSourceCode(DoubleMatrix3D matrix)
          Deprecated. Returns a string s such that Object[] m = s is a legal Java statement.
protected  java.lang.String toString(AbstractMatrix2D matrix)
          Deprecated. Returns a string representation of the given matrix.
 java.lang.String toString(DoubleMatrix1D matrix)
          Deprecated. Returns a string representation of the given matrix.
 java.lang.String toString(DoubleMatrix2D matrix)
          Deprecated. Returns a string representation of the given matrix.
 java.lang.String toString(DoubleMatrix3D matrix)
          Deprecated. Returns a string representation of the given matrix.
 
Methods inherited from class org.apache.mahout.math.matrix.impl.AbstractFormatter
align, alignmentCode, alignRow, blanks, formatRow, repeat, setAlignment, setColumnSeparator, setFormat, setMinColumnWidth, setPrintShape, setRowSeparator, setSliceSeparator, shape, shape, shape, toString
 
Methods inherited from class org.apache.mahout.math.PersistentObject
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Deprecated. 
Constructs and returns a matrix formatter with format "%G".


Formatter

public Formatter(java.lang.String format)
Deprecated. 
Constructs and returns a matrix formatter.

Parameters:
format - the given format used to convert a single cell value.
Method Detail

form

protected static java.lang.String form(DoubleMatrix1D matrix,
                                       int index,
                                       Former formatter)
Deprecated. 
Converts a given cell to a String; no alignment considered.


form

protected java.lang.String form(AbstractMatrix1D matrix,
                                int index,
                                Former formatter)
Deprecated. 
Converts a given cell to a String; no alignment considered.

Specified by:
form in class AbstractFormatter

format

public java.lang.String[][] format(DoubleMatrix2D matrix)
Deprecated. 
Returns a string representations of all cells; no alignment considered.


format

protected java.lang.String[][] format(AbstractMatrix2D matrix)
Deprecated. 
Returns a string representations of all cells; no alignment considered.

Specified by:
format in class AbstractFormatter

indexOfDecimalPoint

protected static int indexOfDecimalPoint(java.lang.String s)
Deprecated. 
Returns the index of the decimal point.


lead

protected int lead(java.lang.String s)
Deprecated. 
Returns the number of characters before the decimal point.

Overrides:
lead in class AbstractFormatter

toSourceCode

public java.lang.String toSourceCode(DoubleMatrix1D matrix)
Deprecated. 
Returns a string s such that Object[] m = s is a legal Java statement.

Parameters:
matrix - the matrix to format.

toSourceCode

public java.lang.String toSourceCode(DoubleMatrix2D matrix)
Deprecated. 
Returns a string s such that Object[] m = s is a legal Java statement.

Parameters:
matrix - the matrix to format.

toSourceCode

public java.lang.String toSourceCode(DoubleMatrix3D matrix)
Deprecated. 
Returns a string s such that Object[] m = s is a legal Java statement.

Parameters:
matrix - the matrix to format.

toString

public java.lang.String toString(DoubleMatrix1D matrix)
Deprecated. 
Returns a string representation of the given matrix.

Parameters:
matrix - the matrix to convert.

toString

public java.lang.String toString(DoubleMatrix2D matrix)
Deprecated. 
Returns a string representation of the given matrix.

Parameters:
matrix - the matrix to convert.

toString

public java.lang.String toString(DoubleMatrix3D matrix)
Deprecated. 
Returns a string representation of the given matrix.

Parameters:
matrix - the matrix to convert.

toString

protected java.lang.String toString(AbstractMatrix2D matrix)
Deprecated. 
Returns a string representation of the given matrix.

Overrides:
toString in class AbstractFormatter
Parameters:
matrix - the matrix to convert.


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.