Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
120 views

It is very easy to delete the last rows or columns in a boost::multi_array, for example, using the following minimal example: #include "boost/multi_array.hpp" #include <iostream> ...
TMueller83's user avatar
2 votes
2 answers
225 views

I am running a simple benchmarking exercise of 2d array access of reading and writing. I have const int XDim = 1000; and const int YDim = 1000; and create a 1000 x 1000 matrix. In C-style, I ...
Tryer's user avatar
  • 4,198
1 vote
1 answer
178 views

I receive a matrix with elements of type unsigned char from another function and I am trying to find its max value. boost::multi_array<unsigned char, 2> matrix; All elements are integers and so ...
jelc's user avatar
  • 45
1 vote
1 answer
293 views

I'm struggling to access the values and store them in boost multi_array container. I've tried to access the elements using the indexing methods ([] and .at()), but throws error: no matching function ...
Mahesh's user avatar
  • 1,146
1 vote
1 answer
341 views

Is there a reason to prefere the usage of boost::multi_array_ref over boost::multi_array&? Why is the adapter class boost::multi_array_ref provided by boost at all?
UweJ's user avatar
  • 489
1 vote
1 answer
116 views

How can I copy (deep-copy) a selcted range (view) from a boost::multi_array to another array?
UweJ's user avatar
  • 489
2 votes
1 answer
455 views

I am working on a program where I need to use 2d Boost.MultiArray. I managed to initialize it and fill it with data. But I don't understand how to take subarray of size i,j if multiarray is of size m,...
Denys Ivanenko's user avatar
1 vote
2 answers
217 views

I have a function called DataView that performs the "slicing" (creation of the array_view) as follows: template <class T> typename Boost<T>::Array2D::template array_view<2>::type ...
B.Plant's user avatar
  • 23
2 votes
1 answer
83 views

std::vector<T> foo(100) initialises every element with the default value for T. Does boost::multi_array<T, 2> foo(boost::extents[10][10]) do the same?
Timmmm's user avatar
  • 99.1k
4 votes
1 answer
103 views

I'm using a two-dimensional boost::multi_array to store objects of a custom struct. The problem is that I have a huge amount of these objects so that the index of the array I would need exceeds the ...
maria2703's user avatar
6 votes
3 answers
1k views

Say I have #include <boost/multi_array.hpp> using intArray3D = boost::multi_array<int, 3>; and I want to create a bunch of intArray3Ds with the same shape: auto my_shape = boost::...
rayhem's user avatar
  • 771
2 votes
1 answer
280 views

Suppose i need a five-dimensional array as class member and want to use it in different functions. For this puropose I use boost::multi_array e.g.: class myClass { typedef boost::multiarray<...
knallfrosch's user avatar
7 votes
1 answer
552 views

It doesn't appear that multi_array has a move constructor - is this correct? Is there a reason for this or was it just never implemented since the class seems to have been written before move ...
David Doria's user avatar
  • 10.4k
0 votes
0 answers
49 views

I m quite new to c++ but working hard. I m using the boost::multi_array library in a project but I got problem with typedef. //in main.h #include "boost/multi_array.hpp" #DEFINE D #include "...
Cocco Nat's user avatar
3 votes
2 answers
117 views

I`m writing a code for which I'm using a 3 dimensional boost multiarray to save coordinates. But I always get a segmentation fault at some point. How are boost multiarray sizes limited and how can I ...
Myrkjartan's user avatar
2 votes
1 answer
468 views

How can I reassign a boost multi_array_view to point to a different part of a multi_array? I don't want a deep copy. boost::multi_array<int, 2> a(...); array_view b = a[indices[index_range(0, 5)...
cambunctious's user avatar
  • 9,841
2 votes
1 answer
100 views

My plan is to store hundreds (or even thousands) of (interpolation) functions in the multidimensional array multi_array from the boost library. I need to store them, since I need to call them at ...
USC's user avatar
  • 47
3 votes
1 answer
119 views

I am using a boost::multi_array to store some data. I do all my work on the data using views, because I need to work with slices of the data in different dimensions. My question is, how is the memory ...
Peter A's user avatar
  • 237
3 votes
1 answer
311 views

I work on big data and program in c++. For example, I need to create 4-dimensional arrays of size [7 x 128^3 x 5 x 5] etc. I will have to create many more arrays as intermediate data structures for ...
Jackson's user avatar
  • 33
0 votes
1 answer
442 views

I am trying to extract a sub-array from a multi_array. For this demo, let's assume that there are no collapsed dimensions (i.e. the dimensionality of the sub-array is the same as the original array). ...
David Doria's user avatar
  • 10.4k
2 votes
0 answers
128 views

I am trying to store a boost::indices in a variable. From what I can gather, this produces an index_gen type. However, index_gen seems to be templated in boost::detail, but the template parameters are ...
David Doria's user avatar
  • 10.4k
4 votes
1 answer
948 views

I'm looking for clean syntactic sugar to initialize a boost::multi_array from explicit values. The best I could come up with was double g[5][5] = { {-0.0009 , 0.003799 , 0.00666 , 0.00374 ...
Mark Lakata's user avatar
  • 21.1k
3 votes
2 answers
1k views

I need to resize one multi_array to the size of another. In Blitz++ I could just do arr1.resize(arr2.shape()); Is there a multi_array solution of similar length? Because arr1.resize(boost::...
Cory's user avatar
  • 161
5 votes
2 answers
5k views

I have been surprised to find that boost::multi_array seems to allocate its initial elements differently from, say, std::vector. It does not seem to fill each element with a unique element (using its ...
Corey's user avatar
  • 1,880
2 votes
1 answer
160 views

What i need is to create a class that can hold boost::multi_array of same type but with different dimentions assume there are one or more such arrays of Double boost::multi_array<double, 2> ...
Indika Herath's user avatar