uchicago.src.collection
Class BitMatrix2D

java.lang.Object
  extended by uchicago.src.collection.BitMatrix2D

public class BitMatrix2D
extends java.lang.Object

Matrix for storing elements as bits (0 or 1).

Version:
$Revision: 1.4 $ $Date: 2004/11/03 19:51:00 $
Author:
Nick Collier

Constructor Summary
BitMatrix2D(byte[][] vals)
           
BitMatrix2D(int rows, int cols)
           
 
Method Summary
 int columns()
          Returns the number of columns in this matrix.
 byte get(int row, int col)
          Gets the value in the specified cell.
 cern.colt.matrix.impl.DenseDoubleMatrix1D getRow(int row)
           
static void main(java.lang.String[] args)
           
 int rows()
          Returns the number of rows in this matrix.
 void set(int row, int col, byte val)
          Sets the value of the specified cell.
 java.lang.String toString()
           
 double zSum()
          Returns the sum of all the cells.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitMatrix2D

public BitMatrix2D(int rows,
                   int cols)

BitMatrix2D

public BitMatrix2D(byte[][] vals)
Method Detail

getRow

public cern.colt.matrix.impl.DenseDoubleMatrix1D getRow(int row)

set

public void set(int row,
                int col,
                byte val)
Sets the value of the specified cell.


get

public byte get(int row,
                int col)
Gets the value in the specified cell.


rows

public int rows()
Returns the number of rows in this matrix.


columns

public int columns()
Returns the number of columns in this matrix.


zSum

public double zSum()
Returns the sum of all the cells.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)