Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Chapter 27. Boost.MultiArray Reference Manual
PrevUpHomeNext

Chapter 27. Boost.MultiArray Reference Manual

Ronald Garcia

Indiana University
Open Systems Lab

Boost.MultiArray is composed of several components. The MultiArray concept defines a generic interface to multidimensional containers. multi_array is a general purpose container class that models MultiArray. multi_array_ref and const_multi_array_ref are adapter classes. Using them, you can manipulate any block of contiguous data as though it were a multi_array. const_multi_array_ref differs from multi_array_ref in that its elements cannot be modified through its interface. Finally, several auxiliary classes are used to create and specialize arrays and some global objects are defined as part of the library interface.

Library Synopsis

To use Boost.MultiArray, you must include the header boost/multi_array.hpp in your source. This file brings the following declarations into scope:

namespace boost {
  
  namespace multi_array_types {
    typedef *unspecified* index;
    typedef *unspecified* size_type;
    typedef *unspecified* difference_type;
    typedef *unspecified* index_range;
    typedef *unspecified* extent_range;
    typedef *unspecified* index_gen;
    typedef *unspecified* extent_gen;
  }

  template  >
  class multi_array;

  template 
  class multi_array_ref;

  template  
  class const_multi_array_ref;

  multi_array_types::extent_gen extents;
  multi_array_types::index_gen  indices;

  template  class subarray_gen;
  template  class const_subarray_gen;
  template  class array_view_gen;
  template  class const_array_view_gen;

  class c_storage_order; 
  class fortran_storage_order;
  template  class general_storage_order;

}

PrevUpHomeNext