public class Simple2D extends AbstractSimpleProjection implements Projection2D
Modifier and Type | Field and Description |
---|---|
private int |
dim1
Dimensions for fast projection mode.
|
private int |
dim2
Dimensions for fast projection mode.
|
scales
INVSCALE, SCALE
Constructor and Description |
---|
Simple2D(Projector p,
LinearScale[] scales,
int ax1,
int ax2)
Constructor with a given database and axes.
|
Modifier and Type | Method and Description |
---|---|
protected double[] |
dearrange(double[] v)
Undo the rearrangement of components.
|
CanvasSize |
estimateViewport()
Estimate the viewport requirements
|
double[] |
fastProjectDataToRenderSpace(double[] data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectDataToRenderSpace(NumberVector data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectDataToScaledSpace(double[] data)
Project a data vector from data space to scaled space.
|
double[] |
fastProjectDataToScaledSpace(NumberVector data)
Project a data vector from data space to scaled space.
|
double[] |
fastProjectRelativeDataToRenderSpace(double[] data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectRelativeDataToRenderSpace(NumberVector data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectRelativeScaledToRenderSpace(double[] vr)
Project a vector from scaled space to rendering space.
|
double[] |
fastProjectRenderToDataSpace(double x,
double y)
Project a data vector from rendering space to data space.
|
double[] |
fastProjectRenderToScaledSpace(double x,
double y)
Project a vector from rendering space to scaled space.
|
double[] |
fastProjectScaledToRenderSpace(double[] v)
Project a vector from scaled space to rendering space.
|
java.lang.String |
getMenuName()
Name to display in the menu.
|
long[] |
getVisibleDimensions2D()
Get a bit set of dimensions that are visible.
|
protected double[] |
rearrange(double[] v)
Method to rearrange components.
|
flipSecondEquals, projectRelativeRenderToScaled, projectRelativeScaledToRender, projectRenderToScaled, projectScaledToRender
projectDataToRenderSpace, projectDataToRenderSpace, projectDataToScaledSpace, projectDataToScaledSpace, projectRelativeDataToRenderSpace, projectRelativeDataToRenderSpace, projectRelativeDataToScaledSpace, projectRelativeDataToScaledSpace, projectRelativeRenderToDataSpace, projectRelativeScaledToDataSpace, projectRenderToDataSpace, projectScaledToDataSpace
getInputDimensionality, getProjector, getScale
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputDimensionality, getProjector, getScale
private int dim1
private int dim2
public Simple2D(Projector p, LinearScale[] scales, int ax1, int ax2)
p
- Projectorscales
- Scales to useax1
- First axisax2
- Second axispublic double[] fastProjectDataToRenderSpace(double[] data)
Projection2D
fastProjectDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectDataToRenderSpace(NumberVector data)
Projection2D
fastProjectDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectDataToScaledSpace(double[] data)
Projection2D
fastProjectDataToScaledSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectDataToScaledSpace(NumberVector data)
Projection2D
fastProjectDataToScaledSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectScaledToRenderSpace(double[] v)
Projection2D
fastProjectScaledToRenderSpace
in interface Projection2D
v
- vector in scaled spacepublic double[] fastProjectRenderToDataSpace(double x, double y)
Projection2D
fastProjectRenderToDataSpace
in interface Projection2D
x
- X coordinatey
- Y coordinatepublic double[] fastProjectRenderToScaledSpace(double x, double y)
Projection2D
fastProjectRenderToScaledSpace
in interface Projection2D
x
- X coordinatey
- Y coordinatepublic double[] fastProjectRelativeDataToRenderSpace(double[] data)
Projection2D
fastProjectRelativeDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectRelativeDataToRenderSpace(NumberVector data)
Projection2D
fastProjectRelativeDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectRelativeScaledToRenderSpace(double[] vr)
Projection2D
fastProjectRelativeScaledToRenderSpace
in interface Projection2D
vr
- vector in scaled spacepublic long[] getVisibleDimensions2D()
Projection2D
getVisibleDimensions2D
in interface Projection2D
public CanvasSize estimateViewport()
Projection2D
estimateViewport
in interface Projection2D
protected double[] rearrange(double[] v)
AbstractSimpleProjection
rearrange
in class AbstractSimpleProjection
v
- double[] to rearrangeprotected double[] dearrange(double[] v)
AbstractSimpleProjection
dearrange
in class AbstractSimpleProjection
v
- double[] to undo the rearrangementpublic java.lang.String getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
getMenuName
in class AbstractProjection
Copyright © 2019 ELKI Development Team. License information.