MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
InterpolatingFunction.hh
1
4//
5// This file is part of MARLEY (Model of Argon Reaction Low Energy Yields)
6//
7// MARLEY is free software: you can redistribute it and/or modify it under the
8// terms of version 3 of the GNU General Public License as published by the
9// Free Software Foundation.
10//
11// For the full text of the license please see COPYING or
12// visit http://opensource.org/licenses/GPL-3.0
13//
14// Please respect the MCnet academic usage guidelines. See GUIDELINES
15// or visit https://www.montecarlonet.org/GUIDELINES for details.
16
17#pragma once
18#include <functional>
19#include <vector>
20
21#include "marley/marley_utils.hh"
22
23namespace marley {
24
27 class InterpolatingFunction {
28
29 public:
30
31 InterpolatingFunction( double x_min, double x_max ) : x_min_( x_min ),
32 x_max_( x_max ) {}
33
34 virtual ~InterpolatingFunction() = default;
35
37 virtual double evaluate( double x ) const = 0;
38
39 protected:
40
44
46 double x_min_;
47
49 double x_max_;
50 };
51
52}
virtual double evaluate(double x) const =0
Returns an approximate value of the represented function.
double x_max_
Upper bound of the interpolation range.
double x_min_
Lower bound of the interpolation range.
InterpolatingFunction()
Allows construction by derived classes without immediately defining the bounds of the interpolation r...