public class HitVector extends Object
Modifier and Type | Field and Description |
---|---|
private int |
_length |
private Matrix |
_vec |
Modifier | Constructor and Description |
---|---|
|
HitVector()
default constructor
leaves HitVector in invalid state
|
|
HitVector(double x1)
constructor from one value
|
|
HitVector(double x1,
double x2)
constructor from two values
|
|
HitVector(double x1,
double x2,
double x3)
constructor from three values
|
|
HitVector(HitVector hvec)
copy constructor
|
|
HitVector(int size)
constructor initializing size of hit
|
|
HitVector(int size,
double[] vec)
constructor from an array
|
private |
HitVector(Matrix vec)
constructor from Matrix implementation
|
Modifier and Type | Method and Description |
---|---|
double |
amax()
absolute maximum
|
double |
amin()
absolute minimum
|
boolean |
equals(HitVector hv)
equality
must have the same length and the same values
|
double |
get(int i)
accessor
|
Matrix |
matrix()
access the hit vector
|
double |
max()
maximum
|
double |
min()
minimum
|
HitVector |
minus(HitVector hv)
vector subtraction
|
void |
minusEquals(HitVector hv)
vector subtraction in place
changes value of this to this - hv
|
boolean |
notEquals(HitVector hv)
inequality
|
HitVector |
plus(HitVector hv)
vector addition
|
void |
plusEquals(HitVector hv)
vector addition in place
changes value of this to this + hv
|
void |
set(int i,
double val)
set vector element i to value val
|
int |
size()
hit size
|
String |
toString()
output stream
|
double[] |
vector()
access the hit vector
|
private Matrix _vec
private int _length
private HitVector(Matrix vec)
Matrix
- vec containing the hit valuespublic HitVector()
public HitVector(int size)
size
- dimensionality of the hitpublic HitVector(int size, double[] vec)
size
- of the array of valuesvec
- double[] containing the valuespublic HitVector(double x1)
x1
- single HitVector valuepublic HitVector(double x1, double x2)
x1
- first valuex2
- second valuepublic HitVector(double x1, double x2, double x3)
x1
- first valuex2
- second valuex3
- third valuepublic HitVector(HitVector hvec)
hvec
- HitVector to replicatepublic double[] vector()
public Matrix matrix()
public int size()
public double get(int i)
i
- element to accesspublic void set(int i, double val)
i
- element to setval
- value of element ipublic double min()
public double max()
public double amin()
public double amax()
public void plusEquals(HitVector hv)
hv
- HitVector to addpublic void minusEquals(HitVector hv)
hv
- HitVector to subtractpublic HitVector plus(HitVector hv)
hv
- HitVector to addpublic HitVector minus(HitVector hv)
hv
- HitVector to subtractpublic boolean equals(HitVector hv)
hv
- HitVector to comparepublic boolean notEquals(HitVector hv)
hv
- HitVector to compareCopyright © 2016 Linear Collider Detector (LCD). All rights reserved.