~ubuntu-branches/ubuntu/saucy/gfan/saucy-proposed

« back to all changes in this revision

Viewing changes to matrix.cpp

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier
  • Date: 2013-07-09 10:44:01 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130709104401-5q66ozz5j5af0dak
Tags: 0.5+dfsg-3
* Upload to unstable.
* modify remove_failing_tests_on_32bits.patch to replace command of
  0009RenderStairCase test with an empty one instead of deleting it.
* remove lintian override about spelling error

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
  return ret;
47
47
}
 
48
 
 
49
 
 
50
IntegerVector flattenMatrix(IntegerMatrix const &m)
 
51
{
 
52
  IntegerVector ret(m.getHeight()*m.getWidth());
 
53
 
 
54
  for(int i=0;i<m.getHeight();i++)
 
55
    for(int j=0;j<m.getWidth();j++)
 
56
      ret[i*m.getWidth()+j]=m[i][j];
 
57
 
 
58
  return ret;
 
59
}
 
60
 
 
61
 
 
62
#include "linalg.h"
 
63
 
 
64
int rank(IntegerMatrix const &m)
 
65
{
 
66
  return integerMatrixToFieldMatrix(m,Q).rank();
 
67
}