Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JMATH::JSVD3D::JGivens Struct Reference

Givens quaternion. More...

Public Member Functions

 JGivens (const double a, const double b)
 Constructor.
 
double geta () const
 get new a value
 
double getb () const
 get new b value
 

Public Attributes

double ch
 cosine rotation angle
 
double sh
 sine rotation angle
 

Static Public Attributes

static constexpr double EPSILON = 1.0e-6
 

Detailed Description

Givens quaternion.

Definition at line 374 of file JSVD3D.hh.

Constructor & Destructor Documentation

◆ JGivens()

JMATH::JSVD3D::JGivens::JGivens ( const double a,
const double b )
inline

Constructor.

Parameters
apivot point on diagonal
blower triangular entry we want to annihilate

Definition at line 384 of file JSVD3D.hh.

386 {
387 using namespace std;
388
389 const double rho = sqrt(a*a + b*b);
390
391 sh = rho > EPSILON ? b : 0.0;
392 ch = fabs(a) + max(rho,EPSILON);
393
394 if (a < 0.0) {
395 swap(sh,ch);
396 }
397
398 const double w = 1.0 / sqrt(ch*ch + sh*sh);
399
400 ch *= w;
401 sh *= w;
402 }
double ch
cosine rotation angle
Definition JSVD3D.hh:407
double sh
sine rotation angle
Definition JSVD3D.hh:408
static constexpr double EPSILON
Definition JSVD3D.hh:376

Member Function Documentation

◆ geta()

double JMATH::JSVD3D::JGivens::geta ( ) const
inline

get new a value

Definition at line 404 of file JSVD3D.hh.

◆ getb()

double JMATH::JSVD3D::JGivens::getb ( ) const
inline

get new b value

Definition at line 405 of file JSVD3D.hh.

Member Data Documentation

◆ EPSILON

double JMATH::JSVD3D::JGivens::EPSILON = 1.0e-6
staticconstexpr

Definition at line 376 of file JSVD3D.hh.

◆ ch

double JMATH::JSVD3D::JGivens::ch

cosine rotation angle

Definition at line 407 of file JSVD3D.hh.

◆ sh

double JMATH::JSVD3D::JGivens::sh

sine rotation angle

Definition at line 408 of file JSVD3D.hh.


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