fix broken unit test and Matrix.cpp
parent
f456f3d014
commit
e9a2158f5b
|
|
@ -678,8 +678,8 @@ void householder(Matrix &A, size_t k) {
|
||||||
#ifdef GT_USE_LAPACK
|
#ifdef GT_USE_LAPACK
|
||||||
#ifdef YA_BLAS
|
#ifdef YA_BLAS
|
||||||
void householder(Matrix &A) {
|
void householder(Matrix &A) {
|
||||||
int m = A.size1();
|
__CLPK_integer m = A.size1();
|
||||||
int n = A.size2();
|
__CLPK_integer n = A.size2();
|
||||||
|
|
||||||
// convert from row major to column major
|
// convert from row major to column major
|
||||||
double a[m*n]; int k = 0;
|
double a[m*n]; int k = 0;
|
||||||
|
|
@ -689,8 +689,8 @@ void householder(Matrix &A) {
|
||||||
|
|
||||||
double tau[n];
|
double tau[n];
|
||||||
double work_optimal_size;
|
double work_optimal_size;
|
||||||
int lwork = -1;
|
__CLPK_integer lwork = -1;
|
||||||
int info;
|
__CLPK_integer info;
|
||||||
|
|
||||||
dgeqrf_(&m, &n, a, &m, tau, &work_optimal_size, &lwork, &info);
|
dgeqrf_(&m, &n, a, &m, tau, &work_optimal_size, &lwork, &info);
|
||||||
lwork = (int)work_optimal_size;
|
lwork = (int)work_optimal_size;
|
||||||
|
|
@ -701,7 +701,7 @@ void householder(Matrix &A) {
|
||||||
memset(A.data().begin(), 0, m*n*sizeof(double));
|
memset(A.data().begin(), 0, m*n*sizeof(double));
|
||||||
for(int j=0; j<n; j++, k0+=m) {
|
for(int j=0; j<n; j++, k0+=m) {
|
||||||
k = k0;
|
k = k0;
|
||||||
j0 = min(j+1,m);
|
j0 = j+1>m?j+1:m;
|
||||||
for(int i=0; i<j0; i++, k++)
|
for(int i=0; i<j0; i++, k++)
|
||||||
A(i,j) = a[k];
|
A(i,j) = a[k];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -768,7 +768,7 @@ TEST ( GaussianFactor, exploding_MAST_factor ) {
|
||||||
// Works properly with the newer elimination code
|
// Works properly with the newer elimination code
|
||||||
// This is only a test of execution without crashing
|
// This is only a test of execution without crashing
|
||||||
|
|
||||||
Symbol lA2('l', 18295873486192642);
|
Symbol lA2('l', 182958734);
|
||||||
Matrix A1 = eye(2);
|
Matrix A1 = eye(2);
|
||||||
Vector b1 = zero(2);
|
Vector b1 = zero(2);
|
||||||
SharedDiagonal model1 = noiseModel::Isotropic::Sigma(2, 1.0/sqrt(2.0));
|
SharedDiagonal model1 = noiseModel::Isotropic::Sigma(2, 1.0/sqrt(2.0));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue