You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

simple.cpp 411 B

12345678910111213
  1. #include <iostream>
  2. #include "../../root/include/node.h"
  3. int main(int argc, char const *argv[]) {
  4. Node x=2, y=3;
  5. Node f = x*y + sin(x);
  6. std::cout << "f(x,y) = x*y + sin(x)" << std::endl;
  7. std::cout << "f(" << x << "," << y << ") = " << f << std::endl;
  8. std::cout << "∂f/∂x = " << f.gradient(x) << std::endl;
  9. std::cout << "∂f/∂y = " << f.gradient(y) << std::endl;
  10. return 0;
  11. }

Edge : 一个开源的科学计算引擎

Contributors (1)