#pragma once #include #include "../upstream/src/Array.hh" #include "../upstream/src/QuadProg++.hh" namespace quadprogpp { typedef quadprogpp::Vector VectorF64; std::unique_ptr new_vector(const unsigned int n) { return std::make_unique(n); } std::unique_ptr new_vector_from_ptr(const double* a, const unsigned int n) { return std::make_unique(a, n); } double vector_index(const VectorF64& v, const unsigned int i) { return v[i]; } typedef quadprogpp::Matrix MatrixF64; std::unique_ptr new_matrix_from_ptr(const double* a, const unsigned int n, const unsigned int m) { return std::make_unique(a, n, m); } } // namespace quadprogpp