OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::opti::projection::Sigmoid< T > Struct Template Reference

#include <projection.h>

+ Inheritance diagram for olb::opti::projection::Sigmoid< T >:
+ Collaboration diagram for olb::opti::projection::Sigmoid< T >:

Public Member Functions

project (T x) const override
 
derivative (T x) const override
 
inverse (T x) const override
 

Detailed Description

template<typename T>
struct olb::opti::projection::Sigmoid< T >

Definition at line 63 of file projection.h.

Member Function Documentation

◆ derivative()

template<typename T >
T olb::opti::projection::Sigmoid< T >::derivative ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::Base< T >.

Definition at line 66 of file projection.h.

66{ return util::exp(x) / util::pow( util::exp(x) + T(1), 2 ); }
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112
ADf< T, DIM > exp(const ADf< T, DIM > &a)
Definition aDiff.h:455

References olb::util::exp(), and olb::util::pow().

+ Here is the call graph for this function:

◆ inverse()

template<typename T >
T olb::opti::projection::Sigmoid< T >::inverse ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::Base< T >.

Definition at line 67 of file projection.h.

67{ return -util::log(T(1)/x - T(1)); }
ADf< T, DIM > log(const ADf< T, DIM > &a)
Definition aDiff.h:475

References olb::util::log().

+ Here is the call graph for this function:

◆ project()

template<typename T >
T olb::opti::projection::Sigmoid< T >::project ( T x) const
inlineoverridevirtual

Implements olb::opti::projection::Base< T >.

Definition at line 65 of file projection.h.

65{ return util::exp(x) / ( util::exp(x) + T(1) ); }

References olb::util::exp().

+ Here is the call graph for this function:

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