[sdpb] 169/233: Implemented Filip's fix for matrices larger than 2x2
Tobias Hansen
thansen at moszumanska.debian.org
Thu Mar 9 04:06:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sdpb.
commit fbf55bc58f6c32c3e7247779dae4d11dced347a1
Author: David Simmons-Duffin <dsd at athena.sns.ias.edu>
Date: Sat May 30 02:15:53 2015 -0400
Implemented Filip's fix for matrices larger than 2x2
---
Readme.md | 6 ++++++
src/SDP.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Readme.md b/Readme.md
index 39cc59d..4316f3d 100644
--- a/Readme.md
+++ b/Readme.md
@@ -92,6 +92,12 @@ The input format for SDPB is XML-based and described in the manual.
The Mathematica file `SDPB.m` includes code to export semidefinite
programs in this format, along with some examples.
+## Changelog
+
+- 5/29/15: Fixed a bug in SDP.cpp that caused SDPB to incorrectly load
+ matrices with dimensions larger than 2x2. (Thanks to Filip Kos for
+ the fix.)
+
## Author
- David Simmons-Duffin (davidsd at gmail.com)
diff --git a/src/SDP.cpp b/src/SDP.cpp
index 816e9a2..3def5fb 100644
--- a/src/SDP.cpp
+++ b/src/SDP.cpp
@@ -77,7 +77,7 @@ dualConstraintGroupFromPolVecMat(const PolynomialVectorMatrix &m) {
// Populate B and c by sampling the polynomial matrix
int p = 0;
for (int c = 0; c < g.dim; c++) {
- for (int r = c; r < g.dim; r++) {
+ for (int r = 0; r <= c; r++) {
for (int k = 0; k < numSamples; k++) {
Real x = m.samplePoints[k];
Real scale = m.sampleScalings[k];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sdpb.git
More information about the debian-science-commits
mailing list