← Back to C-Kernel-Engine Docs Doxygen Source Documentation
Loading...
Searching...
No Matches
diffusion_vp_common.h
Go to the documentation of this file.
1#ifndef CK_DIFFUSION_VP_COMMON_H
2#define CK_DIFFUSION_VP_COMMON_H
3
4#include <math.h>
5
6static inline double vp_sigmoid(double x)
7{
8 if (x >= 0.0) return 1.0 / (1.0 + exp(-x));
9 const double e = exp(x);
10 return e / (1.0 + e);
11}
12
13#endif
static double vp_sigmoid(double x)