org.gecode.ViewArray< View extends GecodeView > Class Reference
[Setting up scripts, Integer variables, Set variables]
List of all members.Detailed Description
Array of views.This clas manages a collection of views and presents them as an array. The class has many different constructors for automatically instantiating the vies. The following list shows the different kinds:
- ViewArray(int): The argument is only used as a hint on how many views will be added later (same as for the constructor with the same signature in ArrayList). No new views are created.
- ViewArray(some views): Construct an array out of the supplied views. No new views are created.
- ViewArray(Space, int, Class, ...): Construct some specified number of views. The different additional arguments allows for supplying the arguments to the constructor.
- ViewArray(Space, Class, ...): Construct some number of views. The additional arguments are of array-type, and their length will determine the number of new varaibles created. Given an array
a,new views will be created where variablea.length
iwill be initialized withas an argument.a[i]
The class is parametrised on the type of views used.
Definition at line 55 of file ViewArray.java.
Public Member Functions | |
| ViewArray () | |
| Construct empty array. | |
| ViewArray (int size) | |
| Construct empty array with inital capacity. | |
| void | cancel (Space home, JavaPropagator p, PropCond pc) |
| Cancel p's subscription to the events covered by pc on the elements of this array. | |
| void | subscribe (JavaSpace home, JavaPropagator p, PropCond pc) |
| Subscribe p to the events covered by pc on the elements of this array. | |
| boolean | assigned () |
| Test wheter all views in this array are assigned. | |
| void | swap (int a, int b) |
| Swap positions a and b. | |
Package Functions | |
| SuppressWarnings ("unchecked") public< C extends Iterable< View >> ViewArray(JavaSpace home | |
| Create copies of the elements of va in newHome and add them into this array. | |
| B | ViewArray (JavaSpace home, Class<?extends View > type, A[] as, B[] bs) |
Package Attributes | |
| boolean | share |
Constructor & Destructor Documentation
| org.gecode.ViewArray< View extends GecodeView >.ViewArray | ( | ) |
| org.gecode.ViewArray< View extends GecodeView >.ViewArray | ( | int | size | ) |
| B org.gecode.ViewArray< View extends GecodeView >.ViewArray | ( | JavaSpace | home, | |
| Class<?extends View > | type, | |||
| A[] | as, | |||
| B[] | bs | |||
| ) | [package] |
Definition at line 237 of file ViewArray.java.
Member Function Documentation
| org.gecode.ViewArray< View extends GecodeView >.SuppressWarnings | ( | "unchecked" | ) | [package] |
Create copies of the elements of va in newHome and add them into this array.
| void org.gecode.ViewArray< View extends GecodeView >.cancel | ( | Space | home, | |
| JavaPropagator | p, | |||
| PropCond | pc | |||
| ) |
Cancel p's subscription to the events covered by pc on the elements of this array.
Definition at line 264 of file ViewArray.java.
| void org.gecode.ViewArray< View extends GecodeView >.subscribe | ( | JavaSpace | home, | |
| JavaPropagator | p, | |||
| PropCond | pc | |||
| ) |
Subscribe p to the events covered by pc on the elements of this array.
Definition at line 272 of file ViewArray.java.
| boolean org.gecode.ViewArray< View extends GecodeView >.assigned | ( | ) |
| void org.gecode.ViewArray< View extends GecodeView >.swap | ( | int | a, | |
| int | b | |||
| ) |
Member Data Documentation
boolean org.gecode.ViewArray< View extends GecodeView >.share [package] |
Definition at line 72 of file ViewArray.java.
The documentation for this class was generated from the following file:
- org/gecode/ViewArray.java (Revision: 3796)
