public class ContourPlot extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
ContourPlot.Profile |
Modifier and Type | Field and Description |
---|---|
private int |
cntrIndex |
private float[] |
cv |
private double |
cval |
private double |
deltaX |
private double |
deltaY |
private int |
elle |
private static String |
EOL |
private boolean |
fill |
private int |
height |
private int[] |
i1 |
private int[] |
i2 |
private int[] |
i3 |
private int |
ibkey |
private int |
icur |
private int |
idir |
private int |
iedge |
private int |
iflag |
private int |
ii |
private int[] |
ij |
private double[] |
intersect |
private int |
ix |
private int |
jcur |
private int |
jj |
private boolean |
jump |
private int |
k |
private int |
ks |
private int[] |
l1 |
private int[] |
l2 |
private boolean |
logInterpolation |
private static int |
MIN_Y_STEPS |
private int |
ni |
private int |
numberOfContours |
private int |
nxidir |
private Color[] |
palette |
private static int |
PLOT_MARGIN |
private int |
prevIndex |
private double[] |
prevXY |
private Stack<ContourPlot.Profile> |
profiles |
private static long |
serialVersionUID |
private static boolean |
SHOW_NUMBERS |
private int |
width |
private int |
xSteps |
private double[] |
xy |
private int |
ySteps |
private float[][] |
z |
private static double |
Z_MAX_MAX |
private static double |
Z_MIN_MIN |
private double |
z1 |
private double |
z2 |
private double |
zMax |
private double |
zMin |
Constructor and Description |
---|
ContourPlot(int x,
int y,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
private void |
AssignContourValues()
|
private double |
ClipX(double x) |
private double |
ClipY(double y) |
private void |
ContinueContour()
continues tracing a contour.
|
private void |
ContourPlotKernel(Graphics g,
boolean[] workSpace)
corresponds to Synder's subroutine "GCONTR".
|
private boolean |
CrossedByContour(boolean[] workSpace)
true iff the current segment in the grid is crossed by one of the contour values and has not already been
processed for that value.
|
private void |
DetectBoundary() |
private void |
DrawKernel(Graphics g)
the guts of drawing and is called directly or indirectly by
ContourPlotKernel(Graphics, boolean[]) in
order to draw a segment of a contour or to set the pen position "prevXY". |
private void |
DrawProfile(Graphics g,
ContourPlot.Profile profile) |
private Color |
GetColour(int index) |
private void |
GetExtremes()
|
private void |
InvalidData()
sets the first two components of the contour value array to equal values, thus preventing subsequent drawing of
the contour plot.
|
private void |
MakeMatrixRectangular()
appends zero(s) to the end of any row of "z" which is shorter than the longest row.
|
void |
paint(Graphics g)
draws the contours provided that the first two contour values are not equal (which would indicate invalid data)
|
private boolean |
Routine_label_020()
corresponds to a block of code starting at label 20 in Synder's subroutine "GCONTR".
|
private boolean |
Routine_label_050()
corresponds to a block of code starting at label 50 in Synder's subroutine "GCONTR".
|
private boolean |
Routine_label_150()
corresponds to a block of code starting at label 150 in Synder's subroutine "GCONTR".
|
private short |
Routine_label_200(Graphics g,
boolean[] workSpace)
corresponds to a block of code starting at label 200 in Synder's subroutine "GCONTR".
|
private void |
SetColour(Graphics g)
sets the colour of the graphics object, given the contour index, by interpolating linearly between
Color.BLUE & Color.red |
void |
setFill(boolean fill) |
void |
setLogInterpolation(boolean logInterpolation) |
void |
setNumberOfContours(int numberOfContours) |
void |
setPalette(Color[] palette) |
void |
setZedMatrix(cern.colt.matrix.DoubleMatrix2D zed) |
private int |
sign(int a,
int b) |
private static final long serialVersionUID
private static final int MIN_Y_STEPS
private static final boolean SHOW_NUMBERS
private static final int PLOT_MARGIN
private static final double Z_MAX_MAX
private static final double Z_MIN_MIN
private static final String EOL
private int xSteps
private int ySteps
private float[][] z
private boolean logInterpolation
private int width
private int height
private double deltaX
private double deltaY
private int numberOfContours
private int[] l1
private int[] l2
private int[] ij
private int[] i1
private int[] i2
private int[] i3
private int ibkey
private int icur
private int jcur
private int ii
private int jj
private int elle
private int ix
private int iedge
private int iflag
private int ni
private int ks
private int cntrIndex
private int prevIndex
private int idir
private int nxidir
private int k
private double z1
private double z2
private double cval
private double zMax
private double zMin
private double[] intersect
private double[] xy
private double[] prevXY
private float[] cv
private boolean jump
private Color[] palette
private boolean fill
private Stack<ContourPlot.Profile> profiles
private int sign(int a, int b)
private void InvalidData()
private void GetExtremes() throws SOMToolboxException
SOMToolboxException
private void AssignContourValues() throws SOMToolboxException
zMin
and zMax
, logarithmically or linearly, in order to assign contour
values to the array cv
SOMToolboxException
private void SetColour(Graphics g)
Color.BLUE
& Color.red
private Color GetColour(int index)
private double ClipX(double x)
private double ClipY(double y)
private void DrawProfile(Graphics g, ContourPlot.Profile profile)
private void DrawKernel(Graphics g)
ContourPlotKernel(Graphics, boolean[])
in
order to draw a segment of a contour or to set the pen position "prevXY". Its action depends on "iflag":
private void DetectBoundary()
private boolean Routine_label_020()
private boolean Routine_label_050()
private boolean Routine_label_150()
private short Routine_label_200(Graphics g, boolean[] workSpace)
private boolean CrossedByContour(boolean[] workSpace)
private void ContinueContour()
private void ContourPlotKernel(Graphics g, boolean[] workSpace)
public void paint(Graphics g)
public void setFill(boolean fill)
public void setPalette(Color[] palette)
public void setZedMatrix(cern.colt.matrix.DoubleMatrix2D zed) throws SOMToolboxException
SOMToolboxException
public void setNumberOfContours(int numberOfContours)
public void setLogInterpolation(boolean logInterpolation)
private void MakeMatrixRectangular()