Skip to content

Commit

Permalink
Fixed bug when updating hessian matrix.
Browse files Browse the repository at this point in the history
My bad, it seemed I did not know the definition of an upper triangular matrix.
  • Loading branch information
S-Dafarra committed Jun 13, 2018
1 parent 38825e5 commit 7109a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/OsqpEigen/Solver.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void OsqpEigen::Solver::selectUpperTriangularTriplets(const std::vector<Eigen::T

int upperTriangularTriplets = 0;
for (int i = 0; i < fullMatrixTriplets.size(); ++i) {
if (fullMatrixTriplets[i].row() >= fullMatrixTriplets[i].col()) {
if (fullMatrixTriplets[i].row() <= fullMatrixTriplets[i].col()) {
if (upperTriangularTriplets < upperTriangularMatrixTriplets.size()) {
upperTriangularMatrixTriplets[upperTriangularTriplets] = fullMatrixTriplets[i];
} else {
Expand Down

0 comments on commit 7109a22

Please sign in to comment.