public class SimpleParallel extends Object implements ProjectionParallel
Modifier and Type | Field and Description |
---|---|
(package private) int[] |
dimOrder
Ordering of dimensions
|
(package private) static byte |
FLAG_HIDDEN
Flag for visibility
|
(package private) static byte |
FLAG_INVERTED
Flag for inverted dimensions
TODO: handle inversions via scales?
|
(package private) byte[] |
flags
Flags for the dimensions
|
private Projector |
p
Projector
|
private LinearScale[] |
scales
Scales
|
(package private) int |
visDims
Number of visible dimensions
|
INVSCALE, SCALE
Constructor and Description |
---|
SimpleParallel(Projector p,
LinearScale[] scales)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double[] |
fastProjectDataToRenderSpace(double[] data)
Fast project a vector from data to render space
|
double |
fastProjectDataToRenderSpace(double value,
int dim)
Project the value of a single axis to its display value
|
double[] |
fastProjectDataToRenderSpace(NumberVector data)
Fast project a vector from data to render space
|
double |
fastProjectRenderToDataSpace(double v,
int projdim)
Project a display value back to the original data space
|
int |
getAxisForDim(int truedim)
Find the axis assigned to the given dimension.
|
LinearScale |
getAxisScale(int axis)
Get scale for the given axis
|
int |
getDimForAxis(int pos)
Get the dimension for the given axis number
|
int |
getDimForVisibleAxis(int pos)
Get the dimension for the given visible axis
|
int |
getInputDimensionality()
Get the input dimensionality of the projection.
|
String |
getMenuName()
Name to display in the menu.
|
Projector |
getProjector()
Projector used for generating this projection.
|
LinearScale |
getScale(int dim)
Get the scale class for a particular dimension.
|
int |
getVisibleDimensions()
Get the number of visible dimension.
|
boolean |
isAxisInverted(int axis)
Get inversion flag of axis.
|
boolean |
isAxisVisible(int dim)
Test whether the current axis is visible
|
protected boolean |
isDimHidden(int truedim) |
boolean |
isDimInverted(int truedim)
Get inversion flag of dimension.
|
void |
moveAxis(int src,
int dest)
shift a dimension to another position
|
void |
setAxisInverted(int axis,
boolean bool)
Set inversion flag of axis.
|
void |
setAxisVisible(int dim,
boolean vis)
Set the visibility of the axis.
|
void |
setDimInverted(int truedim,
boolean bool)
Set inversion flag of a dimension.
|
void |
swapAxes(int a,
int b)
Exchange axes A and B
|
void |
toggleAxisInverted(int axis)
Toggle inverted flag of axis.
|
void |
toggleAxisVisible(int dim)
Toggle visibility of the axis.
|
void |
toggleDimInverted(int truedim)
Toggle inverted flag of dimension.
|
int visDims
byte[] flags
int[] dimOrder
private LinearScale[] scales
private Projector p
static final byte FLAG_HIDDEN
static final byte FLAG_INVERTED
public SimpleParallel(Projector p, LinearScale[] scales)
p
- Projectorscales
- Scales to usepublic LinearScale getScale(int dim)
Projection
getScale
in interface Projection
dim
- Dimensionpublic boolean isAxisInverted(int axis)
ProjectionParallel
isAxisInverted
in interface ProjectionParallel
axis
- Axis (reordered) positionpublic void setAxisInverted(int axis, boolean bool)
ProjectionParallel
setAxisInverted
in interface ProjectionParallel
axis
- Axis (reordered) positionbool
- Value of inversion flagpublic void toggleAxisInverted(int axis)
ProjectionParallel
toggleAxisInverted
in interface ProjectionParallel
axis
- Axis (reordered) positionpublic boolean isDimInverted(int truedim)
ProjectionParallel
isDimInverted
in interface ProjectionParallel
truedim
- Dimension in original numberingpublic void setDimInverted(int truedim, boolean bool)
ProjectionParallel
setDimInverted
in interface ProjectionParallel
truedim
- Dimension in original numberingbool
- Value of inversion flagpublic void toggleDimInverted(int truedim)
ProjectionParallel
toggleDimInverted
in interface ProjectionParallel
truedim
- Dimension in original numberingpublic LinearScale getAxisScale(int axis)
ProjectionParallel
getAxisScale
in interface ProjectionParallel
axis
- Axis (reordered) positionprotected boolean isDimHidden(int truedim)
public boolean isAxisVisible(int dim)
ProjectionParallel
isAxisVisible
in interface ProjectionParallel
dim
- Axis (reordered) positionpublic void setAxisVisible(int dim, boolean vis)
ProjectionParallel
setAxisVisible
in interface ProjectionParallel
dim
- Axis numbervis
- Visibility statuspublic void toggleAxisVisible(int dim)
ProjectionParallel
toggleAxisVisible
in interface ProjectionParallel
dim
- Axis numberpublic int getVisibleDimensions()
ProjectionParallel
getVisibleDimensions
in interface ProjectionParallel
public int getDimForAxis(int pos)
ProjectionParallel
getDimForAxis
in interface ProjectionParallel
pos
- Axis numberpublic int getDimForVisibleAxis(int pos)
ProjectionParallel
getDimForVisibleAxis
in interface ProjectionParallel
pos
- Axis number (visible axes only)public void swapAxes(int a, int b)
ProjectionParallel
swapAxes
in interface ProjectionParallel
a
- First axisb
- Second axispublic void moveAxis(int src, int dest)
ProjectionParallel
moveAxis
in interface ProjectionParallel
src
- axis to shiftdest
- new positionpublic double[] fastProjectDataToRenderSpace(NumberVector data)
ProjectionParallel
fastProjectDataToRenderSpace
in interface ProjectionParallel
data
- Input vectorpublic double[] fastProjectDataToRenderSpace(double[] data)
ProjectionParallel
fastProjectDataToRenderSpace
in interface ProjectionParallel
data
- Input vectorpublic double fastProjectRenderToDataSpace(double v, int projdim)
ProjectionParallel
fastProjectRenderToDataSpace
in interface ProjectionParallel
v
- transformed valueprojdim
- Axis to use for scaling and inversionpublic double fastProjectDataToRenderSpace(double value, int dim)
ProjectionParallel
fastProjectDataToRenderSpace
in interface ProjectionParallel
value
- Input valuedim
- Axis to use for scaling and inversionpublic int getAxisForDim(int truedim)
ProjectionParallel
getAxisForDim
in interface ProjectionParallel
truedim
- Dimensionpublic int getInputDimensionality()
Projection
getInputDimensionality
in interface Projection
public String getMenuName()
VisualizationItem
null
or empty string.getMenuName
in interface VisualizationItem
public Projector getProjector()
Projection
getProjector
in interface Projection
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.