Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // функтор
- class Sigm : public DD_Func
- {
- public:
- Sigm(const double& a_) : DD_Func(), a(a_) {};
- double a;
- double operator()(const double& x) {
- double f = 1;
- const double e = 2.7182818284;
- for (int i = 0; i < a*x; i++)
- {
- f *= 1 / e;
- }
- f++;
- return 1 / f;
- }
- ~Sigm() {};
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement