|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Jama.Matrix | +--gov.sns.tools.math.Vector
Specializes the Jama.Matrix class to a vector.
Constructor Summary | |
Vector(double[] arrVals)
Constructs a Vector specified by the double array |
|
Vector(int nSize)
Constructs a column vector of zeros |
|
Vector(int nSize,
double dblVal)
Constructs a constant column vector |
|
Vector(Jama.Matrix mat)
Constructs a new Vector from a Matrix object. |
|
Vector(Vector vecInit)
Copy Constructor Constructs a new Vector initialized to the argument. |
Method Summary | |
Vector |
copyVector()
Perform a deep copy of this Vector object |
double |
get(int iIndex)
Get individual element of a vector |
int |
getSize()
Get size of Vector (number of elements) |
double |
innerProd(Vector vec)
Vector inner product. |
Vector |
leftMultiply(Jama.Matrix mat)
Vector left multiplication (post-multiply vector by matrix). |
Jama.Matrix |
outerProd(Vector vec)
Vector outer product - computes the tensor product of two vector objects. |
Vector |
plus(Vector vec)
Vector addition without destruction |
void |
plusEquals(Vector vec)
Vector in-place addition |
void |
print(java.io.PrintWriter os)
Print the vector contents to an output stream, does not add new line. |
void |
println(java.io.PrintWriter os)
Print the vector contents to an output stream, add new line character. |
static Vector |
random(int nSize)
Generate a vector with uniformly distributed random elements |
Vector |
rightMultiply(Jama.Matrix mat)
Vector right multiplication (pre-multiply vector by matrix). |
void |
set(int iIndex,
double dblVal)
Set individual element of a vector |
Vector |
timesScalar(double s)
Scalar multiplication |
void |
timesScalarEqual(double s)
In place scalar multiplication |
Methods inherited from class Jama.Matrix |
arrayLeftDivide, arrayLeftDivideEquals, arrayRightDivide, arrayRightDivideEquals, arrayTimes, arrayTimesEquals, chol, clone, cond, constructWithCopy, copy, det, eig, get, getArray, getArrayCopy, getColumnDimension, getColumnPackedCopy, getMatrix, getMatrix, getMatrix, getMatrix, getRowDimension, getRowPackedCopy, identity, inverse, lu, minus, minusEquals, norm1, norm2, normF, normInf, plus, plusEquals, print, print, print, print, qr, random, rank, read, set, setMatrix, setMatrix, setMatrix, setMatrix, solve, solveTranspose, svd, times, times, timesEquals, trace, transpose, uminus |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Vector(int nSize)
nSize
- vector sizepublic Vector(int nSize, double dblVal)
nSize
- vector sizedblVal
- constant valuepublic Vector(double[] arrVals)
arrVals
- element values for vectorpublic Vector(Vector vecInit)
vecInit
- initial valuepublic Vector(Jama.Matrix mat)
mat
- initial valuesMethod Detail |
public static Vector random(int nSize)
nSize
- size of created vectorpublic Vector copyVector()
public int getSize()
public double get(int iIndex) throws java.lang.ArrayIndexOutOfBoundsException
iIndex
- index of element
java.lang.ArrayIndexOutOfBoundsException
- iIndex is larger than vector sizepublic void set(int iIndex, double dblVal) throws java.lang.ArrayIndexOutOfBoundsException
iIndex
- index of elementdblVal
- new value of element
java.lang.ArrayIndexOutOfBoundsException
- iIndex is larger than the vectorpublic void plusEquals(Vector vec) throws java.lang.IllegalArgumentException
vec
- Vector to add to this vector
java.lang.IllegalArgumentException
- vec is not proper dimensionpublic Vector plus(Vector vec) throws java.lang.IllegalArgumentException
vec
- vector to add
java.lang.IllegalArgumentException
- vec is not proper dimensionpublic Vector timesScalar(double s)
s
- scalar value
public void timesScalarEqual(double s)
s
- scalarpublic double innerProd(Vector vec) throws java.lang.IllegalArgumentException
vec
- second vector
java.lang.IllegalArgumentException
- dimensions must agreepublic Jama.Matrix outerProd(Vector vec) throws java.lang.IllegalArgumentException
vec
- right argument
java.lang.IllegalArgumentException
- vector dimension must agreepublic Vector leftMultiply(Jama.Matrix mat) throws java.lang.IllegalArgumentException
mat
- matrix operator
java.lang.IllegalArgumentException
- dimensions must agreepublic Vector rightMultiply(Jama.Matrix mat) throws java.lang.IllegalArgumentException
mat
- matrix operator
java.lang.IllegalArgumentException
- dimensions must agreepublic void print(java.io.PrintWriter os)
os
- output stream objectpublic void println(java.io.PrintWriter os)
os
- output stream object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |