mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[upstream_utils] Upgrade to Sleipnir 0.6.0 (#8923)
This commit is contained in:
@@ -9,26 +9,26 @@ Subject: [PATCH 05/10] Replace std::views::zip()
|
||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/sleipnir/autodiff/gradient_expression_graph.hpp b/include/sleipnir/autodiff/gradient_expression_graph.hpp
|
||||
index 275c30b76d34efe7ee1608cd4eedfa54ab2dc1ec..c0e3c161343175837abcb25fb22da0c611a44799 100644
|
||||
index fda7931c686a315209acdbe6f1ac581944e2781c..d3e59068d04b3db01945c5657959b69cd4522cca 100644
|
||||
--- a/include/sleipnir/autodiff/gradient_expression_graph.hpp
|
||||
+++ b/include/sleipnir/autodiff/gradient_expression_graph.hpp
|
||||
@@ -161,7 +161,10 @@ class GradientExpressionGraph {
|
||||
}
|
||||
@@ -139,7 +139,10 @@ class GradientExpressionGraph {
|
||||
}
|
||||
} else {
|
||||
- for (const auto& [col, node] : std::views::zip(m_col_list, m_top_list)) {
|
||||
+ for (size_t i = 0; i < m_top_list.size(); ++i) {
|
||||
+ const auto& col = m_col_list[i];
|
||||
+ const auto& node = m_top_list[i];
|
||||
}
|
||||
|
||||
- for (const auto& [col, node] : std::views::zip(m_col_list, m_top_list)) {
|
||||
+ for (size_t i = 0; i < m_top_list.size(); ++i) {
|
||||
+ const auto& col = m_col_list[i];
|
||||
+ const auto& node = m_top_list[i];
|
||||
+
|
||||
// Append adjoints of wrt to sparse matrix triplets
|
||||
if (col != -1 && node->adjoint != Scalar(0)) {
|
||||
triplets.emplace_back(row, col, node->adjoint);
|
||||
// Append adjoints of wrt to sparse matrix triplets
|
||||
if (col != -1) {
|
||||
triplets.emplace_back(row, col, node->adjoint);
|
||||
diff --git a/include/sleipnir/optimization/problem.hpp b/include/sleipnir/optimization/problem.hpp
|
||||
index 273363db2cf75c84d81f2fef36dcb2094303ee2e..c4a45f7f954c9e028b1c85c45d5034bde284474f 100644
|
||||
index 49921b98de3452b6ca9f2e33a86daa254c0d3a01..d3feadd577bd53147a8b07da76910e046ccbf95d 100644
|
||||
--- a/include/sleipnir/optimization/problem.hpp
|
||||
+++ b/include/sleipnir/optimization/problem.hpp
|
||||
@@ -771,9 +771,11 @@ class Problem {
|
||||
@@ -792,9 +792,11 @@ class Problem {
|
||||
for (const auto& constraint : constraints) {
|
||||
++counts[slp::to_underlying(constraint.type())];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user