fhm.edu.fem.test
Class ENVHullChainMatrix

java.lang.Object
  extended by fhm.edu.fem.calc.objects.matrix.ENVHullMatrix
      extended by fhm.edu.fem.test.ENVHullChainMatrix

public class ENVHullChainMatrix
extends ENVHullMatrix

Class Description: Test Class - Envelope Hull Matrix Chain Style

Author:
Thomas Woellert (thomas@woellert.net), Stefan Weissbach (weissbst@gmx.de)

Field Summary
 
Fields inherited from class fhm.edu.fem.calc.objects.matrix.ENVHullMatrix
data, enlargeVector, localLogger
 
Constructor Summary
ENVHullChainMatrix(ENVHullChainMatrix env)
          Copy Constructor
ENVHullChainMatrix(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)
 java.lang.Object clone()
          Clone this object
 java.lang.String displayChain()
           
 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
 int getNextNonZeroIndex(int index, int rowEndIndex)
          Retrieve the next non-zero item starting from the given index
protected  ENVDataItem includeNewItemInList(ENVDataItem newItem, int 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 current size
 
Methods inherited from class fhm.edu.fem.calc.objects.matrix.ENVHullMatrix
getData, getRequiredMemory
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ENVHullChainMatrix

public ENVHullChainMatrix(ENVHullChainMatrix env)
Copy Constructor

Parameters:
env, - the env object to incorporate in the new ENVHullMatrix object

ENVHullChainMatrix

public ENVHullChainMatrix(int size)
Construct a new ENV for a HullMatrix with the given number of "0.0" elements

Parameters:
size, - the size the ENV should have at startup
Method Detail

add

public 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)

Overrides:
add in class ENVHullMatrix
Parameters:
index, - the index to set the value at (the index starts at 1)
value, - the new value

clone

public java.lang.Object clone()
Clone this object

Overrides:
clone in class ENVHullMatrix
Returns:
the cloned object

displayChain

public java.lang.String displayChain()

enlargeAt

public void enlargeAt(int index,
                      int difference)
Enlarge the ENV by the given difference at the given index

Overrides:
enlargeAt in class ENVHullMatrix
Parameters:
index, - the index we enlarge the ENV at (all other items are shifted to the right)
difference, - the difference to enlarge the ENV

get

public double get(int index)
Retrieve a value from the list

Overrides:
get in class ENVHullMatrix
Parameters:
index, - the index of the value to retrieve (the index starts at 1)
Returns:
the value

getNextNonZeroIndex

public int getNextNonZeroIndex(int index,
                               int rowEndIndex)
Retrieve the next non-zero item starting from the given index

Parameters:
index -
Returns:
the index of the next item or -1 if no item could be found in that row

includeNewItemInList

protected ENVDataItem includeNewItemInList(ENVDataItem newItem,
                                           int index)

set

public double set(int index,
                  double value)
Replace an already existing value in the list with a new value at the specific index

Overrides:
set in class ENVHullMatrix
Parameters:
index, - the index of the element to replace (the index starts at 1)
value, - the value to replace the other value with
Returns:
the value we replaced

size

public int size()
Retrieve the current size

Overrides:
size in class ENVHullMatrix
Returns:
size