uk.ac.starlink.ast
Class MatrixMap

java.lang.Object
  extended by uk.ac.starlink.ast.AstObject
      extended by uk.ac.starlink.ast.Mapping
          extended by uk.ac.starlink.ast.MatrixMap

public class MatrixMap
extends Mapping

Java interface to the AST MatrixMap class - map coordinates by multiplying by a matrix. A MatrixMap is form of Mapping which performs a general linear transformation. Each set of input coordinates, regarded as a column-vector, are pre-multiplied by a matrix (whose elements are specified when the MatrixMap is created) to give a new column-vector containing the output coordinates. If appropriate, the inverse transformation may also be performed.

Licence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details.

You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,Fifth Floor, Boston, MA 02110-1301, USA

See Also:
AST MatrixMap

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.starlink.ast.Mapping
Mapping.Interpolator, Mapping.Spreader
 
Field Summary
 
Fields inherited from class uk.ac.starlink.ast.Mapping
LINEAR_INTERPOLATOR, LINEAR_SPREADER, NEAREST_INTERPOLATOR, NEAREST_SPREADER
 
Fields inherited from class uk.ac.starlink.ast.AstObject
AST__BAD, AST__TUNULL, pointer
 
Constructor Summary
MatrixMap(int nin, int nout)
          Creates a MatrixMap using a unit matrix.
MatrixMap(int nin, int nout, double[] diag)
          Creates a MatrixMap using a diagonal matrix.
MatrixMap(int nin, int nout, double[][] fullmatrix)
          Creates a MatrixMap using a fully specified matrix.
 
Method Summary
 
Methods inherited from class uk.ac.starlink.ast.Mapping
decompose, getInvert, getNin, getNout, getReport, getTranForward, getTranInverse, invert, linearApprox, mapBox, mapSplit, rate, rebin, rebinD, rebinF, rebinI, resample, resampleB, resampleD, resampleF, resampleI, resampleL, resampleS, setInvert, setReport, simplify, tran1, tran2, tranGrid, tranN, tranP
 
Methods inherited from class uk.ac.starlink.ast.AstObject
annul, clear, copy, delete, equals, finalize, getAstConstantI, getB, getC, getD, getF, getI, getID, getIdent, getL, getNobject, getObjSize, getRefCount, hashCode, isThreaded, reportVersions, sameObject, set, setB, setC, setD, setF, setI, setID, setIdent, setL, show, test, tune
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixMap

public MatrixMap(int nin,
                 int nout,
                 double[][] fullmatrix)
Creates a MatrixMap using a fully specified matrix.

Parameters:
nin - the number of input coordinates
nout - the number of output coordinates
fullmatrix - the matrix defining the transformation. fullmatrix must have nout elements, each of which is an array of doubles with nin elements.
Throws:
AstException - if there is an error in the AST library, or if the supplied matrix is the wrong shape

MatrixMap

public MatrixMap(int nin,
                 int nout,
                 double[] diag)
Creates a MatrixMap using a diagonal matrix. All off-diagonal elements are considered equal to zero.

Parameters:
nin - the number of input coordinates
nout - the number of output coordinates
diag - the diagonal elements of the matrix defining the transformation. Must have at least min(nin,nout) elements.
Throws:
AstException - if there is an error in the AST library, or if the supplied matrix is the wrong shape

MatrixMap

public MatrixMap(int nin,
                 int nout)
Creates a MatrixMap using a unit matrix.

Parameters:
nin - the number of input coordinates
nout - the number of output coordinates
Throws:
AstException - if there is an error in the AST library


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.