25 template<
class T,
class solution_t >
42 gsAPALMData(
const std::vector<T> & times,
const std::vector<solution_t> & solutions);
49 gsAPALMData(
const std::vector<T> & times);
55 void _defaultOptions();
61 void addStartPoint(
const T & time,
const solution_t & solution,
bool priority =
false);
63 void appendPoint(
bool priority =
false);
65 void appendData(
const T & time,
const solution_t & solution,
bool priority=
false);
67 void setData(
const std::vector<T> & times,
const std::vector<solution_t> & solutions);
69 void init(
const std::vector<T> & times,
const std::vector<solution_t> & solutions);
73 gsOptionList & options() {
return m_options; }
76 std::tuple<index_t, T , solution_t, solution_t> pop();
78 bool getReferenceByTime(T time, solution_t & result);
80 bool getReferenceByPar(T xi, solution_t & result);
82 bool getReferenceByID(
index_t ID, solution_t & result);
93 void submit(
index_t ID,
const std::vector<T> & distances, std::vector<solution_t> solutions,
const T & upperError,
const T & lowerError = 0);
100 std::pair<T,T> jobTimes(
index_t ID);
101 std::pair<T,T> jobPars(
index_t ID);
104 void printActiveJobs();
108 std::tuple<std::vector<T>,std::vector<solution_t>,std::vector<index_t>> getFlatSolution(
index_t level=-1);
116 size_t nActive() {
return m_jobs.size(); }
117 size_t nWaiting() {
return m_queue.size(); }
119 size_t maxLevel() {
return m_maxLevel; }
121 void setLength(T dt) { m_dt = dt; }
122 T getLength() {
return m_dt; }
125 std::tuple<T,T,index_t> _activeJob(
index_t ID);
142 std::map<T,std::shared_ptr<solution_t>> m_solutions;
143 std::map<T,std::shared_ptr<solution_t>> m_prevs;
145 std::map<T,index_t> m_levels;
148 std::map<T,T> m_tmap;
150 std::map<T,T> m_ximap;
153 gsKnotVector<T> m_xi;
158 std::deque<std::tuple<T,T,index_t>> m_queue;
162 std::map<index_t,std::tuple<T,T,index_t>> m_jobs;
166 gsOptionList m_options;
172 #ifndef GISMO_BUILD_LIB
173 #include GISMO_HPP_HEADER(gsAPALMData.hpp)
Knot vector for B-splines.
#define index_t
Definition: gsConfig.h:32
Provides a list of labeled parameters/options that can be set and accessed easily.
This is the main header file that collects wrappers of Eigen for linear algebra.
Provides declaration of the tree node.