50 template<
typename RealT,
typename ComplexT,
typename MetaDataType>
66 template<
typename ...T>
90 crossed_with_.push_back( std::make_pair(
crossed_with, same_start) );
107 crossed_with_.push_back(crossed);
116 rerun_ = rerun_ || !same_start;
128 std::vector< std::pair<PathIndT, bool> > crossed_with_;
159 template <
typename StartSystemT>
170 crossed_paths_.clear();
172 for (
PathIndT ii = 0; ii < boundary_data.size(); ++ii)
177 const Vec<ComplexT>& solution_ii = boundary_data[ii].path_point;
178 const auto start_ii =
start_system.template StartPoint<ComplexT>(ii);
180 for (
PathIndT jj = ii+1; jj < boundary_data.size(); ++jj)
185 const Vec<ComplexT>& solution_jj = boundary_data[jj].path_point;
188 if ((diff_sol.template lpNorm<Eigen::Infinity>()/solution_ii.template lpNorm<Eigen::Infinity>()) <
SamePointTol())
190 bool i_already_stored =
false;
191 bool j_already_stored =
false;
194 const auto start_jj =
start_system.template StartPoint<ComplexT>(jj);
195 auto diff_start = start_ii - start_jj;
204 bool same_start = (diff_start.template lpNorm<Eigen::Infinity>() <
SamePointTol());
208 for(
auto& v : crossed_paths_)
212 v.crossed_with(std::make_pair(jj,same_start));
213 i_already_stored =
true;
218 v.crossed_with(std::make_pair(ii,same_start));
219 j_already_stored =
true;
225 if(!i_already_stored)
227 CrossedPath tempPath(ii, jj, same_start);
228 crossed_paths_.push_back(tempPath);
230 if(!j_already_stored)
232 CrossedPath tempPath(jj, ii, same_start);
233 crossed_paths_.push_back(tempPath);
248 return crossed_paths_;
255 std::vector<CrossedPath> crossed_paths_;
Definition algorithm_base.hpp:34
std::vector< T > SolnCont
Definition config.hpp:32
Definition zero_dim_solve.hpp:68
Definition algorithm_builder.hpp:36
Eigen::Matrix< NumT, Eigen::Dynamic, 1 > Vec
A dynamically-sized column vector of NumT.
Definition eigen_extensions.hpp:296
@ Success
Definition config.hpp:51
Configuration for the midpath (path-crossing) check.
Definition config.hpp:80
PathIndT index() const
Definition midpath_check.hpp:96
bool rerun() const
Definition midpath_check.hpp:120
void crossed_with(std::pair< PathIndT, bool > crossed)
Record an additional path that this one crosses with.
Definition midpath_check.hpp:105
CrossedPath(PathIndT index, PathIndT crossed_with, bool same_start)
Record a path crossing.
Definition midpath_check.hpp:87
void rerun(bool same_start)
Update whether this path needs rerunning, given another crossing.
Definition midpath_check.hpp:114
const std::vector< CrossedPath > GetCrossedPaths() const
Definition midpath_check.hpp:246
const auto & SamePointTol() const
Definition midpath_check.hpp:144
MidPathConfig MidPathConfT
The configuration type this checker reads.
Definition midpath_check.hpp:53
SolnCont< MetaDataType > BoundaryData
Container of solution data at the endgame boundary.
Definition midpath_check.hpp:55
MidpathChecker(T const &...config)
Construct a MidpathChecker, given the system it is checking, and the tolerance which should be used t...
Definition midpath_check.hpp:67
bool Check(BoundaryData const &boundary_data, StartSystemT const &start_system)
Checks the solution data at the endgame boundary to see if any paths have crossed during tracking bef...
Definition midpath_check.hpp:160
unsigned long long PathIndT
Integer type indexing solution paths.
Definition midpath_check.hpp:56
detail::Configured< MidPathConfig > AlgConf
The Configured base alias.
Definition midpath_check.hpp:54
bool Passed() const
Definition midpath_check.hpp:137