JNISpice
version 2.0.0

spice.basic
Class Matrix66

java.lang.Object
  extended by spice.basic.Matrix66

public class Matrix66
extends java.lang.Object

Class Matrix66 represents 6 by 6 double precision matrices.

Version 1.0.0 22-DEC-2009 (NJB)


Constructor Summary
Matrix66()
          Construct a zero-filled matrix.
Matrix66(double[] array36)
          Construct a Matrix66 from an array of type double[].
Matrix66(double[][] array6x6)
          Construct a Matrix66 from an array of type double[][].
Matrix66(Matrix66 matrix)
          Construct a Matrix66 from another Matrix66.
 
Method Summary
 Matrix66 add(Matrix66 m2)
          Add this instance to another Matrix66 instance.
 double dist(Matrix66 m2)
          Return the vector (L2) distance between this instance and another Matrix66 instance.
 Matrix33 getBlock(int blockRow, int blockCol)
          Return a specified 3x3 block from this instance.
 double getElt(int i, int j)
          Return the element of this instance at index [i][j].
static Matrix66 identity()
          Return the identity matrix.
 Matrix66 mxm(Matrix66 m2)
          Left-multiply a second Matrix66 instance by this instance.
 Vector6 mxv(Vector6 vin)
          Left-multiply a 6-dimensional double precision vector by a 6x6 double precision matrix.
 double norm()
          Compute the vector (L2) norm of this instance.
 Matrix66 scale(double s)
          Multiply this instance by a scalar.
 Matrix66 sub(Matrix66 m2)
          Subtract another Matrix66 instance from this instance.
 double[][] toArray()
          Return a 6x6 array containing the contents of a Matrix66 instance.
 double[] toArray1D()
          Return a one-dimensional array containing the contents of a Matrix66 instance.
 java.lang.String toString()
          Utility for displaying a Matrix66.
 Matrix66 transposeByBlocks()
          Transpose the 3x3 blocks of this Matrix66 instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Matrix66

public Matrix66()
Construct a zero-filled matrix.


Matrix66

public Matrix66(Matrix66 matrix)
Construct a Matrix66 from another Matrix66. This method creates a deep copy.


Matrix66

public Matrix66(double[][] array6x6)
         throws SpiceException
Construct a Matrix66 from an array of type double[][].

Throws:
SpiceException

Matrix66

public Matrix66(double[] array36)
         throws SpiceException
Construct a Matrix66 from an array of type double[]. The array elements are assumed to be arin row-major order.

Throws:
SpiceException
Method Detail

identity

public static Matrix66 identity()
Return the identity matrix.


toArray

public double[][] toArray()
Return a 6x6 array containing the contents of a Matrix66 instance.


toArray1D

public double[] toArray1D()
Return a one-dimensional array containing the contents of a Matrix66 instance. The contents of the array are arranged in row-major order.


getElt

public double getElt(int i,
                     int j)
              throws SpiceException
Return the element of this instance at index [i][j].

Throws:
SpiceException

getBlock

public Matrix33 getBlock(int blockRow,
                         int blockCol)
                  throws SpiceException
Return a specified 3x3 block from this instance.

The arguments `blockRow' and `blockCol' refer to row and column indices of the matrix when considered as a 2x2 matrix of 3x3 blocks. The range of `blockRow' and `blockCol' is 0:1.

Throws:
SpiceException

mxm

public Matrix66 mxm(Matrix66 m2)
Left-multiply a second Matrix66 instance by this instance.


mxv

public Vector6 mxv(Vector6 vin)
            throws SpiceException
Left-multiply a 6-dimensional double precision vector by a 6x6 double precision matrix.

Throws:
SpiceException

add

public Matrix66 add(Matrix66 m2)
Add this instance to another Matrix66 instance.


sub

public Matrix66 sub(Matrix66 m2)
Subtract another Matrix66 instance from this instance.


scale

public Matrix66 scale(double s)
Multiply this instance by a scalar.


norm

public double norm()
Compute the vector (L2) norm of this instance.


dist

public double dist(Matrix66 m2)
Return the vector (L2) distance between this instance and another Matrix66 instance.


transposeByBlocks

public Matrix66 transposeByBlocks()
                           throws SpiceException
Transpose the 3x3 blocks of this Matrix66 instance.

This transformation inverts a state transformation matrix.

Throws:
SpiceException

toString

public java.lang.String toString()
Utility for displaying a Matrix66. This method overrides Object's toString() method.

Overrides:
toString in class java.lang.Object

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)