26#ifndef FUNCTIONS_FUNCTIONS_UTIL_H_
27#define FUNCTIONS_FUNCTIONS_UTIL_H_
47std::vector<int> parse_dims(
const std::string &shape);
49void check_number_type_array(libdap::BaseType *btp,
unsigned int rank = 0);
51unsigned int extract_uint_value(libdap::BaseType *arg);
58static double string_to_double(
const char *val);
59static double get_attribute_double_value(BaseType *var,
const string &attribute);
60static double get_attribute_double_value(BaseType *var, vector<string> &attributes);
61static double get_missing_value(BaseType *var);
62static double get_slope(BaseType *var);
63static double get_y_intercept(BaseType *var);
66typedef std::vector<unsigned long> Shape;
67static Shape array_shape(Array *a);
68static bool shape_matches(Array *a,
const Shape &shape);
69static bool dep_indep_match(
const Shape &dep_shape,
const Shape &indep_shape);
71static unsigned long number_of_values(
const Shape &shape);
73static void build_columns(
unsigned long n, BaseType *btp, std::vector<Array*> &arrays, Shape &shape);
75static void read_values(
const std::vector<Array*> &arrays);
77static void build_sequence_values(
const std::vector<Array*> &arrays, SequenceValues &sv);
78static void combine_sequence_values(SequenceValues &dep,
const SequenceValues &indep);
79static void add_index_column(
const Shape &indep_shape,
const Shape &dep_shape, std::vector<Array*> &dep_vars);