Boost logo

Boost Users :

Subject: Re: [Boost-users] iterators and value_type in multi_array
From: Alfredo Correa (alfredo.correa_at_[hidden])
Date: 2009-08-15 02:04:24


> On Fri, Aug 14, 2009 at 11:39 AM, HweeKuan Lee <hweek..._at_[hidden]> wrote:
>   for(iterator it=mat.begin();it!=mat.end();++it)
>   {
>     for(int i=0;i!=3;++i)
>       (*it)[i] = v;
>   }

yes, or just

for(double* it=mat.origin(), end=mat.origin()+mat.num_elements(); it!
=end; ++it){
  (*it)=v;
}

if you are not interested in the structure of the array.
Alfredo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net