Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

mlsub.typing.lowlevel
Class DomainVector  view DomainVector download DomainVector.java

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended bymlsub.typing.lowlevel.DomainVector
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.lang.Iterable, java.util.List, java.util.RandomAccess, java.io.Serializable

final class DomainVector
extends java.util.Vector

A DomainVector maintains an upper approximation of the set of solutions of a constraint. What is handled dynamically : constraints between rigid and soft variables. Constraints between soft variables are handled in gfp(). RMK: only garbage indexes can have null domains

Version:
$OrigRevision: 1.9 $, $OrigDate: 1999/10/03 17:37:05 $

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
(package private)  int offset
           
(package private)  int width
           
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DomainVector(int offset, int width)
           
DomainVector(int offset, int width, int n)
           
 
Method Summary
 int chooseDomain()
          Choose a non-null, non-singleton, domain and return its index.
 int chooseDomain(BitVector set)
          ditto but choose a domain whose index i is in set
 void clear(int x)
           
 java.lang.Object clone()
          Creates a new Vector with the same contents as this one.
 java.lang.String dump()
           
 void exclude(int value)
           
 void exclude(int x, BitVector domain)
           
 void extend()
           
 Domain getDomain(int x)
           
 void gfp(BitMatrix R, BitMatrix Rt, BitMatrix C, BitMatrix Ct, int[] strategy)
          Reduce this domain vector to the greatest fixed-point of a constraint.
private  boolean gfpSweep(BitMatrix R, BitMatrix C, int[] strategy, int dS, int direction)
          Fix-point computations
(package private)  void initGfpCardinals()
           
private  boolean isGarbage(int x)
           
private  boolean isValidSoft(int x)
           
 void merge(int src, int dest)
           
 void move(int src, int dest)
           
 void reduce(int x, boolean unit, BitVector domain)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.util.AbstractCollection
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

offset

int offset

width

int width
Constructor Detail

DomainVector

public DomainVector(int offset,
                    int width)

DomainVector

public DomainVector(int offset,
                    int width,
                    int n)
Method Detail

getDomain

public Domain getDomain(int x)

isValidSoft

private boolean isValidSoft(int x)

isGarbage

private boolean isGarbage(int x)

clear

public void clear(int x)

reduce

public void reduce(int x,
                   boolean unit,
                   BitVector domain)
            throws LowlevelUnsatisfiable

exclude

public void exclude(int x,
                    BitVector domain)
             throws LowlevelUnsatisfiable

merge

public void merge(int src,
                  int dest)
           throws LowlevelUnsatisfiable

exclude

public void exclude(int value)
             throws LowlevelUnsatisfiable

move

public void move(int src,
                 int dest)

extend

public void extend()

clone

public java.lang.Object clone()
Description copied from class: java.util.Vector
Creates a new Vector with the same contents as this one. The clone is shallow; elements are not cloned.


gfpSweep

private boolean gfpSweep(BitMatrix R,
                         BitMatrix C,
                         int[] strategy,
                         int dS,
                         int direction)
                  throws LowlevelUnsatisfiable
Fix-point computations


gfp

public void gfp(BitMatrix R,
                BitMatrix Rt,
                BitMatrix C,
                BitMatrix Ct,
                int[] strategy)
         throws LowlevelUnsatisfiable
Reduce this domain vector to the greatest fixed-point of a constraint.


initGfpCardinals

void initGfpCardinals()

chooseDomain

public int chooseDomain()
Choose a non-null, non-singleton, domain and return its index. Return -1 if all the domains are instantiated.


chooseDomain

public int chooseDomain(BitVector set)
ditto but choose a domain whose index i is in set


dump

public java.lang.String dump()