|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
ExamplesJaCoP.PigeonHole
public class PigeonHole
It solves the PigeonHole problem. The problem is how to assign n pigeons into n-1 holes in such a way that each hole holds only one pigeons. Clearly this problem is not satisfiable.
| Field Summary | |
|---|---|
int |
noPigeons
|
| Fields inherited from class ExamplesJaCoP.Example |
|---|
cost, search, store, vars |
| Constructor Summary | |
|---|---|
PigeonHole()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
It executes the program to solve PigeonHole problem in two different ways. |
void |
model()
It specifies a standard way of modeling the problem. |
void |
modelBasic()
It specifies inefficient model which uses only primitive constraints. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int noPigeons
| Constructor Detail |
|---|
public PigeonHole()
| Method Detail |
|---|
public void model()
Example
model in class Examplepublic void modelBasic()
public static void main(java.lang.String[] args)
args - the number of pigeons.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||