|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.imsl.chart.AbstractChartNode
com.imsl.chart.ChartNode
com.imsl.chart.Data
com.imsl.chart.Dendrogram
public class Dendrogram
A Dendrogram chart for cluster analysis.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from class com.imsl.chart.AbstractChartNode |
---|
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG |
Constructor Summary | |
---|---|
Dendrogram(AxisXY axis,
ClusterHierarchical clusterHierarchical)
Constructs a vertical dendrogram chart using supplied ClusterHierarchical object. |
|
Dendrogram(AxisXY axis,
ClusterHierarchical clusterHierarchical,
int type)
Constructs a dendrogram chart using supplied ClusterHierarchical object. |
|
Dendrogram(AxisXY axis,
double[] clusterLevel,
int[] leftSons,
int[] rightSons)
Constructs a vertical dendrogram chart using supplied data. |
|
Dendrogram(AxisXY axis,
double[] clusterLevel,
int[] leftSons,
int[] rightSons,
int type)
Constructs a dendrogram chart using supplied data. |
Method Summary | |
---|---|
void |
dataRange(double[] range)
Update the data range, range = {xmin,xmax,ymin,ymax} . |
double[][] |
getCoordinates()
Convenience routine to get the "Coordinates" attribute. |
int[] |
getLeftSons()
Convenience routine to get the "LeftSons" attribute. |
double[] |
getLevels()
Convenience routine to get the "Levels" attribute. |
int[] |
getOrder()
Convenience routine to get the "Order" attribute. |
int[] |
getRightSons()
Convenience routine to get the "RightSons" attribute. |
void |
paint(Draw draw)
Paints this node and all of its children. |
void |
setCoordinates(double[][] value)
Convenience routine to set the "Coordinates" attribute. |
void |
setLabels(String[] labels)
Sets up the axis labels for dendrogram plot. |
void |
setLeftSons(int[] value)
Convenience routine to set the "LeftSons" attribute. |
void |
setLevels(double[] value)
Convenience routine to set the "Levels" attribute. |
void |
setLineColor(Color[] colors)
Define colors for individual clusters. |
void |
setLineColor(String[] colors)
Define colors for individual clusters. |
void |
setOrder(int[] value)
Convenience routine to set the "Order" attribute. |
void |
setRightSons(int[] value)
Convenience routine to set the "RightSons" attribute. |
Methods inherited from class com.imsl.chart.Data |
---|
formatLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public Dendrogram(AxisXY axis, ClusterHierarchical clusterHierarchical)
axis
- the AxisXY
parent of this nodeclusterHierarchical
- a ClusterHierarchical
objectpublic Dendrogram(AxisXY axis, ClusterHierarchical clusterHierarchical, int type)
axis
- the AxisXY
parent of this nodeclusterHierarchical
- a ClusterHierarchical
objecttype
- an int
which specifies the DendrogramType.
Legal values are DENDROGRAM_TYPE_VERTICAL
or
DENDROGRAM_TYPE_HORIZONTAL
.ChartNode.DENDROGRAM_TYPE_VERTICAL
,
ChartNode.DENDROGRAM_TYPE_HORIZONTAL
public Dendrogram(AxisXY axis, double[] clusterLevel, int[] leftSons, int[] rightSons)
axis
- the AxisXY
parent of this nodeclusterLevel
- a double
array which contains the levels
at which the clusters are joinedleftSons
- an int
array which contains the left sons
of each merged clusterrightSons
- an int
array which contains the right sons
of each merged clusterpublic Dendrogram(AxisXY axis, double[] clusterLevel, int[] leftSons, int[] rightSons, int type)
axis
- the AxisXY
parent of this nodeclusterLevel
- a double
array which contains the levels
at which the clusters are joinedleftSons
- an int
array which contains the left sons
of each merged clusterrightSons
- an int
array which contains the right sons
of each merged clustertype
- an int
which specifies the DendrogramType.
Legal values are DENDROGRAM_TYPE_VERTICAL or
DENDROGRAM_TYPE_HORIZONTAL
.
See Also:
ChartNode.DENDROGRAM_TYPE_VERTICAL
,
ChartNode.DENDROGRAM_TYPE_HORIZONTAL
Method Detail
dataRange
public void dataRange(double[] range)
- Update the data range,
range = {xmin,xmax,ymin,ymax}
.
The entries in range are updated to reflect the extent of
the data in this node.
The argument range
is an input/output variable. Its value should be
updated only if the data in this node is outside the range
already in the array.
- Overrides:
dataRange
in class Data
- Parameters:
range
- a double
array which contains the updated
range, {xmin,xmax,ymin,ymax}
getCoordinates
public double[][] getCoordinates()
- Convenience routine to get the "Coordinates" attribute.
- Returns:
- the
double
[][] array of coordinates.
getLeftSons
public int[] getLeftSons()
- Convenience routine to get the "LeftSons" attribute.
- Returns:
- the
int
array of left sons.
getLevels
public double[] getLevels()
- Convenience routine to get the "Levels" attribute.
- Returns:
- the
double
array of cluster levels.
getOrder
public int[] getOrder()
- Convenience routine to get the "Order" attribute.
- Returns:
- an
int
array of the order of clusters
as they appear in the dendrogram.
getRightSons
public int[] getRightSons()
- Convenience routine to get the "RightSons" attribute.
- Returns:
- an
int
array of right sons.
paint
public void paint(Draw draw)
- Paints this node and all of its children.
This is normally called only by the
paint method in this node's parent.
- Overrides:
paint
in class Data
- Parameters:
draw
- the Draw
object to be painted
setCoordinates
public void setCoordinates(double[][] value)
- Convenience routine to set the "Coordinates" attribute.
- Parameters:
value
- a double
[][] array of coordinates.
setLabels
public void setLabels(String[] labels)
- Sets up the axis labels for dendrogram plot.
This turns off autoscaling on the axis and sets the Window
attribute depending on the number of points being plotted.
Note that user-defined labels will be re-ordered to match
the order of the clusters displayed in the plot.
- Parameters:
labels
- a String
array with which
to label the axis. The number of labels
must equal the number of items.
setLeftSons
public void setLeftSons(int[] value)
- Convenience routine to set the "LeftSons" attribute.
- Parameters:
value
- an int
array of left sons.
setLevels
public void setLevels(double[] value)
- Convenience routine to set the "Levels" attribute.
- Parameters:
value
- a double
array of cluster levels.
setLineColor
public void setLineColor(Color[] colors)
- Define colors for individual clusters. The color of the topmost level should
be set using
ChartNode.setLineColor(java.awt.Color color)
. This
method will color N clusters, where N is the number of elements in the
colors[] array.
- Parameters:
colors
- a Color
array which contains each color
to use for the subclusters.
setLineColor
public void setLineColor(String[] colors)
- Define colors for individual clusters. The color of the topmost level should
be set using
ChartNode.setLineColor(String color)
. This
method will color N clusters, where N is the number of elements in the
colors[] array.
- Parameters:
colors
- a String
array which contains each color
to use for the subclusters.
setOrder
public void setOrder(int[] value)
- Convenience routine to set the "Order" attribute.
- Parameters:
value
- an int
array of the order of clusters
as they appear in the dendrogram.
setRightSons
public void setRightSons(int[] value)
- Convenience routine to set the "RightSons" attribute.
- Parameters:
value
- an int
array of right sons.
Overview
Package
Class
Tree
Index
Help
JMSLTM Numerical Library 5.0.1
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.