function.h 346 Bytes
Newer Older
1 2
#pragma once

3 4 5 6
#include <functional>
#include <string>

class function : public std::function<double(double)>
7 8 9 10
{
	public: // methods

		// Overload the function operator
11
		virtual double operator()(double x) const = 0 ;
12 13 14 15 16 17
		
		// IO function to text files
		virtual void load(const std::string& filename) = 0 ;
		virtual void save() const = 0 ;

} ;