Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
demo-functor/call-operator/main.cpp
Go to the documentation of this file.
1 #include "plotter.h"
2 #include "polynomial.h"
3 #include <iostream>
4 
5 int main()
6 {
7  std::vector<double> input{0, 0, -0.6, -3, 1};
8  Polynomial<double> poly(input);
9 
10  Plotter<double> plot;
11  std::cout << plot.plot(poly, -0.8, 0.8) << std::endl;
12  std::cout << plot(poly, -5.9, 6.4, 20) << std::endl;
13  return 0;
14 }
Definition: plotter.h:6
std::string plot(const std::function< T(T)> &f, T from=0.0, T to=1.0, unsigned int n=10) const
Definition: plotter.cpp:11