ExamplesJaCoP
Class Gates

java.lang.Object
  extended by ExamplesJaCoP.Example
      extended by ExamplesJaCoP.Gates

public class Gates
extends Example

It specifies an adder using gates specified by extensional constraints.

Author:
Krzysztof Kuchcinski and Radoslaw Szymanek

Field Summary
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
Gates()
           
 
Method Summary
 void and(BooleanVar in1, BooleanVar in2, BooleanVar out)
          It imposes an extensional constraint enforcing an and relationship between two input parameters and an output parameter.
static void main(java.lang.String[] args)
          It executes a program to solve gates problems.
 void model()
          It specifies a standard way of modeling the problem.
 void not(BooleanVar in, BooleanVar out)
          It imposes an extensional constraint enforcing an not relationship between input parameter and an output parameter.
 void or(BooleanVar in1, BooleanVar in2, BooleanVar out)
          It imposes an extensional constraint enforcing an or relationship between two input parameters and an output parameter.
 boolean searchSpecific()
          It provides a specific search with extensive printout of the result.
 void xor(BooleanVar in1, BooleanVar in2, BooleanVar out)
          It imposes an extensional constraint enforcing an xor relationship between two input parameters and an output parameter.
 
Methods inherited from class ExamplesJaCoP.Example
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gates

public Gates()
Method Detail

model

public void model()
Description copied from class: Example
It specifies a standard way of modeling the problem.

Specified by:
model in class Example

and

public void and(BooleanVar in1,
                BooleanVar in2,
                BooleanVar out)
It imposes an extensional constraint enforcing an and relationship between two input parameters and an output parameter.

Parameters:
in1 - the first input parameter.
in2 - the second input parameter.
out - the output parameter.

or

public void or(BooleanVar in1,
               BooleanVar in2,
               BooleanVar out)
It imposes an extensional constraint enforcing an or relationship between two input parameters and an output parameter.

Parameters:
in1 - the first input parameter.
in2 - the second input parameter.
out - the output parameter.

xor

public void xor(BooleanVar in1,
                BooleanVar in2,
                BooleanVar out)
It imposes an extensional constraint enforcing an xor relationship between two input parameters and an output parameter.

Parameters:
in1 - the first input parameter.
in2 - the second input parameter.
out - the output parameter.

not

public void not(BooleanVar in,
                BooleanVar out)
It imposes an extensional constraint enforcing an not relationship between input parameter and an output parameter.

Parameters:
in - the first input parameter.
out - the output parameter.

main

public static void main(java.lang.String[] args)
It executes a program to solve gates problems.

Parameters:
args -

searchSpecific

public boolean searchSpecific()
It provides a specific search with extensive printout of the result.

Returns:
true if there is a solution, false otherwise.