Questions tagged [boost-multi-array]

Boost.MultiArray is a C++ library that provides a class template for multidimensional arrays, as well as semantically equivalent adaptors for arrays of contiguous data.

Boost.MultiArray is a C++ library that provides a class template for multidimensional arrays, as well as semantically equivalent adaptors for arrays of contiguous data. The classes in this library implement a common interface, formalized as a generic programming concept. The interface design is in line with the precedent set by the C++ Standard Library containers. Boost MultiArray is a more efficient and convenient way to express N-dimensional arrays than existing alternatives (especially the std::vector<std::vector<...> > formulation of N-dimensional arrays). The arrays provided by the library may be accessed using the familiar syntax of native C++ arrays. Additional features, such as resizing, reshaping, and creating views are available.

108 questions
0
votes
3 answers

Initialize public attributes with argument from class constructor in c++

I have a class implemented in a .cpp file as follow : #include #include // les 3 lib boost/random nécessaire a généré les radiuses #include "boost/random/mersenne_twister.hpp" #include…
Félix Cantournet
  • 1,941
  • 13
  • 17
0
votes
2 answers

Compile error on boost::multi_array builder

It is said that we'd better use a multi_array builder if we want to use the multi_array more efficiently. However, I'm so new to both template and boost, I tried to copy some code from a book. It looks like this: class multi_builder :…
user957121
  • 2,946
  • 4
  • 24
  • 36
0
votes
1 answer

Selecting a NxM sub matrix from boost::MultiArray by variable

I have multiple NxM matrices and want to select one of them by a variable. My best guess was to use boost::MultiArray to create a NxMxP matrix an then select via third dimension. I implemented it using array_view: typedef boost::multi_array
1 2 3 4 5 6 7
8