Public Types | Public Member Functions | Private Attributes | List of all members
Eigen::MatrixExponentialScalingOp< RealScalar > Struct Template Reference

#include "stan/math/prim/mat/fun/MatrixExponential.h"

Public Types

typedef std::complex< RealScalar > ComplexScalar
 

Public Member Functions

 MatrixExponentialScalingOp (int squarings)
 Constructor. More...
 
const RealScalar operator() (const RealScalar &x) const
 Scale a matrix coefficient. More...
 
const ComplexScalar operator() (const ComplexScalar &x) const
 Scale a matrix coefficient. More...
 

Private Attributes

int m_squarings
 

Detailed Description

template<typename RealScalar>
struct Eigen::MatrixExponentialScalingOp< RealScalar >

Definition at line 22 of file MatrixExponential.h.

Member Typedef Documentation

template<typename RealScalar >
typedef std::complex<RealScalar> Eigen::MatrixExponentialScalingOp< RealScalar >::ComplexScalar

Definition at line 41 of file MatrixExponential.h.

Constructor & Destructor Documentation

template<typename RealScalar >
Eigen::MatrixExponentialScalingOp< RealScalar >::MatrixExponentialScalingOp ( int  squarings)
inline

Constructor.

Parameters
[in]squaringsThe integer $ s $ in this document.

Definition at line 28 of file MatrixExponential.h.

Member Function Documentation

template<typename RealScalar >
const RealScalar Eigen::MatrixExponentialScalingOp< RealScalar >::operator() ( const RealScalar &  x) const
inline

Scale a matrix coefficient.

Parameters
[in,out]xThe scalar to be scaled, becoming $ 2^{-s} x $.

Definition at line 35 of file MatrixExponential.h.

References stan::math::ldexp(), and Eigen::MatrixExponentialScalingOp< RealScalar >::m_squarings.

36  {
37  using std::ldexp;
38  return ldexp(x, -m_squarings);
39  }
T ldexp(const T &a, int b)
Definition: ldexp.hpp:19
template<typename RealScalar >
const ComplexScalar Eigen::MatrixExponentialScalingOp< RealScalar >::operator() ( const ComplexScalar x) const
inline

Scale a matrix coefficient.

Parameters
[in,out]xThe scalar to be scaled, becoming $ 2^{-s} x $.

Definition at line 47 of file MatrixExponential.h.

References stan::math::ldexp(), and Eigen::MatrixExponentialScalingOp< RealScalar >::m_squarings.

48  {
49  using std::ldexp;
50  return ComplexScalar(ldexp(x.real(), -m_squarings), ldexp(x.imag(), -m_squarings));
51  }
std::complex< RealScalar > ComplexScalar
T ldexp(const T &a, int b)
Definition: ldexp.hpp:19

Member Data Documentation

template<typename RealScalar >
int Eigen::MatrixExponentialScalingOp< RealScalar >::m_squarings
private

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