FEDRA emulsion software from the OPERA Collaboration
|
general matematical algorithms More...
#include <EdbMath.h>
Public Member Functions | |
EdbMath () | |
virtual | ~EdbMath () |
Static Public Member Functions | |
static double | Angle3 (float tx1, float ty1, float tx2, float ty2) |
static int | ArrStat (int n, float *x, float par[4]) |
static double | DistancePointLine3 (float Point[3], float LineStart[3], float LineEnd[3], bool inside) |
static int | LFIT3 (float *X, float *Y, float *Z, float *W, int L, float &X0, float &Y0, float &Z0, float &TX, float &TY, float &EX, float &EY) |
static void | LFITW (float *X, float *Y, float *W, int L, int KEY, float &A, float &B, float &E) |
static bool | LineLineIntersect (float p1[3], float p2[3], float p3[3], float p4[3], float pa[3], float pb[3], double &mua, double &mub) |
static bool | LinFitCOV (int n, float *x, float *y, double *c, float *p, float *d, float *chi2) |
static bool | LinFitDiag (int n, float *x, float *y, float *e, float p[2], float d[2][2], float *chi2) |
static double | Magnitude3 (float Point1[3], float Point2[3]) |
general matematical algorithms
//////////////////////////////////////////////////////////////////////// // EdbMath // // Collection of matematical algorithns // // ////////////////////////////////////////////////////////////////////////
|
inline |
|
inlinevirtual |
|
static |
|
static |
calculate array statistics:
output: par (mean, rms, xmin, xmax);
|
static |
Disclamer: This is a modified code from site of Paul Bourke
|
static |
Linar fit in 3-d case (microtrack-like)
Input: X,Y,Z - coords, W -weight - arrays of the lengh >=L
Note that X,Y,Z modified by function
Output: X0,Y0,Z0 - center of gravity of segment
TX,TY : tangents in respect to Z axis
|
static |
E250:
TO PERFORM A WEIGHTED STRAIGHT LINE FIT
FOR FORMULAE USED SEE MENZEL, FORMULAS OF PHYSICS P.116
FIT IS OF Y=AX+B , WITH S**2 ESTIMATOR E. WEIGHTS ARE IN W.
IF KEY=0, POINTS WITH Y=0 ARE IGNORED
L IS NO. OF POINTS
|
static |
Disclamer: This is a modified code from site of Paul Bourke
Calculate the line segment PaPb that is the shortest route between \n two lines P1P2 and P3P4. Calculate also the values of mua and mub where \n Pa = P1 + mua (P2 - P1) \n Pb = P3 + mub (P4 - P3) \n Return FALSE if no solution exists (the lines are parallel)
|
static |
linear fit by YP with using full covariance matrix of measurements :
y = p[0] + p[1]*x , d[2][2] is error matrix for p[2]
Input : n - number of points
x,y - data arrays of the length n
c - full covariance matrix c[n][n]
|
static |
linear fit by YP: y = p[0] + p[1]*x , d[2][2] is error matrix for p[2]
Input : n - number of points
x,y,e - data arrays of the length n
|
static |