2.4 The class OZ_Ct

An instance of this class represents a constraint of a certain constraint system.



Initializes an instance of this class.


virtual OZ_Boolean isValue(void) = 0;

Returns OZ_True if the constraint denotes exactly one value of the domain of the constraint system.


virtual OZ_Term toValue(void) = 0;

Returns an Oz value of the value denoted by the constraint. Returned value is only defined if isValue yields OZ_True.


virtual OZ_Boolean isValid(void) = 0;

Returns OZ_True if the constraint denotes at least one element of the domain of the constraint system. Otherwise it returns OZ_False.


virtual OZ_Boolean isWeakerThan(OZ_Ct * c) = 0;

Returns OZ_True if the constraint represented by *c subsumes the constraint represented by *this instance.


virtual OZ_Ct * unify(OZ_Ct * c) = 0;

Returns a constraint that approximates all elements of the constraint domain denoted by the constraints *c and *this.


virtual OZ_Boolean unify(OZ_Term t) = 0;

Returns OZ_True if the value denoted by t is included in the values approximated by the constraint.


virtual size_t sizeOf(void) = 0;

Returns the size of an instance of the class derived OZ_Ct (analogue to C's sizeof operator).


virtual OZ_CtProfile * getProfile(void) = 0;

Returns a constraint profile (see Section 2.3) according to the constraint.


virtual OZ_CtWakeUp getWakeUpDescriptor(OZ_CtProfile * p) = 0;

Returns a descriptor for the wake-up lists to be scanned (see Section 2.2). This descriptor is computed by comparing the constraint with the profile p. Note the profile is usually taken from the constraint before modifying it.


virtual char * toString(int) = 0;

Returns a textual representation of the constraint.


virtual OZ_Ct * copy(void) = 0;

Returns a pointer to a copy of the constraint. The memory for the copy is to be allocated by the operator OZ_Ct::new.

operator new

static void * operator new(size_tint align = sizeof(void 

Allocates memory for an instance of the constraint on the heap of the Oz runtime system.

operator delete

static void operator delete(void *, size_t);

Deallocates memory of an instance of the constraint from the heap of the Oz runtime system.

Tobias Müller
Version 1.4.0 (20080702)