3 #ifndef DUNE_VBVECTOR_HH
4 #define DUNE_VBVECTOR_HH
35 template<
class B,
class A=std::allocator<B> >
93 block = windowAllocator_.allocate(nblocks);
116 this->
n = _nblocks*m;
119 this->
p = allocator_.allocate(this->
n);
120 new (this->
p) B[this->
n];
133 block = windowAllocator_.allocate(nblocks);
138 block[i].
set(m,this->
p+(i*m));
158 this->
p = allocator_.allocate(this->
n);
159 new (this->
p) B[this->
n];
175 block = windowAllocator_.allocate(nblocks);
200 allocator_.deallocate(this->
p,this->
n);
205 block[--i].~window_type();
206 windowAllocator_.deallocate(block,nblocks);
220 allocator_.deallocate(this->
p,this->
n);
225 block[--i].~window_type();
226 windowAllocator_.deallocate(block,nblocks);
235 block = windowAllocator_.allocate(nblocks);
256 allocator_.deallocate(this->
p,this->
n);
261 block[--i].~window_type();
262 windowAllocator_.deallocate(block,nblocks);
266 this->
n = _nblocks*m;
269 this->
p = allocator_.allocate(this->
n);
270 new (this->
p) B[this->
n];
283 block = windowAllocator_.allocate(nblocks);
288 block[i].
set(m,this->
p+(i*m));
307 if (this->
n!=a.
n || nblocks!=a.nblocks)
314 allocator_.deallocate(this->
p,this->
n);
319 block[--i].~window_type();
320 windowAllocator_.deallocate(block,nblocks);
328 this->
p = allocator_.allocate(this->
n);
329 new (this->
p) B[this->
n];
342 block = windowAllocator_.allocate(nblocks);
421 v.
p = v.allocator_.allocate(n);
439 v.initialized =
true;
450 return (i!=it.i) || (&v!=&it.v);
456 return (i==it.i) && (&v==&it.v);
484 #ifdef DUNE_ISTL_WITH_CHECKING
485 if (initialized) DUNE_THROW(
ISTLError,
"no CreateIterator in initialized state");
504 #ifdef DUNE_ISTL_WITH_CHECKING
505 if (i>=nblocks) DUNE_THROW(
ISTLError,
"index out of range");
513 #ifdef DUNE_ISTL_WITH_CHECKING
514 if (i<0 || i>=nblocks) DUNE_THROW(
ISTLError,
"index out of range");
554 return (p+i)==(it.p+it.i);
560 return (p+i)!=(it.p+it.i);
566 return (p+i)==(it.p+it.i);
572 return (p+i)!=(it.p+it.i);
629 if (i>=0 && i<nblocks)
638 if (i>=0 && i<nblocks)
680 return (p+i)==(it.p+it.i);
686 return (p+i)!=(it.p+it.i);
692 return (p+i)==(it.p+it.i);
698 return (p+i)!=(it.p+it.i);
768 typename A::template rebind<window_type>::other windowAllocator_;