/*$************************************************************************************************
**
** $Id: Matrix.java 831 2006-05-01 00:27:23Z Desruisseaux $
**
** $URL: http://svn.code.sf.net/p/geoapi/code/branches/2.0.x/geoapi/src/main/java/org/opengis/referencing/operation/Matrix.java $
**
** Copyright (C) 2003-2005 Open GIS Consortium, Inc.
** All Rights Reserved. http://www.opengis.org/legal/
**
*************************************************************************************************/
package org.opengis.referencing.operation;
// OpenGIS direct dependencies
import org.opengis.util.Cloneable;
// Annotations
import org.opengis.annotation.UML;
import org.opengis.annotation.Extension;
import static org.opengis.annotation.Obligation.*;
import static org.opengis.annotation.Specification.*;
/**
* A two dimensional array of numbers. Row and column numbering begins with zero. The API for
* this interface matches closely the API in various {@linkplain javax.vecmath.GMatrix matrix}
* implementations available in Java3D,
* which should enable straightforward implementations. Java3D provides matrix for the general
* case and optimized versions for 3×3 and 4×4 cases, which are quite common in a
* transformation package.
*
* @version Implementation specification 1.0
* @author Open Geospatial Consortium
* @author Martin Desruisseaux (IRD)
* @since GeoAPI 1.0
*
* @see javax.vecmath.Matrix3d
* @see javax.vecmath.Matrix4d
* @see javax.vecmath.GMatrix
* @see java.awt.geom.AffineTransform
* @see javax.media.jai.PerspectiveTransform
* @see javax.media.j3d.Transform3D
* @see Jama matrix
* @see JSR-83 Multiarray package
*/
@UML(identifier="PT_Matrix", specification=OGC_01009)
public interface Matrix extends Cloneable {
/**
* Returns the number of rows in this matrix.
*
* @return The number of rows in this matrix.
*/
@Extension
int getNumRow();
// Same signature than GMatrix, for straightforward implementation.
/**
* Returns the number of colmuns in this matrix.
*
* @return The number of columns in this matrix.
*/
@Extension
int getNumCol();
// Same signature than GMatrix, for straightforward implementation.
/**
* Retrieves the value at the specified row and column of this matrix.
*
* @param row The row number to be retrieved (zero indexed).
* @param column The column number to be retrieved (zero indexed).
* @return The value at the indexed element.
*/
@Extension
double getElement(int row, int column);
// Same signature than GMatrix, for straightforward implementation.
/**
* Modifies the value at the specified row and column of this matrix.
*
* @param row The row number to be retrieved (zero indexed).
* @param column The column number to be retrieved (zero indexed).
* @param value The new matrix element value.
*/
@Extension
void setElement(int row, int column, double value);
// Same signature than GMatrix, for straightforward implementation.
/**
* Returns {@code true} if this matrix is an identity matrix.
*
* @return {@code true} if this matrix is an identity matrix.
*/
@Extension
boolean isIdentity();
/**
* Returns a clone of this matrix.
*/
/*{Matrix}*/ Object clone();
}
Ads help maintain this website.