|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ArrayClasses.LTRContiguousArray
Lower triangular matrix of doubles stored as contiguous 1D array row by row. No linear algebra operations provided. Only accessors. No bounds checking!!!
The idea is to optimize speed for loops of the form
for(int i=p;i
In short the second index j
neds to change less frequently
than i
in accessor methods (row major order in memory).
Constructor Summary
LTRContiguousArray(int p,
int n)
Memory allocation, all entries zero.
Method Summary
double
_(int i,
int j)
Get entry.
static void
main(java.lang.String[] args)
TEST PROGRAM
void
set(int i,
int j,
double x)
Set entry.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
LTRContiguousArray
public LTRContiguousArray(int p,
int n)
- Memory allocation, all entries zero.
Method Detail
set
public void set(int i,
int j,
double x)
- Set entry. No bounds checking at all.
Indices must satisfy
p<=j<=i
WARNING: no error need be detected if j>i.
- Parameters:
i
- row index.j
- column index
_
public double _(int i,
int j)
- Get entry. No bounds checking at all.
Indices must satisfy
p<=j<=i
WARNING: no error need be detected if j>i.
- Parameters:
i
- row index.j
- column index
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: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD