class Gambit::Utils::interp2d_collection

[No description available] More…

#include <interp_collection.hpp>

Public Functions

Name
interp2d_collection(const std::string collection_name_in, const std::string file_name_in, const std::vector< std::string > colnames_in)
~interp2d_collection()
doubleeval(double x1, double x2, size_t interp_index)
boolis_inside_range(double x1, double x2)

Public Attributes

Name
std::stringcollection_name
std::stringfile_name
std::stringx1_name
std::stringx2_name
std::vector< std::string >interpolator_names
std::vector< double >x1_vec
std::vector< double >x2_vec
std::vector< double >x1_vec_unsorted
std::vector< double >x2_vec_unsorted
std::vector< std::vector< double > >interp_data
doublex1_min
doublex1_max
doublex2_min
doublex2_max
size_tn_interpolators

Detailed Description

class Gambit::Utils::interp2d_collection;

A class for holding a collection of 2D interpolators, created from reading a tabulated ascii file.

  • The first two columns are taken to be the x and y grid points.
  • For each remaining column a 2D interpolation function f(x,y) is created
  • This is a simple linear interpolator that does not use GSL

Public Functions Documentation

function interp2d_collection

interp2d_collection(
    const std::string collection_name_in,
    const std::string file_name_in,
    const std::vector< std::string > colnames_in
)

function ~interp2d_collection

~interp2d_collection()

function eval

double eval(
    double x1,
    double x2,
    size_t interp_index
)

function is_inside_range

bool is_inside_range(
    double x1,
    double x2
)

Public Attributes Documentation

variable collection_name

std::string collection_name;

variable file_name

std::string file_name;

variable x1_name

std::string x1_name;

variable x2_name

std::string x2_name;

variable interpolator_names

std::vector< std::string > interpolator_names;

variable x1_vec

std::vector< double > x1_vec;

variable x2_vec

std::vector< double > x2_vec;

variable x1_vec_unsorted

std::vector< double > x1_vec_unsorted;

variable x2_vec_unsorted

std::vector< double > x2_vec_unsorted;

variable interp_data

std::vector< std::vector< double > > interp_data;

variable x1_min

double x1_min;

variable x1_max

double x1_max;

variable x2_min

double x2_min;

variable x2_max

double x2_max;

variable n_interpolators

size_t n_interpolators;

Updated on 2024-07-18 at 13:53:32 +0000