aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/bandmatrix.cpp
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 18:59:15 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 18:59:15 +0200
commitcb11f2f8a644acbf9a408e8eef737bec122307a0 (patch)
treefebc2e53cf4ca10309ef0901eadcbd9625f31b32 /test/bandmatrix.cpp
parentf1679c7185471289afaf702a45e336849d20a81a (diff)
Fix compilation of some tests as well as more warnings.
Diffstat (limited to 'test/bandmatrix.cpp')
-rw-r--r--test/bandmatrix.cpp12
1 files changed, 6 insertions, 6 deletions
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<typename MatrixType> void bandmatrix(const MatrixType& _m)
dm1.col(i).setConstant(static_cast<RealScalar>(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<Index>(0,cols-d-supers);
+ Index b = std::max<Index>(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<Upper>().setZero();
dm1.block(subs+1,0,rows-subs-1-b,rows-subs-1-b).template triangularView<Lower>().setZero();
@@ -78,10 +78,10 @@ void test_bandmatrix()
typedef BandMatrix<float>::Index Index;
for(int i = 0; i < 10*g_repeat ; i++) {
- Index rows = ei_random<int(1,10);
- Index cols = ei_random<int>(1,10);
- Index sups = ei_random<int>(0,cols-1);
- Index subs = ei_random<int>(0,rows-1);
+ Index rows = ei_random<Index>(1,10);
+ Index cols = ei_random<Index>(1,10);
+ Index sups = ei_random<Index>(0,cols-1);
+ Index subs = ei_random<Index>(0,rows-1);
CALL_SUBTEST(bandmatrix(BandMatrix<float>(rows,cols,sups,subs)) );
}
}