Package

jp.kobe_u

copris

Permalink

package copris

Provides classes for Constraint Programming in Scala.

OVERVIEW

The following is a sample program in Copris DSL (Domain Specific Language).

object FirstStep {
  import jp.kobe_u.copris._
  import jp.kobe_u.copris.dsl._

  def main(args: Array[String]) = {
    val x = int('x, 0, 7)
    val y = int('y, 0, 7)
    add(x + y === 7)
    add(x * 2 + y * 4 === 20)
    if (find) {
      println(solution)
    }
  }
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. copris
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Abs(x0: Term) extends Term with Product with Serializable

    Permalink

    Case class for absolute value of term.

  2. abstract class AbstractSolver extends SolverTrait

    Permalink

    Abstract class for CSP solvers

  3. case class Add(xs: Term*) extends Term with Product with Serializable

    Permalink

    Case class for addition of terms.

    Case class for addition of terms. Companion object provies other factory methods.

  4. case class Alldifferent(xs: Term*) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Alldifferent global constraints.

    Case class for Alldifferent global constraints. Companion object provies other factory methods.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Calldifferent.html

  5. case class And(cs: Constraint*) extends Constraint with Product with Serializable

    Permalink

    Case class for conjuction of constaints.

    Case class for conjuction of constaints. Companion object provies other factory methods.

  6. case class Bool(name: String, is: String*) extends Constraint with Ordering[Bool] with Product with Serializable

    Permalink

    Case class of Boolean variables.

    Case class of Boolean variables.

    name

    the primary name of the variable

    is

    the indices of the variable (optional)

  7. case class CSP(variables: IndexedSeq[Var] = IndexedSeq(), bools: IndexedSeq[Bool] = IndexedSeq(), dom: Map[Var, Domain] = Map(), constraints: IndexedSeq[Constraint] = IndexedSeq()) extends CSPTrait with Product with Serializable

    Permalink

    Case class of CSP (Constraint Satisfaction Problem)

    Case class of CSP (Constraint Satisfaction Problem)

    variables

    integer variables

    bools

    Boolean variables

    dom

    domains of integer variables

    constraints

    constraints case class CSP(var variables: Seq[Var] = Seq.empty, var bools: Seq[Bool] = Seq.empty, var dom: Map[Var,Domain] = Map.empty, var constraints: Seq[Constraint] = Seq.empty)

  8. trait CSPTrait extends AnyRef

    Permalink

    Trait of CSP (Constraint Satisfaction Problem)

  9. sealed abstract class Constraint extends Expr

    Permalink

    Abstract class of constraints.

    Abstract class of constraints.

    Operators defined in this class create a new expression. For example, c && d returns a new term And(c, d) when c and d are constraints.

  10. class Copris extends CoprisTrait

    Permalink

    Class for Copris DSL which provides methods for CSP and CSP solver.

  11. trait CoprisTrait extends CSPTrait with SolverTrait

    Permalink

    Trait for Copris DSL which provides methods for CSP and CSP solver.

    Trait for Copris DSL which provides methods for CSP and CSP solver. This trait also provides implicit conversion of converting scala Symbols to CSP integer variables (jp.kobe_u.copris.Var).

  12. case class Count(value: Term, xs: Seq[Term], cmp: String, count: Term) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Count global constraints.

    Case class for Count global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Ccount.html

  13. case class Cumulative(tasks: Seq[(Term, Term, Term, Term)], limit: Term) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Cumulative global constraints.

    Case class for Cumulative global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Ccumulative.html

  14. case class Disjunctive(tasks: (Term, Term)*) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Disjunctive global constraints.

    Case class for Disjunctive global constraints. Companion object provies other factory methods.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Cdisjunctive.html

  15. case class Div(x0: Term, x1: Term) extends Term with Product with Serializable

    Permalink

    Case class for division of terms.

  16. abstract class Domain extends AnyRef

    Permalink

    Abstract class of domains.

    Abstract class of domains. Companion object provies other factory methods.

  17. case class Element(i: Term, xs: Seq[Term], xi: Term) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Element global constraints.

    Case class for Element global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Celement.html

  18. case class EnumDomain[A](values: A*) extends Product with Serializable

    Permalink

    Case class of enum domain

  19. case class Eq(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for equals constraints.

  20. abstract class Expr extends AnyRef

    Permalink

    Abstract class of expressions.

    Abstract class of expressions. jp.kobe_u.copris.Terms and jp.kobe_u.copris.Constraints are expressions.

  21. case class Ge(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for greater-than-or-equals constraints.

  22. case class GlobalCardinality(xs: Seq[Term], card: Seq[(Int, Term)]) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for GlobalCardinality global constraints.

    Case class for GlobalCardinality global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Cglobal_cardinality.html

  23. case class GlobalCardinalityWithCosts(xs: Seq[Term], card: Seq[(Int, Term)], table: Seq[(Int, Int, Int)], cost: Term) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for GlobalCardinalityWithCosts global constraints.

    Case class for GlobalCardinalityWithCosts global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Cglobal_cardinality_with_costs.html

  24. sealed abstract class GlobalConstraint extends Constraint

    Permalink

    Abstract class of global constraints.

  25. case class Gt(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for greater-than constraints.

  26. case class If(c: Constraint, x0: Term, x1: Term) extends Term with Product with Serializable

    Permalink

    Case class for if expressions.

  27. case class Iff(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Permalink

    Case class for if-and-only-if of constaint.

  28. case class Imp(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Permalink

    Case class for implication of constaint.

  29. case class IntervalDomain(lo: Int, hi: Int) extends Domain with Product with Serializable

    Permalink

    Case class of interval domain

  30. case class Le(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for less-than-or-equals constraints.

  31. case class LexLess(xs: Seq[Term], ys: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for LexLess global constraints.

    Case class for LexLess global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Clex_less.html

  32. case class LexLesseq(xs: Seq[Term], ys: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for LexLesseq global constraints.

    Case class for LexLesseq global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Clex_lesseq.html

  33. case class Lt(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for less-than constraints.

  34. case class Matrix(vs: Seq[Vec]) extends Iterable[Vec] with Product with Serializable

    Permalink

    Case class for matrices of terms.

    Case class for matrices of terms. Companion object provies other factory methods.

  35. case class Max(xs: Term*) extends Term with Product with Serializable

    Permalink

    Case class for maximum of terms.

    Case class for maximum of terms. Companion object provies other factory methods.

  36. case class Min(xs: Term*) extends Term with Product with Serializable

    Permalink

    Case class for minimum of terms.

    Case class for minimum of terms. Companion object provies other factory methods.

  37. case class Mod(x0: Term, x1: Term) extends Term with Product with Serializable

    Permalink

    Case class for remainder of terms.

  38. case class Mul(xs: Term*) extends Term with Product with Serializable

    Permalink

    Case class for multiplication of terms.

    Case class for multiplication of terms. Companion object provies other factory methods.

  39. case class Ne(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Permalink

    Case class for not-equals constraints.

  40. case class Neg(x0: Term) extends Term with Product with Serializable

    Permalink

    Case class for negation of term.

  41. case class Not(c0: Constraint) extends Constraint with Product with Serializable

    Permalink

    Case class for logical negation of constaint.

  42. case class Num(value: Int) extends Term with Product with Serializable

    Permalink

    Case class of number terms.

    Case class of number terms.

    value

    the value of the number term

  43. case class Nvalue(count: Term, xs: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Nvalue global constraints.

    Case class for Nvalue global constraints.

    See also

    http://www.emn.fr/z-info/sdemasse/gccat/Cnvalue.html

  44. case class Or(cs: Constraint*) extends Constraint with Product with Serializable

    Permalink

    Case class for disjuction of constaints.

    Case class for disjuction of constaints. Companion object provies other factory methods.

  45. case class SetDomain(values: SortedSet[Int]) extends Domain with Product with Serializable

    Permalink

    Case class of set domain

  46. case class Solution(intValues: Map[Var, Int], boolValues: Map[Bool, Boolean]) extends Product with Serializable

    Permalink

    Case class for solutions

  47. trait SolverTrait extends AnyRef

    Permalink

    Trait for CSP solvers

  48. case class Sub(xs: Term*) extends Term with Product with Serializable

    Permalink

    Case class for subtraction of terms.

    Case class for subtraction of terms. Companion object provies other factory methods.

  49. sealed abstract class Term extends Expr

    Permalink

    Abstract class of terms.

    Abstract class of terms.

    Operators defined in this class create a new expression. For example, x + y returns a new term Add(x, y) when x and y are terms.

  50. class Timer extends AnyRef

    Permalink

    Class Timer (experimental)

  51. case class Var(name: String, is: String*) extends Term with Ordering[Var] with Product with Serializable

    Permalink

    Case class of integer variables.

    Case class of integer variables.

    name

    the primary name of the variable

    is

    the indices of the variable (optional)

  52. case class Vec(xs: Seq[Term]) extends Iterable[Term] with Product with Serializable

    Permalink

    Case class for vectors of terms.

    Case class for vectors of terms. Companion object provies other factory methods.

  53. case class Weightedsum(axs: Seq[(Int, Term)], cmp: String, b: Term) extends GlobalConstraint with Product with Serializable

    Permalink

    Case class for Weightedsum global constraints.

  54. case class Xor(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Permalink

    Case class for exclusive-or of constaint.

Value Members

  1. object Add extends Serializable

    Permalink

    Factory for addition of terms.

  2. object Alldifferent extends Serializable

    Permalink

    Factory for Alldifferent global constraints.

  3. object And extends Serializable

    Permalink

    Factory for conjunction of terms.

  4. object Bool extends Serializable

    Permalink
  5. object DefaultSolver

    Permalink

    Factory for default solver.

    Factory for default solver.

    jp.kobe_u.copris.sugar.Solver is returned as the default solver.

    See also

    jp.kobe_u.copris.sugar.Solver

  6. object Disjunctive extends Serializable

    Permalink

    Factory for Disjunctive global constraints.

  7. object Domain

    Permalink

    Factory for creating domains.

  8. object FALSE extends Constraint

    Permalink

    Object of FALSE constraint.

  9. object Matrix extends Serializable

    Permalink

    Factory for vectors

  10. object Max extends Serializable

    Permalink

    Factory for maximum of terms.

  11. object Min extends Serializable

    Permalink

    Factory for minimum of terms.

  12. object Mul extends Serializable

    Permalink

    Factory for multiplication of terms.

  13. object NIL extends Term

    Permalink

    Object of NIL term.

  14. object ONE extends Num

    Permalink

    Object of number term 1.

  15. object Or extends Serializable

    Permalink

    Factory for disjunction of terms.

  16. object Sub extends Serializable

    Permalink

    Factory for subtraction of terms.

  17. object Sum

    Permalink

    Factory for addition of terms.

  18. object TRUE extends Constraint

    Permalink

    Object of TRUE constraint.

  19. object Timer

    Permalink

    Object Timer (experimental)

  20. object Var extends Serializable

    Permalink
  21. object Vec extends Serializable

    Permalink

    Factory for vectors

  22. object ZERO extends Num

    Permalink

    Object of number term 0.

  23. object dsl extends CoprisTrait

    Permalink

    Object for Copris DSL which provides methods for CSP and CSP solver.

  24. package jsr331

    Permalink
  25. package loader

    Permalink
  26. package pb

    Permalink
  27. package smt

    Permalink
  28. package sugar

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped