[sdpb] 18/233: Modifications to testing code; passes more complicated checks

Tobias Hansen thansen at moszumanska.debian.org
Thu Mar 9 04:06:13 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 1676a6285b0e2402161f2ed4accc5e92477ad815
Author: David Simmons-Duffin <dsd at athena.sns.ias.edu>
Date:   Thu Jul 10 20:26:09 2014 -0400

    Modifications to testing code; passes more complicated checks
---
 main.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/main.cpp b/main.cpp
index cb47b39..780e021 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1126,7 +1126,16 @@ void computeSchurRHS(const SDP &sdp,
 void SDPSolver::computeSearchDirection() {
 
   std::fill(x.begin(), x.end(), 1);
-  X.setIdentity();
+  for (unsigned int b = 0; b < X.blocks.size(); b++) {
+    for (int c = 0; c < X.blocks[b].cols; c++) {
+      for (int r = 0; r <= c; r++) {
+        Real elt = Real(1)/(Real(1)+Real(r) + Real(c));
+        X.blocks[b].set(r, c, elt);
+        X.blocks[b].set(c, r, elt);
+      }
+    }
+  }
+  X.addIdentity(2);
   Y.setIdentity();
   mu = frobeniusProductSymmetric(X, Y)/X.dim;
 
@@ -1264,6 +1273,8 @@ void testSDPSolver(const char *file) {
 
 int main(int argc, char** argv) {
 
+  mpf_set_default_prec(100);
+  cout << "precision = " << mpf_get_default_prec() << endl;
   cout.precision(15);
 
   //testBlockCongruence();

-- 
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