fr.umlv.gramofone.pb
Class Constraints

java.lang.Object
  extended by fr.umlv.gramofone.pb.Constraints

public class Constraints
extends java.lang.Object

Class which create the constraints for the java pseudoboolean solver SAT4J Constraints are writen into a file, the solver as to read the file next

Author:
fsikora

Constructor Summary
Constraints()
           
 
Method Summary
 java.lang.String getConstraints(MyGraph g)
          took a graph, and return a file.
 int getId(char variableName, int a, int b)
          give the correct number of variable given the variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraints

public Constraints()
Method Detail

getId

public int getId(char variableName,
                 int a,
                 int b)
give the correct number of variable given the variable

Parameters:
variableName - letter of the variable (needed because different variable got same int a b
a - first int for the variable (can be a u for an edge, a color for other variable..)
b - the second int
Returns:
the correct indentificator (! caution, must do -1 to get the value of this id in the model array)

getConstraints

public java.lang.String getConstraints(MyGraph g)
took a graph, and return a file. In this file, there is constraint need to solve the graphmotif problem of this graph by the pseudoboolean solver

Parameters:
g -
Returns:
filename