From ddb2cfeb6f93619aa1fab310dfceb94e7a274ab1 Mon Sep 17 00:00:00 2001 From: jvallve <jvallve@224674b8-e365-4e73-a4a8-558dbbfec58c> Date: Thu, 22 Oct 2015 13:10:33 +0000 Subject: [PATCH] --- src/CMakeLists.txt | 2 +- src/examples/CMakeLists.txt | 4 ++-- src/examples/test_SPQR.cpp | 3 ++- src/examples/test_ccolamd.cpp | 9 +++------ src/examples/test_permutations.cpp | 2 -- src/solver/CMakeLists.txt | 12 ++++++++++-- src/solver/ccolamd_ordering.h | 9 +++++++++ 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 36cf5a3a8..a0e58c7b2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,7 +52,7 @@ IF(laser_scan_utils_FOUND) ENDIF(laser_scan_utils_FOUND) IF(Suitesparse_FOUND) - INCLUDE_DIRECTORIES(/usr/include/suitesparse) + INCLUDE_DIRECTORIES(${Suitesparse_INCLUDE_DIRS}) ENDIF(Suitesparse_FOUND) #headers diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index cc05783d0..2e5cab0b9 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -57,8 +57,8 @@ IF(Suitesparse_FOUND) TARGET_LINK_LIBRARIES(test_iQR_wolf ${PROJECT_NAME}) # Testing SPQR simple test - ADD_EXECUTABLE(test_SPQR test_SPQR.cpp) - TARGET_LINK_LIBRARIES(test_SPQR ${PROJECT_NAME}) + #ADD_EXECUTABLE(test_SPQR test_SPQR.cpp) + #TARGET_LINK_LIBRARIES(test_SPQR ${PROJECT_NAME}) ENDIF(Suitesparse_FOUND) # Building and populating the wolf tree diff --git a/src/examples/test_SPQR.cpp b/src/examples/test_SPQR.cpp index 49f7215a1..bbd535de6 100644 --- a/src/examples/test_SPQR.cpp +++ b/src/examples/test_SPQR.cpp @@ -6,7 +6,8 @@ */ #include <iostream> -#include <Eigen/SPQRSupport> +#include <eigen3/Eigen/SPQRSupport> +#include <eigen3/Eigen/CholmodSupport> #include "SuiteSparseQR.hpp" using namespace Eigen; diff --git a/src/examples/test_ccolamd.cpp b/src/examples/test_ccolamd.cpp index f3d1e28aa..1301856eb 100644 --- a/src/examples/test_ccolamd.cpp +++ b/src/examples/test_ccolamd.cpp @@ -5,8 +5,6 @@ * Author: jvallve */ -typedef int IndexType; - //std includes #include <cstdlib> #include <iostream> @@ -17,15 +15,14 @@ typedef int IndexType; #include <ctime> #include <queue> +// ccolamd +#include "solver/ccolamd_ordering.h" + // eigen includes -#define EIGEN_DEFAULT_DENSE_INDEX_TYPE IndexType #include <eigen3/Eigen/OrderingMethods> #include <eigen3/Eigen/CholmodSupport> #include <eigen3/Eigen/SparseLU> -// ccolamd -#include "solver/ccolamd_ordering.h" - using namespace Eigen; //main diff --git a/src/examples/test_permutations.cpp b/src/examples/test_permutations.cpp index c570bd110..5d28ec06c 100644 --- a/src/examples/test_permutations.cpp +++ b/src/examples/test_permutations.cpp @@ -18,8 +18,6 @@ // eigen includes #include <eigen3/Eigen/OrderingMethods> -#include <eigen3/Eigen/CholmodSupport> -#include <eigen3/Eigen/SparseLU> using namespace Eigen; diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 32da45f88..60df425ec 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -1,4 +1,12 @@ SET(HDRS_SOLVER - ccolamd_ordering.h ) -SET(HDRS_SOLVER + ccolamd_ordering.h + cost_function_base.h + cost_function_sparse_base.h + cost_function_sparse.h + qr_solver.h + solver_manager.h + solver_QR.h + sparse_utils.h) +SET(SRCS_SOLVER + solver_manager.cpp ) \ No newline at end of file diff --git a/src/solver/ccolamd_ordering.h b/src/solver/ccolamd_ordering.h index 7a643b280..82b010798 100644 --- a/src/solver/ccolamd_ordering.h +++ b/src/solver/ccolamd_ordering.h @@ -8,9 +8,18 @@ #ifndef TRUNK_SRC_WOLF_SOLVER_CCOLAMD_ORDERING_H_ #define TRUNK_SRC_WOLF_SOLVER_CCOLAMD_ORDERING_H_ + +typedef int IndexType; + //std includes #include <iostream> +// Eigen includes +#define EIGEN_DEFAULT_DENSE_INDEX_TYPE IndexType +#include <eigen3/Eigen/OrderingMethods> +#include <eigen3/Eigen/CholmodSupport> +#include <eigen3/Eigen/SparseLU> + // ccolamd #include "ccolamd.h" -- GitLab