|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
ExamplesJaCoP.Queens
public class Queens
It models the queens problem in different ways as well as applies different search methods.
| Field Summary | |
|---|---|
int |
numberQ
It specifies the size of chessboard to be used in the model. |
| Fields inherited from class ExamplesJaCoP.Example |
|---|
cost, search, store, vars |
| Constructor Summary | |
|---|---|
Queens()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
It executes different models and search methods to solve Queens problem. |
void |
model()
It specifies a standard way of modeling the problem. |
void |
modelBasic()
This model uses only primitive constraints. |
void |
modelChanneling()
This model uses dual model to solve Queens problems. |
void |
modelFields()
It uses a model based on fields to model Queens problem (rather inefficient model). |
static void |
test(java.lang.String[] args)
It executes different models and search methods to solve Queens problem. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int numberQ
| Constructor Detail |
|---|
public Queens()
| Method Detail |
|---|
public void modelBasic()
public void modelChanneling()
public void modelFields()
public void model()
Example
model in class Examplepublic static void main(java.lang.String[] args)
args - first argument specifies the size of the chessboard.public static void test(java.lang.String[] args)
args - first argument specifies the size of the chessboard.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||