|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.PingOO.DLAI.lib.graph.IsoCurve
This class will calculate the constant curve of a given value passing through a grid of values.
| Field Summary | |
(package private) static int |
ARRAYSIZE
Initial size of the array that will hold a contour. |
(package private) static int |
BOTTOM
Flag a cell as having the curve coming through its Bottom face |
protected java.util.Vector |
cells
Vector of cells that the contour passes through. |
protected double[] |
curve
Array that holds the points of the contour |
protected double[] |
grid
Array holding the data grid. |
(package private) static int |
LEFT
Flag a cell as having the curve coming through its Left face |
(package private) static int |
MAXARRAYSIZE
Maximum size of the array that will hold a contour. |
protected int |
nx
X Dimension of data grid |
protected int |
ny
Y Dimension of data grid |
(package private) static int |
RIGHT
Flag a cell as having the curve coming through its Right face |
protected int |
size
Number of points in the contour |
(package private) static int |
TERMINAL
Flag a cell face as a terminal face ie the curve terminates here. |
(package private) static int |
TOP
Flag a cell as having the curve coming through its Top face |
protected double |
value
Contour value to be found |
| Constructor Summary | |
IsoCurve()
Instantiate the class and initialize all the variables |
|
IsoCurve(double[] grid,
int nx,
int ny)
Instantiate the class and initialize all the variables. |
|
| Method Summary | |
protected void |
addDataPoint(double x,
double y)
Add a data point to the contour curve. |
protected void |
addDataPoint(int wall,
int icell,
int jcell)
Add a data point to the contour curve. |
protected void |
createCells()
Create the vector of all cells that contain the contour. |
protected void |
getcurve()
Traverse the cells and find One connect countour. |
double[] |
getCurve()
Return a contour curve. |
protected double[] |
getPoint(int wall,
int icell,
int jcell)
Return the (x,y) position where the contour cross the cell wall. |
protected Cell |
search(int icell,
int jcell)
Search for a cell in the contour cell list |
void |
setGrid(double[] grid,
int nx,
int ny)
Set the grid to be contoured |
void |
setValue(double value)
Set the value to contour |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final int TERMINAL
static final int LEFT
static final int RIGHT
static final int TOP
static final int BOTTOM
static final int ARRAYSIZE
static final int MAXARRAYSIZE
protected java.util.Vector cells
protected double[] grid
protected int nx
protected int ny
protected double[] curve
protected int size
protected double value
| Constructor Detail |
public IsoCurve()
public IsoCurve(double[] grid,
int nx,
int ny)
grid - An nx by ny Array containing the grid to contournx - X dimension of the grid.ny - Y dimension of the grid.| Method Detail |
public void setGrid(double[] grid,
int nx,
int ny)
nx - X dimension of the grid.ny - Y dimension of the grid.public void setValue(double value)
value - the contour levelpublic double[] getCurve()
protected void createCells()
protected void getcurve()
protected double[] getPoint(int wall,
int icell,
int jcell)
wall - The cell wall the contour crosses.icell - The x index of the cell position.jcell - The y index of the cell position.
protected void addDataPoint(int wall,
int icell,
int jcell)
wall - The cell wall the contour crosses.icell - The x index of the cell position.jcell - The y index of the cell position.
protected void addDataPoint(double x,
double y)
x - The x position of the point.y - The y position of the point.
protected Cell search(int icell,
int jcell)
icell - the x index of the celljcell - the y index of the cell
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||