2.4 The class OZ_Ct

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

OZ_Ct

OZ_Ct(void);

Initializes an instance of this class.

isValue()

virtual OZ_Boolean isValue(void) = 0;

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

toValue

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.

isValid

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.

isWeakerThan

virtual OZ_Boolean isWeakerThan(OZ_Ct * c) = 0;

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

unify

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.

unify

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.

sizeOf

virtual size_t sizeOf(void) = 0;

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

getProfile

virtual OZ_CtProfile * getProfile(void) = 0;

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

getWakeUpDescriptor

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.

toString

virtual char * toString(int) = 0;

Returns a textual representation of the constraint.

copy

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)