

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object uk.ac.starlink.ast.Transformer uk.ac.starlink.ast.Transformer1
public abstract class Transformer1
Defines a custom onedimensional coordinate transformation function.
This abstract subclass of Transformer
is provided for
convenience when only a 1d transformation is required. Subclasses
need to implement the tran1
method, which is somewhat more
convenient than Transformer
's tranP
method.
Constructor Summary  

Transformer1()

Method Summary  

boolean 
canTransformCoords(int nin,
int nout)
Indicates whether this Transformer
is able to transform between coordinate spaces with the given
dimensionalities. 
abstract double[] 
tran1(int npoint,
double[] xin,
boolean forward)
Transforms points from 1d input coordinates to 1d output coordinates. 
double[][] 
tranP(int npoint,
int ncoord_in,
double[][] in,
boolean forward,
int ncoord_out)
Transforms points from input coordinates to output coordinates. 
Methods inherited from class uk.ac.starlink.ast.Transformer 

getAuthor, getContact, getPurpose, hasForward, hasInverse, simpFI, simpIF 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public Transformer1()
Method Detail 

public final boolean canTransformCoords(int nin, int nout)
Transformer
is able to transform between coordinate spaces with the given
dimensionalities.
canTransformCoords
in class Transformer
nin
 the number of coordinates of an input pointnout
 the number of coordinates of an output point
nin
and nout
are equal to 1public final double[][] tranP(int npoint, int ncoord_in, double[][] in, boolean forward, int ncoord_out) throws Exception
Transformer
Transformer
,
taking an array of input coordinate arrays and returning
an array of output coordinate arrays.
This method will only be called with forward
set true
if a prior call of the hasForward
method has returned
true, and will only be called with forward
set false
if a prior call of the hasInverse
has returned true.
If forward
is true, then this method will only be called
with values of ncoord_in
, ncoord_out
for which a prior call of canTransform(ncoord_in,ncoord_out)
has returned true.
If forward
is false, then this method will only be called
with values of ncoord_in
, ncoord_out
for which a prior call of canTransform(ncoord_out,ncoord_in)
has returned true.
tranP
in class Transformer
npoint
 the number of points to be transformedncoord_in
 the number of coordinates being supplied
for each input point (the dimensionality of
the input space)in
 an array of ncoord_in
arrays,
each containing npoint
elements.
These give the coordinates of each point to
transform.forward
 true
if the forward transformation
is to be used, false
if its inverse
transformation is to be usedncoord_out
 the number of coordinates being generated
by the transformation for each output point
(the dimensionality of the output space).
This need not be equal to ncoord_in
.
ncoord_out
arrays,
each containing npoint
elements.
These give the coordinates of the transformed
points.
throws Exception If an error occurs during the transformation,
this method may throw an Exception. In this
case the transformation will be aborted.
Exception
public abstract double[] tran1(int npoint, double[] xin, boolean forward) throws Exception
Transformer1
,
taking an input coordinate array and returning an output
coordinate array.
This method will only be called with forward
set true
if a prior call of the hasForward
method has returned
true, and will only be called with forward
set false
if a prior call of the hasInverse
has returned true.
npoint
 the number of points to be transformedxin
 an array of npoint
elements
representing the coordinates to be transformedforward
 true
if the forward transformation
is to be used, false
if its inverse
transformation is to be used
npoint
elements giving the
transformed coordinates.
throws Exception If an error occurs during the transformation,
this method may throw an Exception. In this
case the transformation will be aborted.
Exception


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 