Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
NInterpolatingFunction.hh
Go to the documentation of this file.
1#pragma once
2
3#include "NTensor.hh"
4#include "Storage.hh"
5#include "Compare.hh"
6#include <vector>
7
8namespace cadabra {
9
13
15 public:
17
18 // FIXME: use NTensor as argument?
19 std::complex<double> evaluate(double) const;
20
24
25 // Return the range over which the function is
26 // defined/computable without extrapolation.
27 std::pair<double, double> range() const;
28
29 private:
31 mutable size_t last_index;
32 mutable bool precomputed;
33
34 size_t find_interval(double) const;
35 void compute_slopes() const;
36 };
37
40 typedef std::map<Ex, std::pair<double, double>, tree_exact_less_no_wildcards_obj> variable_ranges_t;
41
44
45};
Definition Storage.hh:170
An object representing a one-variable function (for now), which is computed from an interpolation of ...
Definition NInterpolatingFunction.hh:14
void compute_slopes() const
Definition NInterpolatingFunction.cc:42
NInterpolatingFunction()
Definition NInterpolatingFunction.cc:18
NTensor var_values
Definition NInterpolatingFunction.hh:22
NTensor fun_values
Definition NInterpolatingFunction.hh:23
size_t last_index
Definition NInterpolatingFunction.hh:31
NTensor slope_values
Definition NInterpolatingFunction.hh:30
Ex var
Definition NInterpolatingFunction.hh:21
size_t find_interval(double) const
Definition NInterpolatingFunction.cc:23
bool precomputed
Definition NInterpolatingFunction.hh:32
std::pair< double, double > range() const
Definition NInterpolatingFunction.cc:60
Definition NTensor.hh:15
Definition evaluate.hh:95
Compare two trees exactly, treat wildcard names as ordinary names.
Definition Compare.hh:172
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83
variable_ranges_t function_domain(const Ex &)
Return the range of definition of a given expression.
Definition NInterpolatingFunction.cc:88
std::map< Ex, std::pair< double, double >, tree_exact_less_no_wildcards_obj > variable_ranges_t
Data structure which, for a set of variables/expressions, holds a real range.
Definition NInterpolatingFunction.hh:40