Class DendrogramVisualization.HalfWidthPositions
- java.lang.Object
-
- elki.visualization.visualizers.visunproj.DendrogramVisualization.HalfWidthPositions
-
- All Implemented Interfaces:
DendrogramVisualization.Positions
- Enclosing class:
- DendrogramVisualization
private static class DendrogramVisualization.HalfWidthPositions extends java.lang.Object implements DendrogramVisualization.Positions
Compact position storage.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]
xxy
Compact storage of positions.
-
Constructor Summary
Constructors Modifier Constructor Description private
HalfWidthPositions(int size)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
combine(int o1, int o2, double y3, int o3)
Combine two objects, and return the new X coordinate.double
getX(int o)
Get the X coordinate of an object.double
getY(int o)
Get the Y coordinate of an object.void
set(int off, double d, double height)
Set the initial position
-
-
-
Method Detail
-
set
public void set(int off, double d, double height)
Description copied from interface:DendrogramVisualization.Positions
Set the initial position- Specified by:
set
in interfaceDendrogramVisualization.Positions
- Parameters:
off
- Object offsetd
- X coordinateheight
- Y coordinate
-
getX
public double getX(int o)
Description copied from interface:DendrogramVisualization.Positions
Get the X coordinate of an object.- Specified by:
getX
in interfaceDendrogramVisualization.Positions
- Parameters:
o
- Object- Returns:
- X coordinate
-
getY
public double getY(int o)
Description copied from interface:DendrogramVisualization.Positions
Get the Y coordinate of an object.- Specified by:
getY
in interfaceDendrogramVisualization.Positions
- Parameters:
o
- Object- Returns:
- Y coordinate
-
combine
public double combine(int o1, int o2, double y3, int o3)
Description copied from interface:DendrogramVisualization.Positions
Combine two objects, and return the new X coordinate.- Specified by:
combine
in interfaceDendrogramVisualization.Positions
- Parameters:
o1
- First objecto2
- Second objecty3
- Merge Y coordinateo3
- Resulting cluster number- Returns:
- New X coordinate
-
-