public class TrackDerivative extends Object
TrackDerivative should support the following operations:
construct: tv(), te(), td() (should fill with zeros) copy: tv2(tv1), te2(te1), td2(td1) assignment: tv2 = tv2, te2 = te1, td2 = td1 indexing: tv(i), te(i,j), td(i,j) minimum element: tv.min(), te.min(), td.min() maximum element: tv.max(), te.max(), td.max() absolute minimum element: tv.amin(), te.amin(), td.amin() absolute maximum element: tv.amax(), te.amax(), td.amax() addition: tv2 += tv1, tv3 = tv1 + tv2, te2 += te1, te3 = tv1 + te2, td2 += td1, td3 = td1 + td2, subtraction: tv2 -= tv1, tv3 = tv1 - tv2, te2 -= te1, te3 = tv1 - te2, td2 -= td1, td3 = td1 - td2, inversion: int stat = invert( TrackError& te1 ) (0 for success) output stream: cout << tv << te << td equality: tv1==tv2, te1==te2, td1==td2 inequality: tv!=tv2, te1!=te2, td1!=td2 chisquare difference: chisq_diff(tv,te) = tv_T * te * tv (tv is the difference between two vectors and te is the inverse of the error matrix.) transpose: td.transpose() transform: te.xform(td)
Constructor and Description |
---|
TrackDerivative()
Default constructor creates 5x5 matrix of zeros
|
TrackDerivative(double[][] mat)
Constructor from array
|
TrackDerivative(Matrix mat)
Constructor from Jama Matrix.
|
TrackDerivative(TrackDerivative td)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
double |
amax()
Absolute maximum TrackDerivative element.
|
double |
amin()
Absolute minimum TrackDerivative element.
|
boolean |
equals(TrackDerivative td)
Equality.
|
double |
get(int i,
int j)
Get an element of the TrackDerivative.
|
Matrix |
getMatrix()
Return the TrackDerivative as a Jama Matrix.
|
boolean |
isEqual(TrackDerivative td)
Equality within tolerance.
|
double[][] |
matrix()
Return the underlying matrix.
|
double |
max()
Maximum TrackDerivative element.
|
double |
min()
Minimum TrackDerivative element.
|
TrackDerivative |
minus(TrackDerivative td)
Math function minus.
|
boolean |
notEquals(TrackDerivative td)
Inequality convenience method.
|
TrackDerivative |
plus(TrackDerivative td)
Math function plus.
|
void |
set(int i,
int j,
double val)
Set an element of the TrackDerivative.
|
void |
set(TrackDerivative td)
Set the elements equal to those of an existing TrackDerivative.
|
void |
setIdentity()
Convenience method to set TrackDerivative to the identity.
|
TrackDerivative |
times(TrackDerivative td)
Matrix multiply
|
String |
toString()
String representation of TrackDerivative.
|
void |
transpose()
Matrix transpose.
|
private Matrix _mat
private int _size
public TrackDerivative()
public TrackDerivative(double[][] mat)
mat
- 5x5 array of doubles.public TrackDerivative(Matrix mat)
mat
- 5x5 Jama Matrix.public TrackDerivative(TrackDerivative td)
td
- TrackDerivative to copy.public double[][] matrix()
public String toString()
public Matrix getMatrix()
public void set(int i, int j, double val)
i
- Row index.j
- Column index.val
- Value of element (i,j).public void set(TrackDerivative td)
td
- TrackDerivative to be equivalent to.public double get(int i, int j)
i
- Row index.j
- Column index.public void setIdentity()
public TrackDerivative times(TrackDerivative td)
td
- TrackDerivative by which to multiply.public double amax()
public double max()
public double min()
public double amin()
public TrackDerivative minus(TrackDerivative td)
td
- TrackDerivative to be subtracted.public TrackDerivative plus(TrackDerivative td)
td
- TrackDerivative to be added.public boolean equals(TrackDerivative td)
td
- TrackDerivative to comparepublic boolean notEquals(TrackDerivative td)
td
- TrackDerivative to comparepublic boolean isEqual(TrackDerivative td)
td
- TrackDerivative to comparepublic void transpose()
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.