|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ArrayClasses.UTRArray
Upper triangular matrix of doubles (a_ij)_{p<=i<=j< n}
stored as straightforward ragged java array. Array indices can be based on
any base p.
The purpose here is mainly to have a built in index shift from natural indices to zero based java array indices. This makes program code clearer. However the speed penalty from the use of accessor functions is significant.
Constructor Summary | |
UTRArray(int p,
int n)
Memory allocation, all entries zero. |
Method Summary | |
double |
_(int i,
int j)
Get entry (subscripting). |
static void |
main(java.lang.String[] args)
TEST PROGRAM |
void |
set(int i,
int j,
double x)
Set entry. |
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 |
public UTRArray(int p, int n)
Method Detail |
public void set(int i, int j, double x)
Set entry. Only built in java bounds checking.
Indices must satisfy p<=i<=j< n.
i
- row index.j
- column indexpublic double _(int i, int j)
Get entry (subscripting). Only built in java bounds checking.
Indices must satisfy p<=i<=j< n.
i
- row index.j
- column indexpublic java.lang.String toString()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |