public class SimpleParallel extends java.lang.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.
|
java.lang.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)
ProjectiongetScale in interface Projectiondim - Dimensionpublic boolean isAxisInverted(int axis)
ProjectionParallelisAxisInverted in interface ProjectionParallelaxis - Axis (reordered) positionpublic void setAxisInverted(int axis,
boolean bool)
ProjectionParallelsetAxisInverted in interface ProjectionParallelaxis - Axis (reordered) positionbool - Value of inversion flagpublic void toggleAxisInverted(int axis)
ProjectionParalleltoggleAxisInverted in interface ProjectionParallelaxis - Axis (reordered) positionpublic boolean isDimInverted(int truedim)
ProjectionParallelisDimInverted in interface ProjectionParalleltruedim - Dimension in original numberingpublic void setDimInverted(int truedim,
boolean bool)
ProjectionParallelsetDimInverted in interface ProjectionParalleltruedim - Dimension in original numberingbool - Value of inversion flagpublic void toggleDimInverted(int truedim)
ProjectionParalleltoggleDimInverted in interface ProjectionParalleltruedim - Dimension in original numberingpublic LinearScale getAxisScale(int axis)
ProjectionParallelgetAxisScale in interface ProjectionParallelaxis - Axis (reordered) positionprotected boolean isDimHidden(int truedim)
public boolean isAxisVisible(int dim)
ProjectionParallelisAxisVisible in interface ProjectionParalleldim - Axis (reordered) positionpublic void setAxisVisible(int dim,
boolean vis)
ProjectionParallelsetAxisVisible in interface ProjectionParalleldim - Axis numbervis - Visibility statuspublic void toggleAxisVisible(int dim)
ProjectionParalleltoggleAxisVisible in interface ProjectionParalleldim - Axis numberpublic int getVisibleDimensions()
ProjectionParallelgetVisibleDimensions in interface ProjectionParallelpublic int getDimForAxis(int pos)
ProjectionParallelgetDimForAxis in interface ProjectionParallelpos - Axis numberpublic int getDimForVisibleAxis(int pos)
ProjectionParallelgetDimForVisibleAxis in interface ProjectionParallelpos - Axis number (visible axes only)public void swapAxes(int a,
int b)
ProjectionParallelswapAxes in interface ProjectionParallela - First axisb - Second axispublic void moveAxis(int src,
int dest)
ProjectionParallelmoveAxis in interface ProjectionParallelsrc - axis to shiftdest - new positionpublic double[] fastProjectDataToRenderSpace(NumberVector data)
ProjectionParallelfastProjectDataToRenderSpace in interface ProjectionParalleldata - Input vectorpublic double[] fastProjectDataToRenderSpace(double[] data)
ProjectionParallelfastProjectDataToRenderSpace in interface ProjectionParalleldata - Input vectorpublic double fastProjectRenderToDataSpace(double v,
int projdim)
ProjectionParallelfastProjectRenderToDataSpace in interface ProjectionParallelv - transformed valueprojdim - Axis to use for scaling and inversionpublic double fastProjectDataToRenderSpace(double value,
int dim)
ProjectionParallelfastProjectDataToRenderSpace in interface ProjectionParallelvalue - Input valuedim - Axis to use for scaling and inversionpublic int getAxisForDim(int truedim)
ProjectionParallelgetAxisForDim in interface ProjectionParalleltruedim - Dimensionpublic int getInputDimensionality()
ProjectiongetInputDimensionality in interface Projectionpublic java.lang.String getMenuName()
VisualizationItemnull or empty string.getMenuName in interface VisualizationItempublic Projector getProjector()
ProjectiongetProjector in interface ProjectionCopyright © 2019 ELKI Development Team. License information.