fhm.edu.fem.calc.objects.matrix
Class ENVHullMatrix

java.lang.Object
  extended by fhm.edu.fem.calc.objects.matrix.ENVHullMatrix
Direct Known Subclasses:
ENVHullChainMatrix

public class ENVHullMatrix
extends java.lang.Object

Class Description: This class represents the ENV vector used in the HullMatrix (the index starts at 1 not 0)

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

Field Summary
protected  ENVVector data
           
protected  ENVVector enlargeVector
           
protected static Logger localLogger
           
 
Constructor Summary
protected ENVHullMatrix()
           
  ENVHullMatrix(ENVHullMatrix env)
          Copy Constructor
  ENVHullMatrix(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
 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
 ENVVector getData()
          Retrieve the data vector from the ENV
 long getRequiredMemory()
          Retrieve the amount of required memory in this matrix (in byte)
 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 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected ENVVector data

enlargeVector

protected ENVVector enlargeVector

localLogger

protected static Logger localLogger
Constructor Detail

ENVHullMatrix

protected ENVHullMatrix()

ENVHullMatrix

public ENVHullMatrix(ENVHullMatrix env)
Copy Constructor

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

ENVHullMatrix

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

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 java.lang.Object
Returns:
the cloned object

enlargeAt

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

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

Parameters:
index, - the index of the value to retrieve (the index starts at 1)
Returns:
the value

getData

public ENVVector getData()
Retrieve the data vector from the ENV

Returns:
the data vector holding "Double" objects

getRequiredMemory

public long getRequiredMemory()
Retrieve the amount of required memory in this matrix (in byte)

Returns:
the amount of required memory in byte

set

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

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

Returns:
size