[sdpb] 110/233: Removed test files
Tobias Hansen
thansen at moszumanska.debian.org
Thu Mar 9 04:06:26 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 66bd450cdf580f7883b21b909643269ddc36ad10
Author: David Simmons-Duffin <dsd at minerva.sns.ias.edu>
Date: Tue Nov 18 19:36:05 2014 -0500
Removed test files
---
src/main.cpp | 1 -
src/tests.cpp | 91 -----------------------------------------------------------
src/tests.h | 14 ---------
3 files changed, 106 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index 74cc365..2349a69 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,7 +20,6 @@
#include "Timers.h"
#include "SDP.h"
#include "parse.h"
-#include "tests.h"
#include "SDPSolver.h"
using std::cout;
diff --git a/src/tests.cpp b/src/tests.cpp
deleted file mode 100644
index e0f8a65..0000000
--- a/src/tests.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//=======================================================================
-// Copyright 2014 David Simmons-Duffin.
-// Distributed under the MIT License.
-// (See accompanying file LICENSE or copy at
-// http://opensource.org/licenses/MIT)
-//=======================================================================
-
-
-#include <vector>
-#include <iostream>
-#include "types.h"
-#include "Vector.h"
-#include "Matrix.h"
-#include "BlockDiagonalMatrix.h"
-
-using std::vector;
-using std::cout;
-using std::endl;
-
-void testCholeskyStabilize() {
- cout.precision(20);
- Matrix A(4,4);
- Matrix L(A);
- A.elt(0,0) = 1e20;
- A.elt(1,1) = 2e18;
- A.elt(2,2) = 1e-3;
- A.elt(3,3) = 1e-5;
- A.elt(1,0) = 1e2;
- A.elt(0,1) = 1e2;
- A.elt(1,2) = 2e2;
- A.elt(2,1) = 2e2;
- vector<int> updateIndices;
- Vector updateVector(L.rows);
- Real lambdaGM;
- choleskyDecomposition(A,L);
- cout << "A = " << A << ";\n";
- cout << "L = " << L << ";\n";
-
- vector<Integer> stabilizeIndices;
- vector<Real> stabilizeLambdas;
- double stabilizeThreshold = 1e-10;
- choleskyDecompositionStabilized(A, L, stabilizeIndices, stabilizeLambdas, stabilizeThreshold);
- cout << "A = " << A << ";\n";
- cout << "L = " << L << ";\n";
- cout << "stabilizeIndices = " << stabilizeIndices << ";\n";
- cout << "stabilizeLambdas = " << stabilizeLambdas << ";\n";
-}
-
-void testCholeskyUpdate() {
- Matrix A(4,4);
- Matrix B(A);
- Matrix C(A);
- Matrix L(A);
- Matrix LT(L);
- Matrix V(4, 2);
- Matrix VT(V.cols, V.rows);
- V.elt(0,0) =1;
- V.elt(1,0) =2;
- V.elt(2,0) =3;
- V.elt(3,0) =4;
- V.elt(0,1) =5;
- V.elt(1,1) =4;
- V.elt(2,1) =3;
- V.elt(3,1) =2;
- for (int r = 0; r < V.rows; r++)
- for (int c = 0; c < V.cols; c++)
- VT.elt(c, r) = V.elt(r,c);
- Matrix U(V);
-
- A.addDiagonal(4);
- cout << "A = " << A << endl;
- cout << "V = " << V << endl;
- choleskyDecomposition(A, L);
- transpose(L, LT);
-
- matrixMultiply(V, VT, B);
- B += A;
- matrixMultiply(L, LT, C);
- C -= B;
-
- cout << "L L^T - (A + V V^T) = " << C << endl;
-}
-
-void testMatrix() {
- Matrix A(3,3);
- A.elt(0,0) = 1;
- A.elt(1,0) = 2;
- A.elt(2,0) = 3;
- A.symmetrize();
- cout << A << endl;
-}
diff --git a/src/tests.h b/src/tests.h
deleted file mode 100644
index dd585ce..0000000
--- a/src/tests.h
+++ /dev/null
@@ -1,14 +0,0 @@
-//=======================================================================
-// Copyright 2014 David Simmons-Duffin.
-// Distributed under the MIT License.
-// (See accompanying file LICENSE or copy at
-// http://opensource.org/licenses/MIT)
-//=======================================================================
-
-
-#ifndef SDPB_TESTS_H_
-#define SDPB_TESTS_H_
-
-void testCholeskyStabilize();
-
-#endif // SDPB_TESTS_H_
--
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