public class SparseVectorGrid extends Object
Constructor and Description |
---|
SparseVectorGrid() |
SparseVectorGrid(int[] bins) |
SparseVectorGrid(int size,
int[] bins) |
Modifier and Type | Method and Description |
---|---|
void |
addBin(DataVector vec,
int[] index) |
void |
addBin(int[] index) |
void |
addBinContent(int order,
double value,
int[] index) |
void |
fill(double[] array)
fill the grid element 0 with weight of 1.0
|
void |
fill(double[] array,
int order)
fill the grid with values from array for element = order
with default weight of 1.0
|
void |
fill(double[] array,
int order,
double weight)
increment the value of the particular bin, the bin
is determined by axis.
|
Axis |
getAxis(int index) |
String |
getAxisNamesString()
returns ":" separated list of axis names
|
DataVector |
getBin(int[] index)
returns a vector for a bin, if the entry does not exist
a NULL will be returned.
|
double |
getBinContent(int order,
int[] index) |
boolean |
getBinsByAxis(double[] values,
int[] index)
fills the array of indices with bin values taken from the axis.
|
HashMap<Long,DataVector> |
getGrid() |
SparseIndex |
getIndexer() |
int |
getNumberOfBins() |
int |
getVectorSize() |
double |
integral(int order) |
static void |
main(String[] args) |
H1F |
projection(int dim,
int order) |
void |
setAxisNames(String[] names)
sets names for all the axis.
|
void |
setBinContent(int order,
double value,
int[] index) |
void |
show() |
H1F |
slice(int dim,
int order,
int[] bmin,
int[] bmax) |
public SparseVectorGrid()
public SparseVectorGrid(int[] bins)
public SparseVectorGrid(int size, int[] bins)
public HashMap<Long,DataVector> getGrid()
public int getVectorSize()
public void addBin(int[] index)
public void addBin(DataVector vec, int[] index)
public Axis getAxis(int index)
public void setAxisNames(String[] names)
names
- array of names to set axis titlespublic boolean getBinsByAxis(double[] values, int[] index)
values
- axis valuesindex
- returned index for each dimensionpublic void fill(double[] array)
array
- values along the axispublic void fill(double[] array, int order)
array
- values along the axisorder
- element indexpublic void fill(double[] array, int order, double weight)
array
- values along the axisorder
- element indexweight
- increment amountpublic DataVector getBin(int[] index)
index
- public String getAxisNamesString()
public void addBinContent(int order, double value, int[] index)
public void setBinContent(int order, double value, int[] index)
public double getBinContent(int order, int[] index)
public SparseIndex getIndexer()
public double integral(int order)
public H1F slice(int dim, int order, int[] bmin, int[] bmax)
public H1F projection(int dim, int order)
public int getNumberOfBins()
public void show()
public static void main(String[] args)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics