Skip to content
Snippets Groups Projects
Commit 09db8461 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Fixed bug with converter.h vectors (negative entries were not allowed) & fixed wolf cmake file

parent 56224126
No related branches found
No related tags found
No related merge requests found
Pipeline #4457 passed
......@@ -84,9 +84,13 @@ FIND_PACKAGE(YamlCpp REQUIRED)
list(APPEND wolf_INCLUDE_DIRS ${YAMLCPP_INCLUDE_DIRS})
list(APPEND wolf_LIBRARIES ${YAMLCPP_LIBRARY})
if(NOT Eigen_FOUND)
#Eigen
# FIND_PACKAGE(Eigen3 REQUIRED)
# list(APPEND wolf_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
if(NOT Eigen3_FOUND)
FIND_PACKAGE(Eigen3 REQUIRED)
list(APPEND wolf_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
endif()
list(APPEND wolf_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
SET(CMAKE_MODULE_PATH ${BACKUP_MODULE_PATH})
\ No newline at end of file
SET(CMAKE_MODULE_PATH ${BACKUP_MODULE_PATH})
......@@ -59,8 +59,8 @@ namespace utils{
* @return <b>{std::array<std::string, 2>}</b> pair ([N,M],[a1,a2,a3,...]) or just ([a1,a2,a3...])
*/
static inline std::array<std::string,2> splitMatrixStringRepresentation(std::string matrix){
std::regex rgx("\\[\\[((?:[0-9]+,?)+)\\],((?:(?:[0-9]*\\.)?[0-9]+,?)+)\\]");
std::regex rgxStatic("\\[((?:(?:[0-9]*\\.)?[0-9]+,?)+)\\]");
std::regex rgx("\\[\\[((?:[0-9]+,?)+)\\],((?:-?[0-9]*(?:\\.[0-9]+)?,?)+)\\]");
std::regex rgxStatic("\\[((?:(?:-?[0-9]*)(?:\\.[0-9]+)?,?)+)\\]");
std::smatch matches;
std::smatch matchesStatic;
std::array<std::string,2> values = {{"[]","[]"}};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment