You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Finding the distance to the closest facet and its row
611
618
std::pair<NT, int> ans = distances_set.get_min();
619
+
620
+
// Subtract params.moved_dist to obtain the actual distance to the facet
612
621
ans.first -= params.moved_dist;
622
+
613
623
params.inner_vi_ak = *(Av_data + ans.second);
614
624
params.facet_prev = ans.second;
615
625
@@ -1002,34 +1012,59 @@ class HPolytope {
1002
1012
return total;
1003
1013
}
1004
1014
1015
+
// Updates the velocity vector v and the position vector p after a reflection
1005
1016
template <typename update_parameters>
1006
1017
voidcompute_reflection(Point &v, Point const&, update_parameters const& params) const {
1007
1018
Point a((-2.0 * params.inner_vi_ak) * A.row(params.facet_prev));
1008
1019
v += a;
1009
1020
}
1010
1021
1011
-
//updates the velocity vector v and the position vector p after a reflection
1012
-
//the real value of p is given by p + moved_dist * v
1022
+
//Only to be called when MT is in RowMajor format
1023
+
//The real value of p is given by p + params.moved_dist * v
1013
1024
template <typename update_parameters>
1014
-
autocompute_reflection(Point &v, Point &p, update_parameters const& params) const
1015
-
-> std::enable_if_t<std::is_same_v<MT, Eigen::SparseMatrix<NT, Eigen::RowMajor>> && !std::is_same_v<update_parameters, int>, void> { // MT must be in RowMajor format
0 commit comments