kodkod.engine
Interface Cost


public interface Cost

A cost function to be minimized during solving. In particular, each Cost is a total function from a set of relations to a non-negative integer which represents the weight of one edge in the relation's value. (Hence, the total cost of a relation r in a given instance is s is #s.tuples(r) * edgeCost(r).)

Author:
Emina Torlak
specfield:
relations: set Relation // the domain of this cost function
cost: relations -> one [0..)

Method Summary
 int edgeCost(Relation relation)
          Returns the cost of one edge in the relational value of the given Relation instance.
 

Method Detail

edgeCost

int edgeCost(Relation relation)
Returns the cost of one edge in the relational value of the given Relation instance.

Returns:
this.cost[relation]
Throws:
java.lang.IllegalArgumentException - - relation !in this.relations