Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.util.math
Class SquareMatrix

    java.lang.Object
      org.pdfclown.util.math.SquareMatrix

All Implemented Interfaces:
  Cloneable

    public final class SquareMatrix

extends Object
implements Cloneable

Square matrix providing fundamental operations of linear algebra.

### Remarks

This class is a specialized adaptation from the original JAMA (Java Matrix Package) project, brought to the public domain by The MathWorks, Inc. and the National Institute of Standards and Technology.

Since:
  0.0.4
Version:
  0.1.0
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
`SquareMatrix(double[][] data)` Construct a matrix from a 2-D array.
`SquareMatrix(int size)`

Method Summary
`Object` | `clone()`
`static SquareMatrix` | `get(AffineTransform transform)` Gets the `SquareMatrix` representation of an `AffineTransform` object.
`double[][]` | `getData()` Gets the internal two-dimensional array.
`double` | `getDet()` Gets the matrix determinant.
`static SquareMatrix` | `getIdentity(int size)` Gets the identity matrix.
`SquareMatrix` | `getInverse()` Gets the matrix inverse.
`SquareMatrix` | `getMatrix(int[] rowIndexes, int startColumnIndex)` Gets a submatrix.
`int` | `getSize()` Gets the matrix dimension.
`SquareMatrix` | `solve(SquareMatrix target)` Solves [this] * [return] = [target]
`AffineTransform` | `toTransform()` Converts this matrix into an `AffineTransform` object.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SquareMatrix

    public SquareMatrix(int size)

### SquareMatrix

    public SquareMatrix(double[][] data)

  Construct a matrix from a 2-D array.

  Parameters:
    `data` - Two-dimensional array of doubles.
  Throws:
    `IllegalArgumentException` - All rows must have the same length

Method Detail

### get

    public static SquareMatrix get(AffineTransform transform)

  Gets the `SquareMatrix` representation of an `AffineTransform` object.

### getIdentity

    public static SquareMatrix getIdentity(int size)

  Gets the identity matrix.

  Parameters:
    `size` - Matrix dimension.

### clone

    public Object clone()

  Overrides:
    `clone` in class `Object`

### getData

    public double[][] getData()

  Gets the internal two-dimensional array.

### getMatrix

    public SquareMatrix getMatrix(int[] rowIndexes,
                                  int startColumnIndex)

  Gets a submatrix.

  Parameters:
    `rowIndexes` - Array of row indices.
    `startColumnIndex` - Initial column index.
  Throws:
    `ArrayIndexOutOfBoundsException` - Submatrix indices

### getDet

    public double getDet()

  Gets the matrix determinant.

### getInverse

    public SquareMatrix getInverse()

  Gets the matrix inverse.

### getSize

    public int getSize()

  Gets the matrix dimension.

### solve

    public SquareMatrix solve(SquareMatrix target)

  Solves [this] * [return] = [target]

  Parameters:
    `target` - Resulting matrix.
  Returns:
    Solution.

### toTransform

    public AffineTransform toTransform()

  Converts this matrix into an `AffineTransform` object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.