Estimation DLL, matrix library: minor fixes for removing compiler warnings

time-shift
Sébastien Villemot 2010-03-08 13:49:47 +01:00
parent a78ca35807
commit 2aab5b47f2
2 changed files with 4 additions and 4 deletions

View File

@ -519,7 +519,7 @@ namespace mat
reorderColumnsByVectors(Mat1 &a, const std::vector<size_t> &vToCols,
const Mat2 &b, const std::vector<size_t> &vcols)
{
size_t nrows = a.getRows(), ncols = 0, toncols = 0;
size_t ncols = 0, toncols = 0;
const std::vector<size_t> *vpToCols = 0, *vpCols = 0;
std::vector<size_t> tmpvpToCols(0), tmpvpCols(0);
assert(b.getRows() == a.getRows());
@ -579,7 +579,7 @@ namespace mat
reorderRowsByVectors(Mat1 &a, const std::vector<size_t> &vToRows,
const Mat2 &b, const std::vector<size_t> &vrows)
{
size_t nrows = 0, tonrows = 0, ncols = a.getCols();
size_t nrows = 0, tonrows = 0;
const std::vector<size_t> *vpToRows = 0, *vpRows = 0;
std::vector<size_t> tmpvpToRows(0), tmpvpRows(0);

View File

@ -34,10 +34,10 @@ main(int argc, char **argv)
Matrix S1(m, 2 *n), S2(2*m, n);
std::vector<size_t> toC(n), toR(m);
for (int i = 0; i < n; i++)
for (size_t i = 0; i < n; i++)
toC[i] = 2*i;
for (int j = 0; j < m; j++)
for (size_t j = 0; j < m; j++)
toR[j] = m-j-1;
mat::assignByVectors(S1, mat::nullVec, toC, S, mat::nullVec, mat::nullVec);