.. highlight:: c Compatibility with STL and iterators, Interaction with STL ################################################################## The arrays are compatible with STL containers and algorithms. Iterators ================ Standard iterators are provided that model the boost Mutable_ForwardIterator and ForwardIterator concepts (and hence are STL compliant). The iterator implements also two additionnal methods : * it can be casted to a bool : it is true iif the iteration is not at end. * it.indices() : returns const & to the indices at the point of the iteration. Examples:: array A (2,3); for (auto it = A.begin(); it; ++it) *it =it.indices()[0] + 10 *it.indices()[1] ; //for (array::iterator it = A.begin(); it; ++it) *it =it.indices()[0] + 10 *it.indices()[1] ; Indices generators ================================ The domain have an index generator that enumerates the indices in the domain. Examples:: array A (2,3); for (auto it = A.indexmap().domain().begin(); it; ++it) cout<<" "<<*it<::indexmap_type::domain_type, Permutations::permutation<0,1> > it_type; for (it_type it(A.indexmap().domain()); it; ++it) cout<<" "<<*it<()); it; ++it) cout<<" "<<*it< A (2,3); std::vector > VV; VV.push_back(A); * ... or a map :: std::map > MAP; MAP["1"] = A; * We can put a std::vector in an array ... :: std::vector V (10); array B(V.size()), C(V.size()); std::copy(V.begin(),V.end(),B.begin()); * ... or in reverse :: std::copy(B.begin(),B.end(),V.begin()); * ... or use other algorithms of std:: bool te(int x) { return (x<25);} //.... cout<<" max(B) "<< *std::max_element(B.begin(),B.end())<