imate
C++/CUDA Reference
Exponential Class Reference

Defines the function \( f: \lambda \mapsto e^{a \lambda} \). More...

#include <exponential.h>

Inheritance diagram for Exponential:
Collaboration diagram for Exponential:

Public Member Functions

 Exponential (double coeff_)
 Sets the default for the parameter coeff to 1.0. 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 coeff
 

Detailed Description

Defines the function \( f: \lambda \mapsto e^{a \lambda} \).

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 40 of file exponential.h.

Constructor & Destructor Documentation

◆ Exponential()

Exponential::Exponential ( double  coeff_)

Sets the default for the parameter coeff to 1.0.

Definition at line 27 of file exponential.cpp.

28 {
29  this->coeff = coeff_;
30 }
double coeff
Definition: exponential.h:47

References coeff.

Member Function Documentation

◆ function() [1/3]

double Exponential::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 55 of file exponential.cpp.

56 {
57  return exp(lambda_ * static_cast<double>(this->coeff));
58 }

References coeff.

◆ function() [2/3]

float Exponential::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 exponential.cpp.

42 {
43  return exp(lambda_ * static_cast<float>(this->coeff));
44 }

References coeff.

◆ function() [3/3]

long double Exponential::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 69 of file exponential.cpp.

70 {
71  return exp(lambda_ * static_cast<long double>(this->coeff));
72 }

References coeff.

Member Data Documentation

◆ coeff

double Exponential::coeff

Definition at line 47 of file exponential.h.

Referenced by Exponential(), and function().


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