Parallel Colt 0.7.2

cern.colt.matrix.io
Class MatrixVectorWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by cern.colt.matrix.io.MatrixVectorWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class MatrixVectorWriter
extends PrintWriter

Writes matrices and vectors


Constructor Summary
MatrixVectorWriter(OutputStream out)
          Constructor for MatrixVectorWriter
MatrixVectorWriter(OutputStream out, boolean autoFlush)
          Constructor for MatrixVectorWriter
MatrixVectorWriter(Writer out)
          Constructor for MatrixVectorWriter
MatrixVectorWriter(Writer out, boolean autoFlush)
          Constructor for MatrixVectorWriter
 
Method Summary
 void add(int num, int[] indexes)
          Shifts the indexes.
 void printArray(double[] data)
          Prints an array to the underlying stream.
 void printArray(double[] dataR, double[] dataI)
          Prints an array to the underlying stream.
 void printArray(float[] data)
          Prints an array to the underlying stream.
 void printArray(float[] dataR, float[] dataI)
          Prints an array to the underlying stream.
 void printArray(int[] data)
          Prints an array to the underlying stream.
 void printArray(long[] data)
          Prints an array to the underlying stream.
 void printComments(String[] comments)
          Prints all the comments.
 void printCoordinate(int[] index, double[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, double[] dataR, double[] dataI)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, double[] dataR, double[] dataI, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, double[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, float[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, float[] dataR, float[] dataI)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, float[] dataR, float[] dataI, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, float[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, int[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, double[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, double[] dataR, double[] dataI)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, double[] dataR, double[] dataI, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, double[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, float[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, float[] dataR, float[] dataI)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, float[] dataR, float[] dataI, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, float[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, int[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, int[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, int[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, long[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] row, int[] column, long[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, long[] data)
          Prints the coordinate format to the underlying stream.
 void printCoordinate(int[] index, long[] data, int offset)
          Prints the coordinate format to the underlying stream.
 void printMatrixInfo(MatrixInfo info)
          Prints the matrix info
 void printMatrixSize(MatrixSize size)
          Prints the matrix size.
 void printMatrixSize(MatrixSize size, MatrixInfo info)
          Prints the matrix size
 void printPattern(int[] index)
          Prints the coordinates to the underlying stream.
 void printPattern(int[] index, int offset)
          Prints the coordinates to the underlying stream.
 void printPattern(int[] row, int[] column)
          Prints the coordinates to the underlying stream.
 void printPattern(int[] row, int[] column, int offset)
          Prints the coordinates to the underlying stream.
 void printVectorInfo(VectorInfo info)
          Prints the vector info
 void printVectorSize(VectorSize size)
          Prints the vector size.
 void printVectorSize(VectorSize size, VectorInfo info)
          Prints the vector size
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, write, write, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixVectorWriter

public MatrixVectorWriter(OutputStream out)
Constructor for MatrixVectorWriter

Parameters:
out -

MatrixVectorWriter

public MatrixVectorWriter(OutputStream out,
                          boolean autoFlush)
Constructor for MatrixVectorWriter

Parameters:
out -
autoFlush -

MatrixVectorWriter

public MatrixVectorWriter(Writer out)
Constructor for MatrixVectorWriter

Parameters:
out -

MatrixVectorWriter

public MatrixVectorWriter(Writer out,
                          boolean autoFlush)
Constructor for MatrixVectorWriter

Parameters:
out -
autoFlush -
Method Detail

add

public void add(int num,
                int[] indexes)
Shifts the indexes. Useful for converting between 0- and 1-based indicing.

Parameters:
num - Added to every index
indexes - indexes to shift

printMatrixInfo

public void printMatrixInfo(MatrixInfo info)
Prints the matrix info


printVectorInfo

public void printVectorInfo(VectorInfo info)
Prints the vector info


printMatrixSize

public void printMatrixSize(MatrixSize size,
                            MatrixInfo info)
Prints the matrix size


printMatrixSize

public void printMatrixSize(MatrixSize size)
Prints the matrix size. Assumes coordinate format


printVectorSize

public void printVectorSize(VectorSize size,
                            VectorInfo info)
Prints the vector size


printVectorSize

public void printVectorSize(VectorSize size)
Prints the vector size. Assumes coordinate format


printArray

public void printArray(float[] data)
Prints an array to the underlying stream. One entry per line.


printArray

public void printArray(double[] data)
Prints an array to the underlying stream. One entry per line.


printArray

public void printArray(float[] dataR,
                       float[] dataI)
Prints an array to the underlying stream. One entry per line. The first array specifies the real entries, and the second is the imaginary entries


printArray

public void printArray(double[] dataR,
                       double[] dataI)
Prints an array to the underlying stream. One entry per line. The first array specifies the real entries, and the second is the imaginary entries


printArray

public void printArray(int[] data)
Prints an array to the underlying stream. One entry per line.


printArray

public void printArray(long[] data)
Prints an array to the underlying stream. One entry per line.


printCoordinate

public void printCoordinate(int[] index,
                            float[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to the index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] index,
                            double[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to the index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] index,
                            int[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to the index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] index,
                            long[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to the index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            float[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            double[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] index,
                            float[] dataR,
                            float[] dataI,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based. The first float array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] index,
                            double[] dataR,
                            double[] dataI,
                            int offset)
Prints the coordinate format to the underlying stream. One index and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            float[] dataR,
                            float[] dataI,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based. The first float array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            double[] dataR,
                            double[] dataI,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            int[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            long[] data,
                            int offset)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printPattern

public void printPattern(int[] row,
                         int[] column,
                         int offset)
Prints the coordinates to the underlying stream. One index pair on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printPattern

public void printPattern(int[] index,
                         int offset)
Prints the coordinates to the underlying stream. One index on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            float[] data)
Prints the coordinate format to the underlying stream. One index pair and entry on each line


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            double[] data)
Prints the coordinate format to the underlying stream. One index pair and entry on each line


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            float[] dataR,
                            float[] dataI)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            double[] dataR,
                            double[] dataI)
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            int[] data)
Prints the coordinate format to the underlying stream. One index pair and entry on each line


printCoordinate

public void printCoordinate(int[] row,
                            int[] column,
                            long[] data)
Prints the coordinate format to the underlying stream. One index pair and entry on each line


printPattern

public void printPattern(int[] row,
                         int[] column)
Prints the coordinates to the underlying stream. One index pair on each line


printCoordinate

public void printCoordinate(int[] index,
                            float[] data)
Prints the coordinate format to the underlying stream. One index and entry on each line


printCoordinate

public void printCoordinate(int[] index,
                            double[] data)
Prints the coordinate format to the underlying stream. One index and entry on each line


printCoordinate

public void printCoordinate(int[] index,
                            float[] dataR,
                            float[] dataI)
Prints the coordinate format to the underlying stream. One index and entry on each line. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] index,
                            double[] dataR,
                            double[] dataI)
Prints the coordinate format to the underlying stream. One index and entry on each line. The first double array specifies the real entries, and the second is the imaginary entries


printCoordinate

public void printCoordinate(int[] index,
                            int[] data)
Prints the coordinate format to the underlying stream. One index and entry on each line


printCoordinate

public void printCoordinate(int[] index,
                            long[] data)
Prints the coordinate format to the underlying stream. One index and entry on each line


printPattern

public void printPattern(int[] index)
Prints the coordinates to the underlying stream. One index on each line


printComments

public void printComments(String[] comments)
Prints all the comments. Prepends a '%' and appends a newline to every comment


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage