[sdpb] 84/233: Fixed bug in sampleBilinearBasis
Tobias Hansen
thansen at moszumanska.debian.org
Thu Mar 9 04:06:22 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 2ca94367dc0b49431d5161eaa57ef33b13c20453
Author: David Simmons-Duffin <dsd at athena.sns.ias.edu>
Date: Sun Sep 28 20:47:52 2014 -0400
Fixed bug in sampleBilinearBasis
---
src/SDP.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/SDP.cpp b/src/SDP.cpp
index 4eb3174..546f205 100644
--- a/src/SDP.cpp
+++ b/src/SDP.cpp
@@ -1,15 +1,15 @@
#include "SDP.h"
-Matrix sampleBilinearBasis(const int basisSize,
+Matrix sampleBilinearBasis(const int maxDegree,
const int numSamples,
const vector<Polynomial> &bilinearBasis,
const vector<Real> &samplePoints,
const vector<Real> &sampleScalings) {
- Matrix b(basisSize, numSamples);
+ Matrix b(maxDegree + 1, numSamples);
for (int k = 0; k < numSamples; k++) {
Real x = samplePoints[k];
Real scale = sqrt(sampleScalings[k]);
- for (int i = 0; i < basisSize; i++)
+ for (int i = 0; i <= maxDegree; i++)
b.elt(i, k) = scale*bilinearBasis[i](x);
}
return b;
--
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