Advertisement
sdfDFASDFASDF

Untitled

May 20th, 2019
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. // функтор
  2. class Sigm : public DD_Func
  3. {
  4. public:
  5. Sigm(const double& a_) : DD_Func(), a(a_) {};
  6. double a;
  7. double operator()(const double& x) {
  8. double f = 1;
  9. const double e = 2.7182818284;
  10. for (int i = 0; i < a*x; i++)
  11. {
  12. f *= 1 / e;
  13. }
  14. f++;
  15. return 1 / f;
  16. }
  17. ~Sigm() {};
  18. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement