jsci.util.array
Class DiagonalDoubleArray2D

java.lang.Object
  extended by jsci.util.array.AbstractDoubleArray2D
      extended by jsci.util.array.DiagonalDoubleArray2D
All Implemented Interfaces:
Array2D<java.lang.Double>, DoubleArray2D

public class DiagonalDoubleArray2D
extends AbstractDoubleArray2D


Constructor Summary
DiagonalDoubleArray2D(double[][] arr)
          Constructs a matrix from an array.
DiagonalDoubleArray2D(DoubleArray1D array)
           
 
Method Summary
 int columns()
           
 DiagonalDoubleArray2D create(int rows, int cols)
           
 double getDouble(int i, int j)
           
 int rows()
           
 void setDouble(int i, int j, double x)
           
 
Methods inherited from class jsci.util.array.AbstractDoubleArray2D
contentEquals, contentEquals, contentEquals, contentEqualsOp, contentEqualsOp, get, set, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiagonalDoubleArray2D

public DiagonalDoubleArray2D(DoubleArray1D array)

DiagonalDoubleArray2D

public DiagonalDoubleArray2D(double[][] arr)
Constructs a matrix from an array. Any non-diagonal elements in the array are ignored.

Method Detail

getDouble

public double getDouble(int i,
                        int j)

setDouble

public void setDouble(int i,
                      int j,
                      double x)

create

public DiagonalDoubleArray2D create(int rows,
                                    int cols)

rows

public int rows()

columns

public int columns()