Package xal.tools.math.r4
Class R4
- All Implemented Interfaces:
Serializable,IArchive
Implements the set of real 4-vectors in R4
- Since:
- Oct 15, 2013
- Author:
- Christopher K. Allen
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClassR4x4.INDis an enumeration of the matrix indices for theR4x4class. -
Field Summary
FieldsFields inherited from class xal.tools.math.BaseVector
ATTR_DATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a deep copy of this vector.protected R4newInstance(double[] arrVecInt) Creates a new instance of this vector type with the given Java array as the internal representation.protected R4newInstance(int size) Handles object creation required by the base class.static R4newZero()Create a new instance of a zero vector.Methods inherited from class xal.tools.math.BaseVector
assignUnity, assignZero, copyVector, embedIn, equals, getArrayCopy, getElem, getElem, getSize, getVector, hashCode, innerProd, isEquivalentTo, leftMultiply, load, minus, minusEquals, negate, negateEquals, newInstance, norm1, norm2, normInf, plus, plusEquals, print, print, println, projectOnto, rightMultiply, save, setElem, setElem, setVector, setVector, setVector, times, timesEquals, toString
-
Field Details
-
INT_SIZE
public static final int INT_SIZEnumber of dimensions (DIM=3)- See Also:
-
-
Constructor Details
-
R4
Constructor forR6.- Throws:
UnsupportedOperationException- Since:
- Oct 15, 2013
-
R4
Initializing constructor for bases class
Vector. Sets the entire matrix 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.
- Parameters:
arrVals- Java primitive array containing new vector values- Throws:
IllegalArgumentException- the argument must have the same dimensions as this matrix- Since:
- Oct 16, 2013
-
R4
Copy constructor forR4. Creates a cloned copy of the given parent object.- Parameters:
matParent- template object for which the deep copy is performed- Since:
- Jul 3, 2014
-
-
Method Details
-
newZero
Create a new instance of a zero vector.- Returns:
- zero vector
-
clone
Creates and returns a deep copy of this vector.- Specified by:
clonein classBaseVector<R4>- Since:
- Jul 3, 2014
- See Also:
-
newInstance
Handles object creation required by the base class.- Specified by:
newInstancein classBaseVector<R4>- Returns:
- uninitialized vector object of type
V - Since:
- Jun 17, 2014
- See Also:
-
xal.tools.math.BaseVector#newInstance()
-
newInstance
Description copied from class:BaseVectorCreates a new instance of this vector type with the given Java array as the internal representation.- Specified by:
newInstancein classBaseVector<R4>- Parameters:
arrVecInt- new vector's guts- Returns:
- new instance of this vector type with the internal representation
- Since:
- Jul 24, 2015 by Christopher K. Allen
- See Also:
-