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

## dataStructures
Class DiagonalMatrix

    java.lang.Object
      |
      +--dataStructures.DiagonalMatrix

public class DiagonalMatrix
extends java.lang.Object

Constructor Summary
`DiagonalMatrix(int theRows, java.lang.Object theZero)`

Method Summary
`java.lang.Object` | `get(int i, int j)`
`static void` | `main(java.lang.String[] args)` test program
`void` | `set(int i, int j, java.lang.Object newValue)` set this(i,j) = newValue

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiagonalMatrix

    public DiagonalMatrix(int theRows,
                          java.lang.Object theZero)

  Throws:
    java.lang.IllegalArgumentException - when theRows < 1

Method Detail

### get

    public java.lang.Object get(int i,
                                int j)

  Returns:
    the element this(i,j)
  Throws:
    IndexOutOfBoundsException - when i < 1 or j < 1 or i > rows or j > rows

### set

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

  set this(i,j) = newValue
  Throws:
    IndexOutOfBoundsException - when i < 1 or j < 1 or i > rows or j > rows
    java.lang.IllegalArgumentException - when you try to set a nondiagonal element to nonzero

### main

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

  test program

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