Class GriddedInterpolant

Nested Relationships

Nested Types

Class Documentation

class GriddedInterpolant

Class which performs bivariate cubic interpolation on a 2D grid of equally spaced data.

Public Functions

GriddedInterpolant(Vector x_vector, Vector y_vector, Matrix q_mat)

Constructor.

Parameters
  • x_vector – 1 x N Vector representing x-axis values, where N > 2.

  • y_vector – 1 x M Vector representing y-axis values, where M > 2.

  • q_mat – N x M grid of map values at grid points (x,y)

Throws

std::invalid_argument – if x_vector or y_vector have less than three elements, or if q is not NxM and the error mode is ErrorMode::DIE for either case.

double interpolate(double x, double y)

Function which provides the interpolated value on the map q at the point ( x , y ) using a bivariate cubic interpolation method.

Parameters
  • x – X query point for interpolated value on map q

  • y – Y query point for interpolated value on map q

Throws

std::invalid_argument – if x or y are outside map q and the error mode is ErrorMode::DIE.

Returns

Interpolated value at ( x , y ).