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

#include <projection.h>

+ Inheritance diagram for olb::opti::projection::Softplus< T >:
+ Collaboration diagram for olb::opti::projection::Softplus< 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::Softplus< T >

Definition at line 95 of file projection.h.

Member Function Documentation

◆ derivative()

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

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

Definition at line 98 of file projection.h.

98 { return util::exp(x)
99 / ((util::exp(x)+T(1))*(util::log(T(1)+util::exp(x))+T(1))*(util::log(T(1)+util::exp(x))+T(1))); }
ADf< T, DIM > log(const ADf< T, DIM > &a)
Definition aDiff.h:475
ADf< T, DIM > exp(const ADf< T, DIM > &a)
Definition aDiff.h:455

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

+ Here is the call graph for this function:

◆ inverse()

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

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

Definition at line 100 of file projection.h.

100{ return util::log(util::exp(x/(T(1)-x))-T(1)); }

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

+ Here is the call graph for this function:

◆ project()

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

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

Definition at line 97 of file projection.h.

97{ return T(1) - T(1)/(util::log(T(1)+util::exp(x))+T(1)); }

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

+ Here is the call graph for this function:

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