imate
C++/CUDA Reference
Indicator Class Reference

Defines the function \( f: \lambda \mapsto H(\lambda - a) - H(\lambda - b) \) where \( H \) is the Heaviside step function. More...

#include <indicator.h>

Inheritance diagram for Indicator:
Collaboration diagram for Indicator:

Public Member Functions

 Indicator (double a_, double b_)
 Sets the default parameters a and c. More...
 
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. More...
 

Public Attributes

double a
 
double b
 

Detailed Description

Defines the function \( f: \lambda \mapsto H(\lambda - a) - H(\lambda - b) \) where \( H \) is the Heaviside step function.

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 indicator.h.

Constructor & Destructor Documentation

◆ Indicator()

Indicator::Indicator ( double  a_,
double  b_ 
)

Sets the default parameters a and c.

Definition at line 26 of file indicator.cpp.

27 {
28  this->a = a_;
29  this->b = b_;
30 }
double a
Definition: indicator.h:48
double b
Definition: indicator.h:49

References a, and b.

Member Function Documentation

◆ function() [1/3]

double Indicator::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 62 of file indicator.cpp.

63 {
64  if ((lambda_ < this->a) || (lambda_ > this->b))
65  {
66  return 0.0;
67  }
68  else
69  {
70  return 1.0;
71  }
72 }

References a, and b.

◆ function() [2/3]

float Indicator::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 41 of file indicator.cpp.

42 {
43  if ((lambda_ < this->a) || (lambda_ > this->b))
44  {
45  return 0.0;
46  }
47  else
48  {
49  return 1.0;
50  }
51 }

References a, and b.

◆ function() [3/3]

long double Indicator::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 indicator.cpp.

84 {
85  if ((lambda_ < this->a) || (lambda_ > this->b))
86  {
87  return 0.0;
88  }
89  else
90  {
91  return 1.0;
92  }
93 }

References a, and b.

Member Data Documentation

◆ a

double Indicator::a

Definition at line 48 of file indicator.h.

Referenced by function(), and Indicator().

◆ b

double Indicator::b

Definition at line 49 of file indicator.h.

Referenced by function(), and Indicator().


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