ArrayClasses
Class LowerTriangularArray

java.lang.Object
  extended byArrayClasses.LowerTriangularArray

public class LowerTriangularArray
extends java.lang.Object

Lower triangular matrix of doubles (a_ij)_{0<=j<=i stored as straightforward ragged java array. Direct access to data without accessor functions. We need speed.


Constructor Summary
LowerTriangularArray(int n)
          Memory allocation, all entries zero.
 
Method Summary
 double[][] getData()
          The data array will be exposed directly for fastest possible access to entries without entry accessor functions.
 void initialize(ColtMatrix C)
          Set entries data[i][j]=C.getQuick(i,j) where C is a ColtMatrix.
 void initialize(DoubleFunction f)
          Set entries data[i][j]=f(i,j) where f is the function object passed as a parameter.
static void main(java.lang.String[] args)
          TEST PROGRAM
 java.lang.String toString()
          String representation for printing and inspection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LowerTriangularArray

public LowerTriangularArray(int n)
Memory allocation, all entries zero.

Parameters:
n - matrix is n by n.
Method Detail

getData

public double[][] getData()
The data array will be exposed directly for fastest possible access to entries without entry accessor functions.


initialize

public void initialize(ColtMatrix C)
Set entries data[i][j]=C.getQuick(i,j) where C is a ColtMatrix. Uses only the lower half of C.

Parameters:
C - matrix yielding entry values to be copied.

initialize

public void initialize(DoubleFunction f)
Set entries data[i][j]=f(i,j) where f is the function object passed as a parameter.

Parameters:
f - function object used to initialize entries.

toString

public java.lang.String toString()
String representation for printing and inspection.


main

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