2

Is there a data type called Matrix in C++?

If Yes, which header file should be included for using it?

user519986
  • 193
  • 1
  • 4
  • 11

3 Answers3

3

The Boost Matrix Library provides this. For higher numbers of dimensions, the Boost Multidimensional Array Library is also available.

Full examples are available on the documentation pages.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • Boost matrix uses dynamic allocations, if yorue looking for at fast matrix implementation of static size, take a look at something like http://www.geometrictools.com/LibMathematics/Algebra/Wm5Matrix4.inl – Viktor Sehr Apr 14 '11 at 09:38
2

Eigen is another option.

jonsca
  • 10,218
  • 26
  • 54
  • 62
0

Armadillo is also a good option. Very easy to use: its syntax is similar to Matlab.

mtall
  • 3,574
  • 15
  • 23