Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## baseCode.dataStructure.matrix
Interface NamedMatrix

All Known Implementing Classes:
  AbstractNamedMatrix, SparseDoubleMatrix2DNamed

public interface NamedMatrix

Copyright (c) 2004

Institution:: Columbia University

Version:
  $Id: NamedMatrix.java,v 1.4 2005/03/18 02:53:38 pavlidis Exp $
Author:
  Paul Pavlidis

Method Summary
`void` | `addColumnName(java.lang.String s, int index)` Add a column name associated with an index.
`void` | `addRowName(java.lang.String s, int index)` Add a row name associated with a row index.
`int` | `columns()` Get the number of columns the matrix has.
`boolean` | `containsColumnName(java.lang.String columnName)`
`boolean` | `containsRowName(java.lang.String rowName)`
`int` | `getColIndexByName(java.lang.String s)` Get the index of a column by name.
`java.lang.String` | `getColName(int i)` Gte the column name for an index.
`java.util.List` | `getColNames()`
`java.lang.Object[]` | `getColObj(int i)`
`int` | `getRowIndexByName(java.lang.String s)` Get the index of a row by name..
`java.lang.String` | `getRowName(int i)` Get the row name for an index
`java.util.Iterator` | `getRowNameMapIterator()`
`java.util.List` | `getRowNames()`
`java.lang.Object[]` | `getRowObj(int i)` Get a row in the matrix as a generic Object[].
`boolean` | `hasColNames()` Check if this matrix has a valid set of column names.
`boolean` | `hasRow(java.lang.String r)`
`boolean` | `hasRowNames()`
`boolean` | `isMissing(int i, int j)` Check if the value at a given index is missing.
`int` | `numMissing()` Return the number of missing values in the matrix.
`int` | `rows()` Get the number of rows the matrix has
`void` | `set(int i, int j, java.lang.Object val)` Set a value in the matrix.
`void` | `setColumnNames(java.util.List v)`
`void` | `setRowNames(java.util.List v)`

Method Detail

### addColumnName

    public void addColumnName(java.lang.String s,
                              int index)

  Add a column name associated with an index.

  Parameters:
    `s` - String a column name
    `index` - int the column index associated with this name

### addRowName

    public void addRowName(java.lang.String s,
                           int index)

  Add a row name associated with a row index.

  Parameters:
    `s` - String
    `index` - int

### getRowIndexByName

    public int getRowIndexByName(java.lang.String s)

  Get the index of a row by name..

  Parameters:
    `s` - String
  Returns:
    int

### getColIndexByName

    public int getColIndexByName(java.lang.String s)

  Get the index of a column by name.

  Parameters:
    `s` - String
  Returns:
    int

### getRowName

    public java.lang.String getRowName(int i)

  Get the row name for an index

  Parameters:
    `i` - int
  Returns:
    java.lang.String

### getColName

    public java.lang.String getColName(int i)

  Gte the column name for an index.

  Parameters:
    `i` - int
  Returns:
    java.lang.String

### hasRowNames

    public boolean hasRowNames()

  Returns:
    boolean

### hasColNames

    public boolean hasColNames()

  Check if this matrix has a valid set of column names.

  Returns:
    boolean

### setRowNames

    public void setRowNames(java.util.List v)

  Parameters:
    `v` - List a vector of Strings.

### setColumnNames

    public void setColumnNames(java.util.List v)

  Parameters:
    `v` - List a vector of Strings.

### getColNames

    public java.util.List getColNames()

  Returns:
    List of Strings

### getRowNames

    public java.util.List getRowNames()

  Returns:
    List of Strings

### hasRow

    public boolean hasRow(java.lang.String r)

  Parameters:
    `r` - String
  Returns:
    boolean

### getRowNameMapIterator

    public java.util.Iterator getRowNameMapIterator()

  Returns:
    java.util.Iterator

### rows

    public int rows()

  Get the number of rows the matrix has

  Returns:
    int

### columns

    public int columns()

  Get the number of columns the matrix has.

  Returns:
    int

### set

    public void set(int i,
                    int j,
                    java.lang.Object val)

  Set a value in the matrix.

  Parameters:
    `i` - int
    `j` - int
    `val` - Object

### getRowObj

    public java.lang.Object[] getRowObj(int i)

  Get a row in the matrix as a generic Object[]. This exists so NamedMatrices can be used more generically.

  Parameters:
    `i` - int row
  Returns:
    Object[]

### getColObj

    public java.lang.Object[] getColObj(int i)

  Parameters:
    `i` - int column
  Returns:
    Object[]

### isMissing

    public boolean isMissing(int i,
                             int j)

  Check if the value at a given index is missing.

  Parameters:
    `i` - row
    `j` - column
  Returns:
    true if the value is missing, false otherwise.

### numMissing

    public int numMissing()

  Return the number of missing values in the matrix.

  Returns:

### containsRowName

    public boolean containsRowName(java.lang.String rowName)

  Parameters:
    `rowName` -
  Returns:

### containsColumnName

    public boolean containsColumnName(java.lang.String columnName)

  Parameters:
    `columnName` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2005 Columbia University. All Rights Reserved.