1 #ifndef CRXS__LA_tools_H
2 #define CRXS__LA_tools_H
12 static double len (
double* a);
15 static void cross (
double* v1,
double* v2,
double* cross_res);
18 static double dot(
double* v1,
double* v2);
21 static double dist(
double* a,
double *b ,
double* c,
double* p );
22 static double sign(
double x);
25 static bool inside(
double* a,
double *b ,
double* c,
double* d,
double* p);
31 static double integrate_trapeze(
double (*integrand)(
double,
void*),
double min,
double max,
void* parameter ){
33 double dd = (max-min)/steps;
35 for (
int i=0; i<steps; i++) {
36 d = min + dd * ( 0.5 + i );
37 res += integrand(d,parameter);
43 static void SetTrapezeIntegrationSteps(
int _steps ){steps=_steps;};
static bool inside(double *a, double *b, double *c, double *d, double *p)
true if vector p is inside of the volume of vectors a,b,c,d
Definition: linAlg_tools.cxx:48
static double dot(double *v1, double *v2)
dot product of vectors v1 and v2
Definition: linAlg_tools.cxx:20
Definition: linAlg_tools.h:8
static double dist(double *a, double *b, double *c, double *p)
distance of vector p from the plane through vectors a,b,c
Definition: linAlg_tools.cxx:25
static void cross(double *v1, double *v2, double *cross_res)
cross product of vector v1 and v2 returned into vector cross_res
Definition: linAlg_tools.cxx:13
static double len(double *a)
Length of a vector a.
Definition: linAlg_tools.cxx:8
Definition: linAlg_tools.h:28