Generated on Mon Aug 25 15:13:25 2008 for Gecode/J by doxygen 1.5.4

org.gecode.Space Class Reference
[Setting up scripts]

Inherits org.gecode.JavaSpace.

Inherited by examples.MagicSquare, examples.Money, examples.Photo, examples.Queens, examples.QueensJavaPropagator, examples.Steiner, and org.gecode.DummySpace.

List of all members.


Detailed Description

Base class for Spaces.

This class represents and manages spaces in Gecode/J.

Definition at line 53 of file Space.java.


Public Member Functions

 Space (String name)
 Initialize with a name.
void constrain (Space s)
 This method is to be overridden if optimizing search is to be used.
final void constrain_internal (JavaSpace s)
 Relate this to homeSpace for optimizing search.
Space cloneSpace ()
 Clone space.
final BranchingDesc description ()
 Get branching description for current branching.
String getName ()
void setName (String name)
String toString ()
 Return String representation of the Space.

Protected Member Functions

 Space (long cPtr, boolean cMemoryOwn, boolean releaseOwnership)
 Space (Boolean share, Space s)
Space copy (boolean share)
 Calls the copy-constructor of the current class.
final JavaSpace copy_internal (boolean share)
 Copy space.

Constructor & Destructor Documentation

org.gecode.Space.Space ( String  name  ) 

Initialize with a name.

Definition at line 57 of file Space.java.

org.gecode.Space.Space ( long  cPtr,
boolean  cMemoryOwn,
boolean  releaseOwnership 
) [protected]

Definition at line 61 of file Space.java.

org.gecode.Space.Space ( Boolean  share,
Space  s 
) [protected]

Definition at line 66 of file Space.java.


Member Function Documentation

Space org.gecode.Space.copy ( boolean  share  )  [protected]

Calls the copy-constructor of the current class.

Can be overridden for nested classes, but should not be called directly. For creating clones of spaces, use cloneSpace instead.

Reimplemented in org.gecode.DummySpace.

Definition at line 76 of file Space.java.

final JavaSpace org.gecode.Space.copy_internal ( boolean  share  )  [protected]

Copy space.

Must create a new object using the constructor for cloning.

Reimplemented from org.gecode.JavaSpace.

Definition at line 107 of file Space.java.

void org.gecode.Space.constrain ( Space  s  ) 

This method is to be overridden if optimizing search is to be used.

Reimplemented in examples.Photo.

Definition at line 123 of file Space.java.

final void org.gecode.Space.constrain_internal ( JavaSpace  homeSpace  ) 

Relate this to homeSpace for optimizing search.

Reimplemented from org.gecode.JavaSpace.

Definition at line 124 of file Space.java.

Space org.gecode.Space.cloneSpace (  ) 

Clone space.

Propagates the space until fixpoint. If propagation results in a failed space, an exception of type SpaceFailed is thrown.

Otherwise, a clone of the space is returned. If shared is true, sharable datastructures are shared among the clone and the original space. If shared is false, independent copies of the shared datastructures must be created. This means that a clone with no sharing can be used in a different thread without any interaction with the original space.

Reimplemented from org.gecode.JavaSpace.

Definition at line 136 of file Space.java.

String org.gecode.Space.getName (  ) 

Definition at line 160 of file Space.java.

void org.gecode.Space.setName ( String  name  ) 

Definition at line 161 of file Space.java.

String org.gecode.Space.toString (  ) 

Return String representation of the Space.

The output produced starts with the name of the current class, followed by a list of all the public fields of this class of type IntVar, BoolVar, SetVar, and VarArray. The fields are printed using their corresponding toString methods.

Reimplemented in examples.MagicSquare, examples.Queens, and examples.QueensJavaPropagator.

Definition at line 210 of file Space.java.


The documentation for this class was generated from the following file: