UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | Static Public Attributes | List of all members
UBaseMath Class Reference

#include <u_base_math.hpp>

Static Public Member Functions

static bool gauss (const std::vector< std::vector< double > > &LN, const std::vector< double > &P, std::vector< double > &x)
 
static double compositionMul (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
 
static void fiazr2xyz (double f, double az, double r, double &px, double &py, double &pz)
 
static void xyz2fiazr (double px, double py, double pz, double &f, double &az, double &r)
 
static double scalarMul (double x1, double y1, double z1, double x2, double y2, double z2)
 
static void matrix4x4Mul (const double(&m1)[4][4], const double(&m2)[4][4], double(&m3)[4][4], bool tr1=false, bool tr2=false)
 
static void matrix2vec4x4Mul (const double(&m)[4][4], const double(&u)[4], double(&v)[4], bool tr=false)
 
static void vec2matrix4x4Mul (const double(&u)[4], const double(&m)[4][4], double(&v)[4], bool tr=false)
 
static void getLineCoeffs (double x1, double y1, double x2, double y2, double &k, double &b)
 
static int solveSquareEq (double a, double b, double c, double &x1, double &x2)
 
template<typename T >
static bool isNAN (const T &t)
 
template<typename T >
static bool isInf (const T &t)
 

Static Public Attributes

static double m_d_prec
 

Detailed Description

Some mathematics for different calculations

Member Function Documentation

static double UBaseMath::compositionMul ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3 
)
static

Compositional 3d vector multiplication. This is determinant of constructed from vectors components matrix.

static void UBaseMath::fiazr2xyz ( double  f,
double  az,
double  r,
double &  px,
double &  py,
double &  pz 
)
static

Recalculate polar system coordinates to the Cartesian one

static bool UBaseMath::gauss ( const std::vector< std::vector< double > > &  LN,
const std::vector< double > &  P,
std::vector< double > &  x 
)
static

Linear equation system solving by Gauss method with mean element searching along the row and column. LN*x = P, x is the result.

static void UBaseMath::getLineCoeffs ( double  x1,
double  y1,
double  x2,
double  y2,
double &  k,
double &  b 
)
static

Get coefficients of line y=kx+b from (x1,y1) and (x2,y2) line points. Points should not be the same.

static void UBaseMath::matrix2vec4x4Mul ( const double(&)  m[4][4],
const double(&)  u[4],
double(&)  v[4],
bool  tr = false 
)
static

Calculate vector to matrix multiplication. Dimension is 4. tr = true if matrix is transposed

static void UBaseMath::matrix4x4Mul ( const double(&)  m1[4][4],
const double(&)  m2[4][4],
double(&)  m3[4][4],
bool  tr1 = false,
bool  tr2 = false 
)
static

Multiplication of two 4x4 matricies. tr1 = true if m1 should be transpose and tr2 = true if m2 should be transpose

static double UBaseMath::scalarMul ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
)
static

Scalar 3d vectors multiplication

static int UBaseMath::solveSquareEq ( double  a,
double  b,
double  c,
double &  x1,
double &  x2 
)
static

Solve square equation ax^2 + bx + c = 0 (real form). Return number of roots

static void UBaseMath::vec2matrix4x4Mul ( const double(&)  u[4],
const double(&)  m[4][4],
double(&)  v[4],
bool  tr = false 
)
static

Calculate vector to matrix multiplication. Dimension is 4. tr = true if matrix is transposed

static void UBaseMath::xyz2fiazr ( double  px,
double  py,
double  pz,
double &  f,
double &  az,
double &  r 
)
static

Recalculate Cartesian system coordinates to the polar one

Member Data Documentation

double UBaseMath::m_d_prec
static

Numerical precision


The documentation for this class was generated from the following file: