Skip to content

Commit

Permalink
Use n instead of outerSize()
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Feb 27, 2024
1 parent c25ad50 commit b883fd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trajopt_sco/src/osqp_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ void OSQPModel::updateConstraints()
u_[i_cnt] = v[static_cast<Eigen::Index>(i_cnt)];
}

std::vector<Eigen::Index> new_inner_sizes(static_cast<size_t>(sm.outerSize()));
for (size_t k = 0; k < sm.outerSize(); ++k)
std::vector<Eigen::Index> new_inner_sizes(n);
for (size_t k = 0; k < n; ++k)
{
new_inner_sizes[k] = sm.innerVector(static_cast<Eigen::Index>(k)).nonZeros() + 1;
}
Expand Down

0 comments on commit b883fd0

Please sign in to comment.