Class CoreConstraintStore

  • All Implemented Interfaces:
    org.projog.clp.ConstraintStore, org.projog.clp.ReadConstraintStore

    final class CoreConstraintStore
    extends java.lang.Object
    implements org.projog.clp.ConstraintStore
    An implementation of ConstraintStore for use in Projog.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<org.projog.clp.Constraint> matched  
      private java.util.List<org.projog.clp.Constraint> queue  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addConstraints​(ClpVariable copy)  
      long getMax​(org.projog.clp.Expression id)  
      long getMin​(org.projog.clp.Expression id)  
      (package private) boolean resolve()  
      org.projog.clp.ExpressionResult setMax​(org.projog.clp.Expression id, long max)  
      org.projog.clp.ExpressionResult setMin​(org.projog.clp.Expression id, long min)  
      org.projog.clp.ExpressionResult setNot​(org.projog.clp.Expression id, long not)  
      org.projog.clp.ExpressionResult setValue​(org.projog.clp.Expression id, long value)  
      private org.projog.clp.ExpressionResult update​(org.projog.clp.Expression id, java.util.function.Function<org.projog.clp.VariableState,​org.projog.clp.VariableStateResult> f)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • queue

        private final java.util.List<org.projog.clp.Constraint> queue
      • matched

        private final java.util.Set<org.projog.clp.Constraint> matched
    • Constructor Detail

      • CoreConstraintStore

        CoreConstraintStore()
      • CoreConstraintStore

        CoreConstraintStore​(org.projog.clp.Constraint c)
      • CoreConstraintStore

        CoreConstraintStore​(java.util.List<org.projog.clp.Constraint> c)
    • Method Detail

      • resolve

        boolean resolve()
      • getMin

        public long getMin​(org.projog.clp.Expression id)
        Specified by:
        getMin in interface org.projog.clp.ReadConstraintStore
      • getMax

        public long getMax​(org.projog.clp.Expression id)
        Specified by:
        getMax in interface org.projog.clp.ReadConstraintStore
      • setValue

        public org.projog.clp.ExpressionResult setValue​(org.projog.clp.Expression id,
                                                        long value)
        Specified by:
        setValue in interface org.projog.clp.ConstraintStore
      • setMin

        public org.projog.clp.ExpressionResult setMin​(org.projog.clp.Expression id,
                                                      long min)
        Specified by:
        setMin in interface org.projog.clp.ConstraintStore
      • setMax

        public org.projog.clp.ExpressionResult setMax​(org.projog.clp.Expression id,
                                                      long max)
        Specified by:
        setMax in interface org.projog.clp.ConstraintStore
      • setNot

        public org.projog.clp.ExpressionResult setNot​(org.projog.clp.Expression id,
                                                      long not)
        Specified by:
        setNot in interface org.projog.clp.ConstraintStore
      • update

        private org.projog.clp.ExpressionResult update​(org.projog.clp.Expression id,
                                                       java.util.function.Function<org.projog.clp.VariableState,​org.projog.clp.VariableStateResult> f)
      • addConstraints

        private void addConstraints​(ClpVariable copy)