public class DataVector extends Object
Constructor and Description |
---|
DataVector() |
DataVector(double[] data) |
DataVector(int size) |
DataVector(List<Double> data) |
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Add value to the vector and ensure that the vector is ordered.
|
void |
addDataVector(DataVector vec) |
void |
clear() |
void |
copy(DataVector vec) |
void |
divide(double norm)
Divides the content of the vector by given number.
|
int |
findBin(double value) |
int |
findBin(double value,
int start) |
double[] |
getArray() |
int |
getBinSuggestion() |
double |
getBinWidth(int index) |
DataVector |
getCumulative()
Returns cumulative integral of the vector.
|
double |
getHighEdge(int bin) |
double |
getLowEdge(int bin)
Returns the low edge for the bin which is determined by bin width.
|
double |
getMax()
calculate maximum value in the data
|
double |
getMean()
Calculates the mean of the vector.
|
double |
getMean(DataVector xvec)
Calculates the normalized mean with the given axis.
|
double |
getMin()
calculate the minimum value in the data.
|
double |
getRMS() |
int |
getSize()
Returns the number of entries in the vector
|
double |
getValue(int index) |
boolean |
isOrdered() |
void |
mult(double norm)
Multiplies the whole data with the provided number
|
void |
set(double[] data)
Initialize the array with given values.
|
void |
set(int index,
double value) |
void |
set(List<Double> data) |
void |
setValue(int index,
double value) |
int |
size() |
public DataVector(int size)
public DataVector()
public DataVector(double[] data)
public final void set(double[] data)
data
- initial datapublic int size()
public void clear()
public void addDataVector(DataVector vec)
public void add(double value)
value
- next value to the data vector.public double getMin()
public double getMax()
public int getBinSuggestion()
public void copy(DataVector vec)
public boolean isOrdered()
public int findBin(double value)
public int findBin(double value, int start)
public void mult(double norm)
norm
- multiplication factorpublic void divide(double norm)
norm
- public DataVector getCumulative()
public double getMean(DataVector xvec)
xvec
- public double getMean()
public double getRMS()
public int getSize()
public double getValue(int index)
public double getLowEdge(int bin)
bin
- bin numberpublic double getHighEdge(int bin)
public double getBinWidth(int index)
public double[] getArray()
public void set(int index, double value)
public void setValue(int index, double value)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics