Function trv::array::check_1d_array#

Function Documentation#

int trv::array::check_1d_array(std::vector<double> &a, bool check_lin, bool check_loglin, bool check_sign)#

Check the linearity or log-linearity of a 1-d array.

Parameters:
  • a – 1-d array as a vector.

  • check_lin – If true, check linearity.

  • check_loglin – If true, check log-linearity. This also checks for any sign change or zeros.

  • check_sign – If true, check for any sign change or zeros.

Returns:

0 if no check fails, 1 if linearity check fails, 2 if log-linearity check fails, or 3 if sign check fails.