Package org.jacop.examples.fd
Class Cryptogram
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.Cryptogram
-
public class Cryptogram extends ExampleFD
Cryptogram. It solves any cryptogram puzzle of the form like SEND+MORE=MONEY.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description int
base
It specifies the base of the numerical system to be used in the calculations.java.lang.String
filename
It specifies the file which contains the puzzle to be solved.java.lang.String[]
lines
int
maxInputLines
It specifies how many lines of expressions can be inputed in one execution.int
noLines
-
Constructor Summary
Constructors Constructor Description Cryptogram()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int[]
createWeights(int length, int base)
static void
main(java.lang.String[] args)
It executes the program to solve any cryptographic puzzle.void
model()
It specifies a standard way of modeling the problem.-
Methods inherited from class org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
-
-
-
Field Detail
-
maxInputLines
public int maxInputLines
It specifies how many lines of expressions can be inputed in one execution.
-
base
public int base
It specifies the base of the numerical system to be used in the calculations.
-
filename
public java.lang.String filename
It specifies the file which contains the puzzle to be solved.
-
lines
public java.lang.String[] lines
-
noLines
public int noLines
-
-
Method Detail
-
createWeights
private static int[] createWeights(int length, int base)
-
model
public void model()
Description copied from class:ExampleFD
It specifies a standard way of modeling the problem.
-
main
public static void main(java.lang.String[] args)
It executes the program to solve any cryptographic puzzle.- Parameters:
args
- no arguments read.
-
-