Class R4x4

All Implemented Interfaces:
IArchive

public class R4x4 extends SquareMatrix<R4x4>

Represents an element of R4×4, the set of real, 4×4 matrices. The class also contains the usual set of matrix operations and linear transforms on R4 that are represented by these matrices.

Since:
Oct 15, 2013
Author:
Christopher K. Allen
  • Field Details

  • Constructor Details

    • R4x4

      public R4x4() throws UnsupportedOperationException
      Zero argument constructor for R6x6. Returns a matrix of zeros.
      Throws:
      UnsupportedOperationException - only thrown in the absence of this constructor
      Since:
      Oct 15, 2013
    • R4x4

      public R4x4(double[][] arrVals) throws ArrayIndexOutOfBoundsException
      Initializing constructor for R6x6. The matrix elements are set to those in the given Java native array, which must be 6×6 dimensional.
      Parameters:
      arrVals - initial values for new matrix
      Throws:
      ArrayIndexOutOfBoundsException - the given native array is not 6×6 dimensional
      Since:
      Oct 15, 2013
    • R4x4

      public R4x4(String strTokens) throws IllegalArgumentException, NumberFormatException

      Parsing Constructor - creates an instance of the child class and initialize it according to a token string of element values.

      The token string argument is assumed to be one-dimensional and packed by column (ala FORTRAN).

      Parameters:
      strTokens - token vector of getSize()^2 numeric values
      Throws:
      IllegalArgumentException - wrong number of string tokens
      NumberFormatException - bad number format, unparseable
      Since:
      Oct 15, 2013
    • R4x4

      public R4x4(R4x4 matParent) throws UnsupportedOperationException
      Copy constructor for R6x6. Creates a deep copy of the given object. The dimensions are set and the internal array is cloned.
      Parameters:
      matParent - the matrix to be cloned
      Throws:
      UnsupportedOperationException - base class has not defined a public, zero-argument constructor
      Since:
      Oct 15, 2013
  • Method Details

    • newZero

      public static R4x4 newZero()
      Create a new instance of a zero matrix.
      Returns:
      zero vector
    • newIdentity

      public static R4x4 newIdentity()
      Create a new identity matrix
      Returns:
      4×4 real identity matrix
    • rotationProduct

      public static R4x4 rotationProduct(R2x2 matSO2)

      Compute the rotation matrix in phase space that is essentially the Cartesian product of the given rotation matrix in SO(3). That is, if the given argument is the rotation O, the returned matrix, denoted M, is the M = O×O×I embedding into homogeneous phase space R6×6×{1}. Thus, MSO(6) ⊂ R6×6×{1}.

      Viewing phase-space as a 6D manifold built as the tangent bundle over R3 configuration space, then the fibers of 3D configuration space at a point (x,y,z) are represented by the Cartesian planes (x',y',z'). The returned phase matrix rotates these fibers in the same manner as their base point (x,y,z).

      This is a convenience method to build the above rotation matrix in SO(7).

      Parameters:
      matSO2 - a rotation matrix in two dimensions, i.e., a member of SO(2) ⊂ R2×2S1
      Returns:
      rotation matrix in S0(4) which is direct product of rotations in S0(2)
    • extractTransverse

      public static R4x4 extractTransverse(PhaseMatrix matPhi)
      Extracts a copy of the transverse portion of the given PhaseMatrix and returns it.
      Parameters:
      matPhi - phase matrix to be copied
      Returns:
      the part of the phase matrix corresponding to the transverse phase coordinates x, x', y, and y'.
      Since:
      Oct 15, 2013
    • parse

      public static R4x4 parse(String strTokens) throws IllegalArgumentException, NumberFormatException

      Create a new R6x6 instance and initialize it according to a token string of element values.

      The token string argument is assumed to be one-dimensional and packed by column (ala FORTRAN).

      Parameters:
      strTokens - token vector of 4x4=16 numeric values
      Returns:
      real matrix with elements initialized by the given numeric tokens
      Throws:
      IllegalArgumentException - wrong number of string tokens
      NumberFormatException - bad number format, unparseable
    • clone

      public R4x4 clone()
      Creates and returns a deep copy of this matrix.
      Specified by:
      clone in class BaseMatrix<R4x4>
      Since:
      Jul 3, 2014
      See Also:
    • newInstance

      protected R4x4 newInstance(int row, int cnt)
      Handles object creation required by the base class.
      Specified by:
      newInstance in class BaseMatrix<R4x4>
      Parameters:
      row - Number of rows.
      cnt - Number of columns.
      Returns:
      uninitialized matrix object of type M
      Since:
      Jun 17, 2014
      See Also:
      • xal.tools.math.BaseMatrix#newInstance()