79 const T*
begin(
void)
const;
83 const T*
end(
void)
const;
167 template<
class Char,
class Traits,
class T>
168 std::basic_ostream<Char,Traits>&
185 a = (n>0) ?
heap.alloc<T>(n) : NULL;
198 assert((i>=0) && (i<n));
205 assert((i>=0) && (i<n));
257 assert(
object() == NULL);
264 assert(
object() != NULL);
265 return (*
static_cast<SAO*
>(
object()))[i];
271 assert(
object() != NULL);
272 return (*
static_cast<SAO*
>(
object()))[i];
280 if (
object()==sa.
object())
282 for (
int i=0; i<
size(); i++) {
283 if ((*
this)[i] != sa[i])
293 for (
int i=0; i<a.
size(); i++)
300 assert(
object() != NULL);
307 assert(
object() != NULL);
314 assert(
object() != NULL);
321 assert(
object() != NULL);
328 assert(
object() != NULL);
335 assert(
object() != NULL);
342 assert(
object() != NULL);
349 assert(
object() != NULL);
356 assert(
object() != NULL);
360 template<
class Char,
class Traits,
class T>
361 std::basic_ostream<Char,Traits>&
364 std::basic_ostringstream<Char,Traits> s;
365 s.copyfmt(os); s.width(0);
369 for (
int i=1; i<x.
size(); i++)
373 return os << s.str();
Base-class for argument arrays.
int size(void) const
Return size of array (number of elements).
FloatNum size(void) const
Return size of float value (distance between maximum and minimum).
Implementation of object for shared arrays.
T * end(void)
Return end of array (for iterators).
T * begin(void)
Return beginning of array (for iterators).
SAO(int n)
Allocate for n elements.
int size(void) const
Return number of elements.
T & operator[](int i)
Access element at position i.
virtual ~SAO(void)
Delete object.
Shared array with arbitrary number of elements.
const_iterator begin(void) const
Return a read-only iterator at the beginning of the array.
const_reverse_iterator rend(void) const
Return a reverse and read-only iterator past the beginning of the array.
std::reverse_iterator< const int * > const_reverse_iterator
reverse_iterator rend(void)
Return a reverse iterator past the beginning of the array.
const_iterator end(void) const
Return a read-only iterator past the end of the array.
bool operator==(const SharedArray< T > &sa) const
Test equality with sa.
SharedArray(const ArgArrayBase< T > &a)
Initialize from argument array a.
SharedArray(int n)
Initialize as array with n elements.
reverse_iterator rbegin(void)
Return a reverse iterator at the end of the array.
iterator begin(void)
Return an iterator at the beginning of the array.
iterator end(void)
Return an iterator past the end of the array.
SharedArray(const SharedArray &a)
Initialize from shared array a (share elements).
const int * const_pointer
const int * const_iterator
std::reverse_iterator< int * > reverse_iterator
SharedArray(void)
Construct as not yet intialized.
int size(void) const
Return number of elements.
const int & const_reference
const_reverse_iterator rbegin(void) const
Return a reverse and read-only iterator at the end of the array.
T & operator[](int i)
Access element at position i.
void init(int n)
Initialize as array with n elements.
SharedHandle(void)
Create shared handle with no object pointing to.
SharedHandle::Object * object(void) const
Access to the shared object.
Heap heap
The single global heap.
Gecode toplevel namespace
Archive & operator<<(Archive &e, FloatNumBranch nl)