public class TrnsPhaseVector extends BaseVector<TrnsPhaseVector>
Class TransPhaseVector
represents transverse
phase coordinates. This set of phase coordinates is isomorphic to
R4, however, in order to represent translations
of phase coordinates by matrix multiplication, this class is embedded
in the space R4×{1} ⊂ R5
of "homogeneous coordinates". Matrix multiplication is performed by
elements of the class
.
TrnsPhaseMatrix
The last coordinate of all homogeneous (transverse) phase vectors v ∈ R5 is 1. Thus v = (x,x',y,y',1). Likewise, the (5,5) element of any matrix Φ ∈ R4×4×{1} ⊂ R5×5 representing an operator in homogeneous coordinates must be 1.
Modifier and Type | Class and Description |
---|---|
static class |
TrnsPhaseVector.IND
Enumeration for the element transverse position and velocity indices
for homogeneous phase space objects.
|
Modifier and Type | Field and Description |
---|---|
static int |
INT_SIZE
number of matrix dimensions
|
ATTR_DATA
Constructor and Description |
---|
TrnsPhaseVector()
Zero argument constructor for
TrnsPhaseVector . |
TrnsPhaseVector(double[] arrVals)
Initializing constructor for class
TrnsPhaseVector . |
TrnsPhaseVector(java.lang.String strTokens)
Parsing Constructor - creates an instance of the class and initialize it
according to a token string of element values.
|
TrnsPhaseVector(TrnsPhaseVector vecParent)
Copy constructor for
TrnsPhaseVector . |
Modifier and Type | Method and Description |
---|---|
TrnsPhaseVector |
clone()
Creates and returns a deep copy of this vector.
|
protected TrnsPhaseVector |
newInstance()
Handles object creation required by the base class.
|
static TrnsPhaseMatrix |
newZero()
Create a new instance of a zero phase matrix.
|
assignUnity, assignZero, copyVector, embedIn, getArrayCopy, getElem, getElem, getSize, hashCode, innerProd, isEquivalentTo, leftMultiply, load, minus, minusEquals, negate, negateEquals, norm1, norm2, normInf, plus, plusEquals, print, print, println, projectOnto, rightMultiply, save, setElem, setElem, setVector, setVector, setVector, times, timesEquals, toString
public static final int INT_SIZE
public TrnsPhaseVector() throws java.lang.UnsupportedOperationException
TrnsPhaseVector
.
The new vector contains all zeros as elements.java.lang.UnsupportedOperationException
- base class has not defined a public, zero-argument constructorpublic TrnsPhaseVector(TrnsPhaseVector vecParent) throws java.lang.UnsupportedOperationException
TrnsPhaseVector
. The
constructed object is a deep copy of the given vector.vecParent
- vector to be clonedjava.lang.UnsupportedOperationException
- base class has not defined a public, zero-argument constructorpublic TrnsPhaseVector(java.lang.String strTokens) throws java.lang.IllegalArgumentException, java.lang.NumberFormatException
Parsing Constructor - creates an instance of the class and initialize it according to a token string of element values.
The token string argument is assumed to be one-dimensional and delimited
by any of the characters " ,()[]{}" Repeated, contiguous delimiters
are parsed together. This conditions allows a variety of parseable string
representations. For example,
{ 1, 2, 3, 4 }
and
[1 2 3 4]
would parse to the same homogeneous vector (1, 2, 3, 4 | 1).
strTokens
- token vector of BaseVector.getSize()
numeric valuesjava.lang.IllegalArgumentException
- wrong number of token stringsjava.lang.NumberFormatException
- bad number format, unparseablepublic TrnsPhaseVector(double[] arrVals) throws java.lang.ArrayIndexOutOfBoundsException
Initializing constructor for class TrnsPhaseVector
.
Sets the entire vector to the values given in the Java primitive type
double array. The argument itself remains unchanged.
The dimensions of the given Java double array must be consistent with the size of the matrix. Thus, if the arguments are inconsistent, an exception is thrown.
arrMatrix
- Java primitive array containing new vector valuesjava.lang.ArrayIndexOutOfBoundsException
- the argument must have the same dimensions as this matrixpublic static TrnsPhaseMatrix newZero()
public TrnsPhaseVector clone()
clone
in class BaseVector<TrnsPhaseVector>
BaseVector.clone()
protected TrnsPhaseVector newInstance()
newInstance
in class BaseVector<TrnsPhaseVector>
V
BaseVector.newInstance()