OSDN Git Service

Confirm to new coding conventions.
[islib/islib.git] / sigmoid.cpp
index 8a72a49..541690e 100644 (file)
@@ -17,7 +17,7 @@ namespace islib
     // Definition of funcion
     //
     double
-    sigmoid
+      sigmoid
       (
         double const x
       )
@@ -29,26 +29,28 @@ namespace islib
           public:
             local
               (
-                double const &y__
+                double const &parameter_local_y
               ):
-              y_ ( y__ )
+              local_y ( parameter_local_y )
               {
               }
 
             ~local
-              ()
+              (
+              )
               throw
-                ()
+              (
+              )
               {
-                assert_ ( is_greater_than_or_equals_to ( this->y_, 0.0, std::numeric_limits < double >::epsilon () ) && is_less_than_or_equals_to ( this->y_, 1.0, std::numeric_limits < double >::epsilon () ), "islib::sigmoid: `is_greater_than_or_equals_to ( this->y_, 0.0, std::numeric_limits < double >::epsilon () ) && is_less_than_or_equals_to ( this->y_, 1.0, std::numeric_limits < double >::epsilon () )' has failed." );
+                islib_assert_with_message ( is_greater_than_or_equals_to ( this->local_y, 0.0, std::numeric_limits < double >::epsilon () ) && is_less_than_or_equals_to ( this->local_y, 1.0, std::numeric_limits < double >::epsilon () ), islib::sigmoid );
               }
 
           private:
-            double const &y_;
+            double const &local_y;
           }
         a_local ( y );
 
-        y = 1.0 / ( 1.0 + std::pow ( E, -x ) );
+        y = 1.0 / ( 1.0 + std::pow ( e, -x ) );
 
         return y;
       }