org.jscience.physics.fluids.dynamics.util
Class Vector2DFastInt

java.lang.Object
  extended by org.jscience.physics.fluids.dynamics.util.Vector2DFastInt

public class Vector2DFastInt
extends java.lang.Object

DOCUMENT ME!


Constructor Summary
Vector2DFastInt(int imax, int jtam, int incr)
          constructor
 
Method Summary
 void addElement(int i, int valor)
          add an element.
 void addElementNoRep(int i, int valor)
          add an element only if not contained yet.
 int[] array()
          returns the data contained in the container as an array of int's.
 int elementAt(int i, int j)
          returns the element at the given position
 int getStartOfRow(int i)
          returns the initial position in array() of the row i.
 boolean isElement(int i, int valor)
          returns true if the element is contained in the row.
 void reset()
          Empty the vector quickly, but keeping the memory RAM.
 int size(int i)
          returns the length of the row i.
 void sortArrayRows(int type)
          Sorts all elements of all rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vector2DFastInt

public Vector2DFastInt(int imax,
                       int jtam,
                       int incr)
constructor

Parameters:
imax - DOCUMENT ME!
jtam - DOCUMENT ME!
incr - DOCUMENT ME!
Method Detail

addElement

public void addElement(int i,
                       int valor)
add an element.

Parameters:
i - DOCUMENT ME!
valor - DOCUMENT ME!

addElementNoRep

public void addElementNoRep(int i,
                            int valor)
add an element only if not contained yet.

Parameters:
i - DOCUMENT ME!
valor - DOCUMENT ME!

array

public int[] array()
returns the data contained in the container as an array of int's.

Returns:
DOCUMENT ME!

elementAt

public int elementAt(int i,
                     int j)
returns the element at the given position

Parameters:
i - DOCUMENT ME!
j - DOCUMENT ME!
Returns:
DOCUMENT ME!

getStartOfRow

public int getStartOfRow(int i)
returns the initial position in array() of the row i.

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

sortArrayRows

public void sortArrayRows(int type)
Sorts all elements of all rows.

Parameters:
type - 1 for going from lower to bigger, -1 for going from bigger to lower.

isElement

public boolean isElement(int i,
                         int valor)
returns true if the element is contained in the row.

Parameters:
i - DOCUMENT ME!
valor - DOCUMENT ME!
Returns:
DOCUMENT ME!

reset

public void reset()
Empty the vector quickly, but keeping the memory RAM. This method es useful to reuse the array without freeing it and reserving another.


size

public int size(int i)
returns the length of the row i.

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!