STK++ 0.9.13
STK::PowOp< Type > Struct Template Reference

Template functor to raise a number to a power. More...

#include <STK_Functors.h>

Public Types

enum  { NbParam_ = 1 }
 
typedef Type result_type
 
typedef hidden::RemoveConst< Type >::Type param1_type
 

Public Member Functions

 PowOp (PowOp const &value)
 
 PowOp (Type exponent)
 
result_type operator() (param1_type const &a) const
 

Private Attributes

const Type exponent_
 

Detailed Description

template<typename Type>
struct STK::PowOp< Type >

Template functor to raise a number to a power.

Definition at line 931 of file STK_Functors.h.

Member Typedef Documentation

◆ param1_type

template<typename Type >
typedef hidden::RemoveConst<Type>::Type STK::PowOp< Type >::param1_type

Definition at line 935 of file STK_Functors.h.

◆ result_type

template<typename Type >
typedef Type STK::PowOp< Type >::result_type

Definition at line 934 of file STK_Functors.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename Type >
anonymous enum
Enumerator
NbParam_ 

Definition at line 933 of file STK_Functors.h.

933{ NbParam_ = 1 };

Constructor & Destructor Documentation

◆ PowOp() [1/2]

template<typename Type >
STK::PowOp< Type >::PowOp ( PowOp< Type > const value)
inline

Definition at line 937 of file STK_Functors.h.

937: exponent_(value.exponent_) {}
const Type exponent_

◆ PowOp() [2/2]

template<typename Type >
STK::PowOp< Type >::PowOp ( Type  exponent)
inline

Definition at line 938 of file STK_Functors.h.

938: exponent_(exponent) {}

Member Function Documentation

◆ operator()()

template<typename Type >
result_type STK::PowOp< Type >::operator() ( param1_type const a) const
inline

Definition at line 940 of file STK_Functors.h.

940{ return std::pow(a, exponent_);}

References STK::PowOp< Type >::exponent_.

Member Data Documentation

◆ exponent_

template<typename Type >
const Type STK::PowOp< Type >::exponent_
private

Definition at line 942 of file STK_Functors.h.

Referenced by STK::PowOp< Type >::operator()().


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