ru.sscc.spline.reduction
Class ScaledReduction

java.lang.Object
  |
  +--ru.sscc.spline.reduction.ScaledReduction

public final class ScaledReduction
extends java.lang.Object
implements Reduction

The implementation of an abstract space reduction based on affine transform yi = si*(xi-oi) with different scale factors for different directions. Here xi are initial point coordinates, yi are reduced point coordinates, si are scale factors in i-th direction, oi are coordinates of an origin.

See Also:
Serialized Form

Constructor Summary
ScaledReduction(RealPointer origin, RealPointer scale, int dimension)
          Constructs the reduction based on user's origin and scale vectors.
ScaledReduction(RealVectors data)
          Constructs the reduction scale vector in such a way to map a mesh bounding box to the unit multidimensional cube.
ScaledReduction(RealVectors data, RealPointer scale)
          Constructs the reduction based on user's scale vector.
 
Method Summary
 int initialDimension()
          Returns the dimension of initial space of independent varibles.
 int reducedDimension()
          Returns the dimension of reduced space of independent varibles.
 void reducePoint(RealPointer x, RealPointer y)
          Transforms a point coordinates from initial to reduced using affine transformation yi = si*(xi-oi).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaledReduction

public ScaledReduction(RealPointer origin,
                       RealPointer scale,
                       int dimension)
Constructs the reduction based on user's origin and scale vectors.
Parameters:
origin - the reduction origin
scale - the scale vector
dimension - the space dimension

ScaledReduction

public ScaledReduction(RealVectors data)
Constructs the reduction scale vector in such a way to map a mesh bounding box to the unit multidimensional cube. The mass center is associated with the new origin.
Parameters:
data - the initial mesh

ScaledReduction

public ScaledReduction(RealVectors data,
                       RealPointer scale)
Constructs the reduction based on user's scale vector. The mass center is associated with the new origin.
Parameters:
data - the initial mesh
scale - the scale vector (null value means autoscaling to the unit cube)
Method Detail

initialDimension

public int initialDimension()
Returns the dimension of initial space of independent varibles.
Specified by:
initialDimension in interface Reduction

reducedDimension

public int reducedDimension()
Returns the dimension of reduced space of independent varibles.
Specified by:
reducedDimension in interface Reduction

reducePoint

public void reducePoint(RealPointer x,
                        RealPointer y)
Transforms a point coordinates from initial to reduced using affine transformation yi = si*(xi-oi).
Specified by:
reducePoint in interface Reduction
Parameters:
x - a point in initial coordinates
y - the point in reduced coordinates