83 const T*
end(
void)
const;
170 template<
class Char,
class Traits,
class T>
171 std::basic_ostream<Char,Traits>&
201 assert((i>=0) && (i<
n));
208 assert((i>=0) && (i<
n));
260 assert(
object() == NULL);
267 assert(
object() != NULL);
268 return (*
static_cast<SAO*
>(
object()))[i];
274 assert(
object() != NULL);
275 return (*
static_cast<SAO*
>(
object()))[i];
281 if (size() != sa.
size())
283 if (
object()==sa.
object())
285 for (
int i=0; i<size(); i++) {
286 if ((*
this)[i] != sa[i])
296 for (
int i=0; i<
a.
size(); i++)
303 assert(
object() != NULL);
304 return static_cast<SAO*
>(object())->size();
310 assert(
object() != NULL);
311 return static_cast<SAO*
>(object())->begin();
317 assert(
object() != NULL);
318 return static_cast<SAO*
>(object())->begin();
324 assert(
object() != NULL);
325 return static_cast<SAO*
>(object())->end();
331 assert(
object() != NULL);
332 return static_cast<SAO*
>(object())->end();
338 assert(
object() != NULL);
345 assert(
object() != NULL);
352 assert(
object() != NULL);
359 assert(
object() != NULL);
363 template<
class Char,
class Traits,
class T>
364 std::basic_ostream<Char,Traits>&
367 std::basic_ostringstream<Char,Traits> s;
368 s.copyfmt(os); s.width(0);
372 for (
int i=1; i<
x.size(); i++)
376 return os << s.str();
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Base-class for argument arrays.
int size(void) const
Return size of array (number of elements)
void free(T *b, long unsigned int n)
Delete n objects starting at b.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from heap.
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 T * > const_reverse_iterator
Type of the iterator used to iterate backwards and read-only through this array's elements.
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.
T * pointer
Type of a pointer to the value type.
SharedArray(const SharedArray &a)
Initialize from shared array a (share elements)
const T * const_pointer
Type of a read-only pointer to the value type.
const T * const_iterator
Type of the iterator used to iterate read-only through this array's elements.
std::reverse_iterator< T * > reverse_iterator
Type of the iterator used to iterate backwards through this array's elements.
T value_type
Type of the view stored in this array.
SharedArray(void)
Construct as not yet intialized.
int size(void) const
Return number of elements.
T * iterator
Type of the iterator used to iterate through this array's elements.
const T & const_reference
Type of a constant reference to the value type.
const_reverse_iterator rbegin(void) const
Return a reverse and read-only iterator at the end of the array.
T & reference
Type of a reference to the value type.
T & operator[](int i)
Access element at position i.
void init(int n)
Initialize as array with n elements.
SharedArray & operator=(const SharedArray &)=default
Assignment operator.
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)
Post propagator for SetVar x