• Main Page
  • Modules
  • Classes
  • Files
  • File List

D:/Projekt/ECF_trunk/examples/GPNN/Sqrt.h

00001 
00002 // sqrt: if the argument is <0, the result is zero
00003 class Sqrt : public Tree::Primitives::Primitive
00004 {
00005 public:
00006     Sqrt()
00007     {
00008         nArguments_ = 1;
00009         name_ = "sqrt";
00010     }
00011     void execute(void* result, Tree::Tree& tree)
00012     {
00013         double& arg = *(double*)result;
00014         getNextArgument(&arg, tree);
00015 
00016         if(arg > 0)
00017             arg = sqrt(arg);
00018         else
00019             arg = 0;
00020     }
00021     ~Sqrt()
00022     {   }
00023 };

Generated on Fri Jul 5 2013 09:34:24 for ECF by  doxygen 1.7.1