imate
C++/CUDA Reference
Loading...
Searching...
No Matches
Homographic Class Reference

Defines the function \( f: \lambda \mapsto \frac{a \lambda + b}{ c \lambda + d} \). More...

#include <homographic.h>

Inheritance diagram for Homographic:
Collaboration diagram for Homographic:

Public Member Functions

 Homographic (double a_, double b_, double c_, double d_)
 Sets the default for the parameter a, b, c, and d.
 
virtual float function (const float lambda_) const
 
virtual double function (const double lambda_) const
 
virtual long double function (const long double lambda_) const
 
- Public Member Functions inherited from Function
virtual ~Function ()
 Default virtual destructor.
 

Public Attributes

double a
 
double b
 
double c
 
double d
 

Detailed Description

Defines the function \( f: \lambda \mapsto \frac{a \lambda + b}{ c \lambda + d} \).

The matrix function \( f: \mathbb{R}^{n \times n} \to \mathbb{R}^{n \times n} \) is used in

\[ \mathrm{trace} \left( f(\mathbf{A}) \right). \]

However, instead of a matrix function, the equivalent scalar function \( f: \mathbb{R} \to \mathbb{R} \) is defiend which acts on the eigenvalues of the matrix.

Definition at line 41 of file homographic.h.

Constructor & Destructor Documentation

◆ Homographic()

Homographic::Homographic ( double  a_,
double  b_,
double  c_,
double  d_ 
)

Sets the default for the parameter a, b, c, and d.

Definition at line 26 of file homographic.cpp.

27{
28 this->a = a_;
29 this->b = b_;
30 this->c = c_;
31 this->d = d_;
32}

References a, b, c, and d.

Member Function Documentation

◆ function() [1/3]

double Homographic::function ( const double  lambda_) const
virtual
Parameters
[in]lambda_Eigenvalue (or singular value) of matrix.
Returns
The value of matrix function for the given eigenvalue.

Implements Function.

Definition at line 63 of file homographic.cpp.

64{
65 // Casting
66 double a_ = static_cast<double>(this->a);
67 double b_ = static_cast<double>(this->b);
68 double c_ = static_cast<double>(this->c);
69 double d_ = static_cast<double>(this->d);
70
71 return (a_ * lambda_ + b_) / (c_ * lambda_ + d_);
72}

References a, b, c, and d.

◆ function() [2/3]

float Homographic::function ( const float  lambda_) const
virtual
Parameters
[in]lambda_Eigenvalue (or singular value) of matrix.
Returns
The value of matrix function for the given eigenvalue.

Implements Function.

Definition at line 43 of file homographic.cpp.

44{
45 // Casting
46 float a_ = static_cast<float>(this->a);
47 float b_ = static_cast<float>(this->b);
48 float c_ = static_cast<float>(this->c);
49 float d_ = static_cast<float>(this->d);
50
51 return (a_ * lambda_ + b_) / (c_ * lambda_ + d_);
52}

References a, b, c, and d.

◆ function() [3/3]

long double Homographic::function ( const long double  lambda_) const
virtual
Parameters
[in]lambda_Eigenvalue (or singular value) of matrix.
Returns
The value of matrix function for the given eigenvalue.

Implements Function.

Definition at line 83 of file homographic.cpp.

84{
85 // Casting
86 long double a_ = static_cast<long double>(this->a);
87 long double b_ = static_cast<long double>(this->b);
88 long double c_ = static_cast<long double>(this->c);
89 long double d_ = static_cast<long double>(this->d);
90
91 return (a_ * lambda_ + b_) / (c_ * lambda_ + d_);
92}

References a, b, c, and d.

Member Data Documentation

◆ a

double Homographic::a

Definition at line 48 of file homographic.h.

Referenced by function(), function(), function(), and Homographic().

◆ b

double Homographic::b

Definition at line 49 of file homographic.h.

Referenced by function(), function(), function(), and Homographic().

◆ c

double Homographic::c

Definition at line 50 of file homographic.h.

Referenced by function(), function(), function(), and Homographic().

◆ d

double Homographic::d

Definition at line 51 of file homographic.h.

Referenced by function(), function(), function(), and Homographic().


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