public class HMatrix extends Object implements Serializable
|
|
Modifier and Type | Field and Description |
---|---|
private double[] |
_cov |
private int |
_dim |
private double[][] |
_invcov |
private int |
_key |
private double[] |
_tmp |
private double[] |
_tmp2 |
private double[] |
_vec |
Constructor and Description |
---|
HMatrix() |
HMatrix(int dim,
int key,
double[] vec,
double[] cov,
double[][] invcov)
Constructor
|
HMatrix(String resourceFileName) |
Modifier and Type | Method and Description |
---|---|
double[] |
averageVector()
Return the vector of averages
|
double |
chisquared(double[] dat)
Calculates the chi-squared for the measurement compared to
the expected values and covariances represented by the HMatrix.
|
double |
chisquaredDiagonal(double[] dat)
Calculates the diagonal chi-squared for the measurement compared to
the expected values and covariances represented by the HMatrix,
neglecting correlations.
|
private static HMatrix |
create(BufferedReader bufferedreader) |
static HMatrix |
create(InputStream in) |
double[] |
packedInverseCovarianceMatrix()
Return the inverse covariance matrix packed in lower-diagonal form
|
static HMatrix |
read(Reader reader)
Reads the HMatrix from a Reader
|
static HMatrix |
read(String filename)
Reads the HMatrix from an ASCII file
|
String |
toString()
Output stream
|
void |
write(String filename,
String comment)
Writes out the HMatrix to an ASCII file
|
private double[][] _invcov
private double[] _vec
private double[] _cov
private int _dim
private int _key
private double[] _tmp
private double[] _tmp2
public HMatrix()
public HMatrix(int dim, int key, double[] vec, double[] cov, double[][] invcov)
dim
- the dimensionality of the matrixkey
- the key for indexing this HMatrixvec
- The array of average values for the measurement space.cov
- The inverse of the covariance matrix for the averages.public HMatrix(String resourceFileName)
public double chisquared(double[] dat)
dat
- The array of measured valuespublic double chisquaredDiagonal(double[] dat)
dat
- The array of measured valuespublic String toString()
public double[] averageVector()
public double[] packedInverseCovarianceMatrix()
public static HMatrix create(InputStream in)
private static HMatrix create(BufferedReader bufferedreader) throws IOException
IOException
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.