org.opencyc.constraintsolver
Class VariableSelectionAttributes

java.lang.Object
  |
  +--org.opencyc.constraintsolver.VariableSelectionAttributes
All Implemented Interfaces:
java.lang.Comparable

public class VariableSelectionAttributes
extends java.lang.Object
implements java.lang.Comparable

VariableSelectionAttributes object to model the attributes and sort behavior of a variable and its associated selection attributes. The first selection attribute is the size of the remaining value domain. The second selection attribute is the number of forward constraint rules which apply to this variable. A forward constraint rule is one which uses only the current variable and future (yet to be considered) variables.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

See Also:
UnitTest#testBinding

Field Summary
protected  CycVariable cycVariable
          The constraint variable under consideration.
protected  java.lang.Integer degree
          The number of applicable forward rules.
protected  java.lang.Integer remainingDomainSize
          The size of the remaining value domain.
 
Constructor Summary
VariableSelectionAttributes(CycVariable cycVariable, java.lang.Integer remainingDomainSize, java.lang.Integer degree)
          Construct a new VariableSelectionAttibutes object given the variable, remaining domain size, and degree.
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this object with the specified object for order.
 java.lang.String toString()
          Returns a String representation of the VariableSelectionAttributes object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cycVariable

protected CycVariable cycVariable
The constraint variable under consideration.

remainingDomainSize

protected java.lang.Integer remainingDomainSize
The size of the remaining value domain.

degree

protected java.lang.Integer degree
The number of applicable forward rules.
Constructor Detail

VariableSelectionAttributes

public VariableSelectionAttributes(CycVariable cycVariable,
                                   java.lang.Integer remainingDomainSize,
                                   java.lang.Integer degree)
Construct a new VariableSelectionAttibutes object given the variable, remaining domain size, and degree.
Method Detail

compareTo

public int compareTo(java.lang.Object object)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - the reference object with which to compare.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object

toString

public java.lang.String toString()
Returns a String representation of the VariableSelectionAttributes object.
Overrides:
toString in class java.lang.Object
Returns:
a String representation of the VariableSelectionAttributes object.