From cb11f2f8a644acbf9a408e8eef737bec122307a0 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Sun, 20 Jun 2010 18:59:15 +0200 Subject: Fix compilation of some tests as well as more warnings. --- test/bandmatrix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/bandmatrix.cpp') diff --git a/test/bandmatrix.cpp b/test/bandmatrix.cpp index 2745e527b..49faa870d 100644 --- a/test/bandmatrix.cpp +++ b/test/bandmatrix.cpp @@ -62,8 +62,8 @@ template void bandmatrix(const MatrixType& _m) dm1.col(i).setConstant(static_cast(i+1)); } Index d = std::min(rows,cols); - Index a = std::max(0,cols-d-supers); - Index b = std::max(0,rows-d-subs); + Index a = std::max(0,cols-d-supers); + Index b = std::max(0,rows-d-subs); if(a>0) dm1.block(0,d+supers,rows,a).setZero(); dm1.block(0,supers+1,cols-supers-1-a,cols-supers-1-a).template triangularView().setZero(); dm1.block(subs+1,0,rows-subs-1-b,rows-subs-1-b).template triangularView().setZero(); @@ -78,10 +78,10 @@ void test_bandmatrix() typedef BandMatrix::Index Index; for(int i = 0; i < 10*g_repeat ; i++) { - Index rows = ei_random(1,10); - Index sups = ei_random(0,cols-1); - Index subs = ei_random(0,rows-1); + Index rows = ei_random(1,10); + Index cols = ei_random(1,10); + Index sups = ei_random(0,cols-1); + Index subs = ei_random(0,rows-1); CALL_SUBTEST(bandmatrix(BandMatrix(rows,cols,sups,subs)) ); } } -- cgit v1.2.3