|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ru.sscc.spline.mesh.SimpleMesh
The description of the simple 1D mesh. The user's mesh nodes are usually affain transformed while construction of an internal mesh by the formula x'=(x-x0)*s, where x0 is a new origin point (usually the first point in the mesh) and s is a scale factor. The class provides testing of a point to find a mesh cell it belongs to.
Field Summary | |
protected double |
origin
An affine transform origin. |
protected double |
scale
An affine fransform scaling factor. |
int |
size
A number of mesh nodes. |
Constructor Summary | |
protected |
SimpleMesh(int size)
Constructor: sets the mesh size attribute. |
Method Summary | |
abstract double |
averageStep()
Returns an average mesh step. |
abstract double |
distance(int i,
int j)
Returns a distance between i-th and j-th nodes of transformed mesh, e.g. |
double |
extendedMeshDistance(int i,
int j)
Returns a distance between i-th and j-th nodes of the extended mesh. |
abstract void |
findCell(SimpleMeshWorkspace workspace,
double x)
Finds a mesh cell to which a point belongs. |
static void |
findCell(SimpleMeshWorkspace workspace,
double t,
double[] nodes,
int firstIndex,
int lastIndex)
Finds a mesh cell to which a point belongs. |
static void |
findCell(SimpleMeshWorkspace workspace,
double t,
float[] nodes,
int firstIndex,
int lastIndex)
Finds a mesh cell to which a point belongs. |
abstract double |
get(int i)
Returns a value of i-th mesh node in the original coordinate system. |
abstract boolean |
isUniform()
Returns a mesh uniformness tag. |
double |
origin()
Returns the new origin point. |
double |
scale()
Returns the scale factor. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public final int size
protected double origin
protected double scale
Constructor Detail |
protected SimpleMesh(int size)
Method Detail |
public final double origin()
public final double scale()
public abstract double averageStep()
public abstract void findCell(SimpleMeshWorkspace workspace, double x)
workspace
- a mesh workspacex
- a point (in original coordinates) to searchpublic abstract double get(int i)
public abstract boolean isUniform()
public abstract double distance(int i, int j)
public double extendedMeshDistance(int i, int j)
public static void findCell(SimpleMeshWorkspace workspace, double t, double[] nodes, int firstIndex, int lastIndex)
The nodes[firstIndex],...,nodes[lastIndex-1] entries are
used in the algorithm. The resulting cell index is an integer value
belonging to the range [firstIndex..lastIndex].
If cellIndex==firstIndex, the point is to the left
from the nodes[firstIndex]. In this case, the position will be
negative and equal to (t-nodes[firstIndex]). In other cases,
the point position is equal to (t-nodes[cellIndex-1]).
workspace
- the mesh workspacet
- the point (in mesh coordinates) to searchnodes
- the array containing mesh nodesfirstIndex
- the first index in the array to searchlastIndex
- the index after the last array's entry
public static void findCell(SimpleMeshWorkspace workspace, double t, float[] nodes, int firstIndex, int lastIndex)
The nodes[firstIndex],...,nodes[lastIndex-1] entries are
used in the algorithm. The resulting cell index is an integer value
belonging to the range [firstIndex..lastIndex].
If cellIndex==firstIndex, the point is to the left
from the nodes[firstIndex]. In this case, the position will be
negative and equal to (t-nodes[firstIndex]). In other cases,
the point position is equal to (t-nodes[cellIndex-1]).
workspace
- the mesh workspacet
- the point (in mesh coordinates) to searchnodes
- the array containing mesh nodesfirstIndex
- the first index in the array to searchlastIndex
- the index after the last array's entry
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |