Class

cafesat.common

FixedIntStack

Related Doc: package common

Permalink

class FixedIntStack extends AnyRef

Implements a stack of Int of fixed maximum size.

This is an efficient data structure for representing the trail in a SAT solver. Though it can be used to represent a stack of Int with a fixed maximum size.

Exceptions thrown

IllegalArgumentException if maxSize < 0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FixedIntStack
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FixedIntStack(maxSize: Int)

    Permalink

    Initializes an empty stack with space to grow up to maxSize

    Initializes an empty stack with space to grow up to maxSize

    maxSize

    the maximum size the stack can grow. Should be positive

    Exceptions thrown

    IllegalArgumentException if maxSize < 0

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(i: Int): Int

    Permalink

    Provides unchecked access to an element in the stack.

    Provides unchecked access to an element in the stack.

    The access is unchecked in the sense that we do not make sure the element is not outside the current range of the stack, and could return a random value if it is bigger than this.size but smaller than maxSize.

    i

    the index of the element in the stack, starting at 0

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(el: Int): Boolean

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get(i: Int): Int

    Permalink

    Provides checked access to an element in the stack.

    Provides checked access to an element in the stack.

    Will throw an exception if the element is outside the actual content of the stack.

    i

    the index of the element in the stack, starting at 0

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. def isEmpty: Boolean

    Permalink
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def pop(): Int

    Permalink
  20. def push(el: Int): Unit

    Permalink
  21. def size: Int

    Permalink
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def top: Int

    Permalink
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped