Package xal.tools.math.r2
Class R2x2
- All Implemented Interfaces:
Serializable
,IArchive
Represents an element of R2x2, the set of real 3x3 matrices. The class a set of the usual matrix operations and linear transforms on R3 represented by the matrix.
- Author:
- Christopher Allen
- See Also:
-
Jama.Matrix
xal.tools.r3.R3
- Serialized Form
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of the allowed index positions for objects of typeR2x2
. -
Field Summary
FieldsFields inherited from class xal.tools.math.BaseMatrix
ATTR_DATA, DBL_EPS, ULPS_BRACKET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a deep copy of this matrix.static R2x2
Create a deep copy of the givenR2x2
matrix object.static R2x2
Create and return a new identity matrixprotected R2x2
newInstance
(int row, int cnt) Handles object creation required by the base class.static R2x2
newRotation
(double dblAng) Create and return the generator element of SO(2) which is a counter-clockwise rotation.static R2x2
static R2x2
newZero()
Create and return a new instance of a zero matrix.static R2x2
Create a R2x2 instance and initialize it according to a token string of element values.Non-destructive Matrix-Vector multiplication.Methods inherited from class xal.tools.math.SquareMatrix
conjugateInv, conjugateTrans, det, getSize, isSymmetric, solve, solveInPlace, timesEquals, trace
Methods inherited from class xal.tools.math.BaseMatrix
assignIdentity, assignMatrix, assignZero, conditionNumber, copy, equals, getArrayCopy, getColCnt, getElem, getElem, getMatrix, getRowCnt, hashCode, inverse, isApproxEqual, isApproxEqual, isEquivalentTo, isSquare, load, max, minus, minusEquals, newInstance, norm1, norm2, normF, normInf, plus, plusEquals, print, rank, save, setElem, setElem, setMatrix, setMatrix, setSubMatrix, times, times, times, timesEquals, toString, toStringMatrix, toStringMatrix, toStringMatrix, transpose
-
Field Details
-
INT_SIZE
public static final int INT_SIZEMatrix size- See Also:
-
-
Constructor Details
-
R2x2
public R2x2()Creates a new instance of R2x2 initialized to zero. -
R2x2
Copy Constructor - create a deep copy of the given matrix.- Parameters:
matParent
- initial value
-
R2x2
Parsing Constructor - create a R2x2 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 2x2=4 numeric values- Throws:
IllegalArgumentException
- wrong number of token stringsNumberFormatException
- bad number format, unparseable
-
-
Method Details
-
newZero
Create and return a new instance of a zero matrix.- Returns:
- a matrix with all zero elements
-
newIdentity
Create and return a new identity matrix- Returns:
- identity matrix object
-
newSymplectic
-
newRotation
Create and return the generator element of SO(2) which is a counter-clockwise rotation.- Parameters:
dblAng
- angle in radians- Returns:
- x-plane counter-clockwise rotation matrix
-
clone
Create a deep copy of the givenR2x2
matrix object. The returned object shares no references with the argument.- Parameters:
matTarget
- matrix to be copied- Returns:
- a deep copy of the argument object
-
parse
Create a R2x2 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 2x2=4 numeric values- Throws:
IllegalArgumentException
- wrong number of token stringsNumberFormatException
- bad number format, unparseable
-
clone
Creates and returns a deep copy of this matrix.- Specified by:
clone
in classBaseMatrix<R2x2>
- Since:
- Jul 3, 2014
- See Also:
-
times
Non-destructive Matrix-Vector multiplication. Specifically, the vector y given by
y = Ax
where A is this matrix and x is the given vector.- Parameters:
vec
- the vector factor x- Returns:
- the matrix-vector product of this matrix with the given vector
-
newInstance
Handles object creation required by the base class.- Specified by:
newInstance
in classBaseMatrix<R2x2>
- 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()
-