Java Doc for GeneralMatrix.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » operation » matrix » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing.operation.matrix 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.referencing.operation.matrix.GeneralMatrix

GeneralMatrix
public class GeneralMatrix extends GMatrix implements XMatrix(Code)
A two dimensional array of numbers. Row and column numbering begins with zero.
since:
   2.2
version:
   $Id: GeneralMatrix.java 24925 2007-03-27 20:12:08Z jgarnett $
author:
   Martin Desruisseaux
author:
   Simone Giannecchini
See Also:   javax.vecmath.GMatrix
See Also:   java.awt.geom.AffineTransform
See Also:   javax.media.jai.PerspectiveTransform
See Also:   javax.media.j3d.Transform3D
See Also:    Jama matrix
See Also:    JSR-83 Multiarray package


Field Summary
final public static  doubleEPS
     Defaul tolerance value for floating point comparisons.

Constructor Summary
public  GeneralMatrix(int size)
     Constructs a square identity matrix of size size  ×  size .
public  GeneralMatrix(int numRow, int numCol)
     Creates a matrix of size numRow  ×  numCol .
public  GeneralMatrix(int numRow, int numCol, double[] matrix)
     Constructs a numRow  ×  numCol matrix initialized to the values in the matrix array.
public  GeneralMatrix(double[][] matrix)
     Constructs a new matrix from a two-dimensional array of doubles.
Parameters:
  matrix - Array of rows.
public  GeneralMatrix(Matrix matrix)
     Constructs a new matrix and copies the initial values from the parameter matrix.
public  GeneralMatrix(GMatrix matrix)
     Constructs a new matrix and copies the initial values from the parameter matrix.
public  GeneralMatrix(AffineTransform transform)
     Constructs a 3×3 matrix from the specified affine transform.
public  GeneralMatrix(Envelope srcRegion, Envelope dstRegion)
     Constructs a transform that maps a source region to a destination region. Axis order and direction are left unchanged.

If the source dimension is equals to the destination dimension, then the transform is affine.

public  GeneralMatrix(AxisDirection[] srcAxis, AxisDirection[] dstAxis)
     Constructs a transform changing axis order and/or direction. For example, the transform may converts (NORTH,WEST) coordinates into (EAST,NORTH).
public  GeneralMatrix(Envelope srcRegion, AxisDirection[] srcAxis, Envelope dstRegion, AxisDirection[] dstAxis)
     Constructs a transform mapping a source region to a destination region. Axis order and/or direction can be changed during the process. For example, the transform may convert (NORTH,WEST) coordinates into (EAST,NORTH).

Method Summary
public static  double[][]getElements(Matrix matrix)
     Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values.
final public  double[][]getElements()
     Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values.
final public  booleanisAffine()
    
final public  booleanisIdentity()
     Returns true if this matrix is an identity matrix.
final public  booleanisIdentity(double tolerance)
    
static  booleanisIdentity(Matrix matrix, double tolerance)
     Returns true if the matrix is an identity matrix using the provided tolerance.
public static  GeneralMatrixload(File file)
     Loads data from the specified file until the first blank line or end of file.
Parameters:
  file - The file to read.
public static  GeneralMatrixload(BufferedReader in, Locale locale)
     Loads data from the specified streal until the first blank line or end of stream.
Parameters:
  in - The stream to read.
Parameters:
  locale - The locale for the numbers to be parsed.
final public  voidmultiply(Matrix matrix)
    
final public  AffineTransformtoAffineTransform2D()
     Returns an affine transform for this matrix.
public  StringtoString()
     Returns a string representation of this matrix.
static  StringtoString(Matrix matrix)
     Returns a string representation of the specified matrix.

Field Detail
EPS
final public static double EPS(Code)
Defaul tolerance value for floating point comparisons.
since:
   2.4




Constructor Detail
GeneralMatrix
public GeneralMatrix(int size)(Code)
Constructs a square identity matrix of size size  ×  size .



GeneralMatrix
public GeneralMatrix(int numRow, int numCol)(Code)
Creates a matrix of size numRow  ×  numCol . Elements on the diagonal j==i are set to 1.



GeneralMatrix
public GeneralMatrix(int numRow, int numCol, double[] matrix)(Code)
Constructs a numRow  ×  numCol matrix initialized to the values in the matrix array. The array values are copied in one row at a time in row major fashion. The array should be exactly numRow*numCol in length. Note that because row and column numbering begins with zero, numRow and numCol will be one larger than the maximum possible matrix index values.



GeneralMatrix
public GeneralMatrix(double[][] matrix) throws IllegalArgumentException(Code)
Constructs a new matrix from a two-dimensional array of doubles.
Parameters:
  matrix - Array of rows. Each row must have the same length.
throws:
  IllegalArgumentException - if the specified matrix is not regular(i.e. if all rows doesn't have the same length).



GeneralMatrix
public GeneralMatrix(Matrix matrix)(Code)
Constructs a new matrix and copies the initial values from the parameter matrix.



GeneralMatrix
public GeneralMatrix(GMatrix matrix)(Code)
Constructs a new matrix and copies the initial values from the parameter matrix.



GeneralMatrix
public GeneralMatrix(AffineTransform transform)(Code)
Constructs a 3×3 matrix from the specified affine transform.



GeneralMatrix
public GeneralMatrix(Envelope srcRegion, Envelope dstRegion)(Code)
Constructs a transform that maps a source region to a destination region. Axis order and direction are left unchanged.

If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:

  • If the target dimension is smaller than the source dimension, then extra dimensions are dropped.
  • If the target dimension is greater than the source dimension, then the coordinates in the new dimensions are set to 0.

Parameters:
  srcRegion - The source region.
Parameters:
  dstRegion - The destination region.



GeneralMatrix
public GeneralMatrix(AxisDirection[] srcAxis, AxisDirection[] dstAxis)(Code)
Constructs a transform changing axis order and/or direction. For example, the transform may converts (NORTH,WEST) coordinates into (EAST,NORTH). Axis direction can be inversed only. For example, it is illegal to transform (NORTH,WEST) coordinates into (NORTH,DOWN).

If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:


  • If the target dimension is smaller than the source dimension, extra axis are dropped. An exception is thrown if the target contains some axis not found in the source.

Parameters:
  srcAxis - The set of axis direction for source coordinate system.
Parameters:
  dstAxis - The set of axis direction for destination coordinate system.
throws:
  IllegalArgumentException - If dstAxis contains some axisnot found in srcAxis , or if some colinear axis were found.



GeneralMatrix
public GeneralMatrix(Envelope srcRegion, AxisDirection[] srcAxis, Envelope dstRegion, AxisDirection[] dstAxis)(Code)
Constructs a transform mapping a source region to a destination region. Axis order and/or direction can be changed during the process. For example, the transform may convert (NORTH,WEST) coordinates into (EAST,NORTH). Axis direction can be inversed only. For example, it is illegal to transform (NORTH,WEST) coordinates into (NORTH,DOWN).

If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:


  • If the target dimension is smaller than the source dimension, extra axis are dropped. An exception is thrown if the target contains some axis not found in the source.

Parameters:
  srcRegion - The source region.
Parameters:
  srcAxis - Axis direction for each dimension of the source region.
Parameters:
  dstRegion - The destination region.
Parameters:
  dstAxis - Axis direction for each dimension of the destination region.
throws:
  MismatchedDimensionException - if the envelope dimension doesn'tmatches the axis direction array length.
throws:
  IllegalArgumentException - If dstAxis contains some axisnot found in srcAxis , or if some colinear axis were found.




Method Detail
getElements
public static double[][] getElements(Matrix matrix)(Code)
Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values. The values are stored into the 2-dimensional array using the row index as the first subscript and the column index as the second. Values are copied; changes to the returned array will not change this matrix.



getElements
final public double[][] getElements()(Code)
Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values. The values are stored into the 2-dimensional array using the row index as the first subscript and the column index as the second. Values are copied; changes to the returned array will not change this matrix.



isAffine
final public boolean isAffine()(Code)



isIdentity
final public boolean isIdentity()(Code)
Returns true if this matrix is an identity matrix.



isIdentity
final public boolean isIdentity(double tolerance)(Code)

since:
   2.3.1



isIdentity
static boolean isIdentity(Matrix matrix, double tolerance)(Code)
Returns true if the matrix is an identity matrix using the provided tolerance.



load
public static GeneralMatrix load(File file) throws IOException(Code)
Loads data from the specified file until the first blank line or end of file.
Parameters:
  file - The file to read. The matrix parsed from the file.
throws:
  IOException - if an error occured while reading the file.
since:
   2.2



load
public static GeneralMatrix load(BufferedReader in, Locale locale) throws IOException(Code)
Loads data from the specified streal until the first blank line or end of stream.
Parameters:
  in - The stream to read.
Parameters:
  locale - The locale for the numbers to be parsed. The matrix parsed from the stream.
throws:
  IOException - if an error occured while reading the stream.
since:
   2.2



multiply
final public void multiply(Matrix matrix)(Code)



toAffineTransform2D
final public AffineTransform toAffineTransform2D() throws IllegalStateException(Code)
Returns an affine transform for this matrix. This is a convenience method for interoperability with Java2D.
throws:
  IllegalStateException - if this matrix is not 3×3,or if the last row is not [0 0 1] .



toString
public String toString()(Code)
Returns a string representation of this matrix. The returned string is implementation dependent. It is usually provided for debugging purposes only.



toString
static String toString(Matrix matrix)(Code)
Returns a string representation of the specified matrix. The returned string is implementation dependent. It is usually provided for debugging purposes only.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.