|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfhm.edu.fem.test.ENVHullMatrixSpeedUp
public class ENVHullMatrixSpeedUp
Class Description: Test Class - Envelope Hull Matrix Speed Up
Field Summary | |
---|---|
protected java.util.Vector<java.util.Vector> |
data
|
protected java.util.Vector<java.lang.Double> |
enlargeVector
|
protected int |
entryIndex
|
protected int[] |
entryIndexes
|
protected java.util.Vector<java.lang.Double> |
subVector
|
Constructor Summary | |
---|---|
ENVHullMatrixSpeedUp(ENVHullMatrixSpeedUp env)
Copy Constructor |
|
ENVHullMatrixSpeedUp(int size)
Construct a new ENV for a HullMatrix with the given number of "0.0" elements |
Method Summary | |
---|---|
void |
add(int index,
double value)
Add a new element at a specific index of the list, causing all other elements coming after that element to be shifted to the right (including the element currently at the given index) |
protected void |
adjustEntryIndexesAfterEnlargement(int index,
int difference)
Adjust all entry indexes after an enlargement |
protected void |
adjustEntryIndexesAfterReduction(int index,
int difference)
Adjust all entry indexes after a reduction |
java.lang.Object |
clone()
Clone this object |
void |
enlargeAt(int index,
int difference)
Enlarge the ENV by the given difference at the given index |
double |
get(int index)
Retrieve a value from the list |
java.util.Vector<java.util.Vector> |
getData()
Retrieve the data vector from the ENV |
int[] |
getEntryIndexes()
Retrieve the entry index array |
protected int |
getEntryIndexFor(int index)
Compute the entry index for the given index and return the correct subvector |
long |
getRequiredMemory()
Retrieve the amount of required memory in this matrix (in byte) |
void |
reduceAt(int index,
int difference)
Reduce the ENV by the given difference at the given index |
double |
set(int index,
double value)
Replace an already existing value in the list with a new value at the specific index |
int |
size()
Retrieve the number of Double elements in the ENV |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector<java.util.Vector> data
protected java.util.Vector<java.lang.Double> enlargeVector
protected int entryIndex
protected int[] entryIndexes
protected java.util.Vector<java.lang.Double> subVector
Constructor Detail |
---|
public ENVHullMatrixSpeedUp(ENVHullMatrixSpeedUp env)
env,
- the env object to incorporate in the new ENVHullMatrix objectpublic ENVHullMatrixSpeedUp(int size)
size,
- the size the ENV should have at startupMethod Detail |
---|
public void add(int index, double value)
index,
- the index to set the value at (the index starts at 1)value,
- the new valueprotected void adjustEntryIndexesAfterEnlargement(int index, int difference)
index,
- the original index we placed the enlargement atdifference,
- the amount of elements by which we expandedprotected void adjustEntryIndexesAfterReduction(int index, int difference)
index,
- the original index we placed the reduction atdifference,
- the amount of elements by which we reducedpublic java.lang.Object clone()
clone
in class java.lang.Object
public void enlargeAt(int index, int difference)
index,
- the index we enlarge the ENV at (all other items are shifted to the right)difference,
- the difference by which to enlarge the ENVpublic double get(int index)
index,
- the index of the value to retrieve (the index starts at 1)
public java.util.Vector<java.util.Vector> getData()
public int[] getEntryIndexes()
protected int getEntryIndexFor(int index)
index,
- the real index
public long getRequiredMemory()
public void reduceAt(int index, int difference)
index,
- the index we reduce the ENV at (all other items are shifted to the left)difference,
- the difference by which to reduce the ENVpublic double set(int index, double value)
index,
- the index of the element to replace (the index starts at 1)value,
- the value to replace the other value with
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |