27 vec<T> result(inputs.size());
28 for (
int i = 0; i < inputs.size(); i++) {
29 result[i] = inputs[i];
45 std::vector<T> result(inputs.size());
46 for (
int i = 0; i < inputs.size(); i++) {
47 result[i] = inputs[i];
64 std::vector<T> result(size);
65 for (
int i = 0; i < size; i++) {
84 std::vector<T> result;
86 for (
int i = 0; i < inputs.size(); i++) {
87 result.insert(result.end(), inputs[i].begin(), inputs[i].end());
103 template <
typename T>
104 std::vector<T>
flattenVector(std::vector<std::vector<std::vector<T>>> inputs) {
105 std::vector<T> result;
107 for (
int i = 0; i < inputs.size(); i++) {
108 std::vector<T> nextInsert = flattenVector<T>(inputs[i]);
109 result.insert(result.end(), nextInsert.begin(), nextInsert.end());
std::vector< T > convertVecDataToVector(T *data, int size)
Converts given data and size, a NSPACE::vec to a std::vector.
Definition: utils.h:63
PredefinedClauses
Enum that represents all the predefined constraints.
Definition: global.h:14
std::string getFieldName(FieldType fieldType, int index, Data &data)
Gets the field name in the Data of a given FieldType at a given index.
Definition: utils.cpp:82
FieldType
Enum that represents all the field types.
Definition: global.h:9
std::vector< T > convertVecToVector(vec< T > inputs)
Converts a NSPACE::vec to a std::vector.
Definition: utils.h:44
std::string getPredefinedConstraintName(PredefinedClauses clauseType)
Gets the predefined constraint name as a string.
Definition: utils.cpp:43
vec< T > convertVectorToVec(std::vector< T > inputs)
Converts a std::vector to a NSPACE::vec.
Definition: utils.h:26
Class for data.
Definition: data.h:30
std::vector< T > flattenVector(std::vector< std::vector< T >> inputs)
Converts a two dimensional vector to a one dimensional vector.
Definition: utils.h:83
std::string getFieldTypeName(FieldType fieldType)
Gets the field type name as a string.
Definition: utils.cpp:16