~ubuntu-branches/ubuntu/natty/gecode/natty

« back to all changes in this revision

Viewing changes to doxygen.hh.in

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2005-12-24 07:51:25 UTC
  • Revision ID: james.westby@ubuntu.com-20051224075125-klkiqofvbfvusfvt
Tags: upstream-1.0.0.dfsg.1
ImportĀ upstreamĀ versionĀ 1.0.0.dfsg.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Main authors:
 
3
 *     Christian Schulte <schulte@gecode.org>
 
4
 *     Guido Tack <tack@gecode.org>
 
5
 *
 
6
 *  Copyright:
 
7
 *     Christian Schulte, 2005
 
8
 *     Guido Tack, 2005
 
9
 *
 
10
 *  Last modified:
 
11
 *     $Date: 2005-11-29 13:35:41 +0100 (Tue, 29 Nov 2005) $ by $Author: schulte $
 
12
 *     $Revision: 2659 $
 
13
 *
 
14
 *  This file is part of Gecode, the generic constraint
 
15
 *  development environment:
 
16
 *     http://www.gecode.org
 
17
 *
 
18
 *  See the file "LICENSE" for information on usage and
 
19
 *  redistribution of this file, and for a
 
20
 *     DISCLAIMER OF ALL WARRANTIES.
 
21
 *
 
22
 */
 
23
 
 
24
/*
 
25
 * No code, just contains the group definitions of the
 
26
 * Doxygen-generated documentation
 
27
 */
 
28
 
 
29
 
 
30
/**
 
31
 * \defgroup Task Functionality by programming task
 
32
 */
 
33
 
 
34
/**
 
35
 * \defgroup TaskInt Interfacing to Gecode
 
36
 * \ingroup Task
 
37
 */
 
38
 
 
39
/**
 
40
 * \defgroup TaskIntScript Setting up scripts
 
41
 *
 
42
 * Scripts (or models) are programmed by inheriting from the class
 
43
 * Gecode::Space. For many examples see \ref Example.
 
44
 *
 
45
 * \ingroup TaskInt
 
46
 */
 
47
 
 
48
/**
 
49
 * \defgroup TaskIntInt Using finite domain integers
 
50
 * \ingroup TaskInt
 
51
 */
 
52
 
 
53
/**
 
54
 * \defgroup TaskIntIntVars Integer variables
 
55
 * \ingroup TaskIntInt
 
56
 */
 
57
 
 
58
/**
 
59
 * \defgroup TaskIntSearch Search engines
 
60
 *
 
61
 * Defines search engines. All search engines (but Gecode::LDS, where
 
62
 * it is not needed) support recomputation. The behaviour of recomputation
 
63
 * can be controlled by two parameters:
 
64
 *  - \a c_d as minimal recomputation distance: this guarantees that
 
65
 *    a path between two nodes in the search tree for which copies are
 
66
 *    stored has at least length \a c_d. That is, in order to recompute
 
67
 *    a node in the search tree, \a c_d recomputation steps are needed.
 
68
 *    The minimal recomputation distance yields a guarantee on saving
 
69
 *    memory compared to full copying: it stores \a c_d times less nodes
 
70
 *    than full copying.
 
71
 *  - \a a_d as adaptive recomputation distance: when a node needs to be
 
72
 *    recomputed and the path is longer than \a a_d, an intermediate copy
 
73
 *    is created (approximately in the middle of the path) to speed up
 
74
 *    future recomputation. Note that small values of \a a_d can increase
 
75
 *    the memory consumption considerably.
 
76
 *
 
77
 * Full copying corresponds to a maximal recomputation distance \a c_d of 1.
 
78
 *
 
79
 * All recomputation performed is based on batch recomputation: batch
 
80
 * recomputation performs propagation only once for an entire path
 
81
 * used in recomputation.
 
82
 *
 
83
 * Requires \code #include "search.hh" \endcode
 
84
 * \ingroup TaskInt
 
85
 */
 
86
 
 
87
/**
 
88
 * \defgroup TaskIntSet Using finite integer sets
 
89
 * \ingroup TaskInt
 
90
 */
 
91
 
 
92
/**
 
93
 * \defgroup TaskIntSetVars Set variables
 
94
 * \ingroup TaskIntSet
 
95
 */
 
96
 
 
97
/**
 
98
 * \defgroup TaskMiniModel Direct modelling
 
99
 * \ingroup Task
 
100
 */
 
101
 
 
102
/**
 
103
 * \defgroup TaskSearch Programming search engines
 
104
 * \ingroup Task
 
105
 */
 
106
 
 
107
/**
 
108
 * \defgroup TaskActor Programming actors
 
109
 * \ingroup Task
 
110
 */
 
111
 
 
112
/**
 
113
 * \defgroup TaskActorInt Programming integer actors
 
114
 * \ingroup TaskActor
 
115
 */
 
116
 
 
117
/**
 
118
 * \defgroup TaskActorSet Programming set actors
 
119
 * \ingroup TaskActor
 
120
 */
 
121
 
 
122
/**
 
123
 * \defgroup TaskVar Programming variables
 
124
 * \ingroup Task
 
125
 */
 
126
 
 
127
/**
 
128
 * \defgroup TaskVarView Programming views for variables
 
129
 * \ingroup TaskVar
 
130
 */
 
131
 
 
132
/**
 
133
 * \defgroup Func Common functionality
 
134
 */
 
135
 
 
136
/**
 
137
 * \defgroup FuncMem Memory management
 
138
 * \ingroup Func
 
139
 */  
 
140
 
 
141
/**
 
142
 * \defgroup FuncThrow Gecode exceptions
 
143
 * \ingroup Func
 
144
 */
 
145
 
 
146
/**
 
147
 * \defgroup FuncSupport Support algorithms and datastructures
 
148
 *
 
149
 * These are some common datastructures used in the implementation of
 
150
 * %Gecode. Maybe they can be also useful to others.
 
151
 *
 
152
 * In order to use them, one needs to include the appropriate header-file
 
153
 * as described in the class and function documentation.
 
154
 * \ingroup Func
 
155
 */  
 
156
 
 
157
/**
 
158
 * \defgroup FuncIter Range and value iterators
 
159
 *
 
160
 * Both range and value iterators have a rather simple interface
 
161
 * for controlling iteration (which deviates what you might be
 
162
 * used to from other iterators).
 
163
 *
 
164
 * The application operator (if \c i is an iterator, it is invoked by \c i() )
 
165
 * tests whether an iterator has not yet reached
 
166
 * its end (in this case, \c true is returned). The prefix
 
167
 * increment operator (if \c i is an iterator, this is invoked as \c ++i)
 
168
 * moves the iterator to the next element (either next value or next range).
 
169
 *
 
170
 * Value iterators provide access to the value by the member function
 
171
 * \c val(). Range iterators provide access to the smallest, largest, and
 
172
 * width of the current range by \c min(), \c max(), and \c width()
 
173
 * respectively.
 
174
 * 
 
175
 * Requires \code #include "iter.hh" \endcode
 
176
 * \ingroup Func
 
177
 */
 
178
 
 
179
/**
 
180
 * \defgroup FuncIterRanges Range iterators
 
181
 *
 
182
 * A range iterator provides incremental access to a sequence of increasing
 
183
 * ranges.
 
184
 *
 
185
 * Requires \code #include "iter.hh" \endcode
 
186
 * \ingroup FuncIter
 
187
 */
 
188
 
 
189
/**
 
190
 * \defgroup FuncIterValues Value iterators
 
191
 *
 
192
 * A value iterator provides incremental access to a sequence of increasing
 
193
 * values. 
 
194
 *
 
195
 * Requires \code #include "iter.hh" \endcode
 
196
 * \ingroup FuncIter
 
197
 */
 
198
 
 
199
/**
 
200
 * \defgroup Other Other available functionality
 
201
 *
 
202
 */
 
203
 
 
204
/**
 
205
 * \defgroup FuncIntProp Integer propagators
 
206
 *
 
207
 * This module contains a description of all predefined integer 
 
208
 * propagators. They can be reused, for example, for rewriting
 
209
 * newly defined integer propagators into already available
 
210
 * propagators.
 
211
 * \ingroup Other
 
212
 */
 
213
 
 
214
/**
 
215
 * \defgroup FuncIntSelView Integer view selection for branching
 
216
 *
 
217
 * Contains a description of view selection strategies on integer
 
218
 * views that can be used together with the generic view/value
 
219
 * branching class Gecode::ViewValBranching (argument \a ViewSel).
 
220
 *
 
221
 * All view selection classes require 
 
222
 * \code #include "int/branch.hh" \endcode
 
223
 * \ingroup Other
 
224
 */
 
225
 
 
226
/**
 
227
 * \defgroup FuncIntSelVal Integer value selection for branching
 
228
 *
 
229
 * Contains a description of value selection strategies on integer
 
230
 * views that can be used together with the generic view/value
 
231
 * branching class Gecode::ViewValBranching (argument \a ValSel).
 
232
 *
 
233
 * All value selection classes require 
 
234
 * \code #include "int/branch.hh" \endcode
 
235
 * \ingroup Other
 
236
 */
 
237
 
 
238
/**
 
239
 * \defgroup FuncSetProp Set propagators
 
240
 *
 
241
 * This module contains a description of all predefined finite set
 
242
 * propagators. They can be reused, for example, for rewriting
 
243
 * newly defined finite set propagators into already available
 
244
 * propagators.
 
245
 * \ingroup Other
 
246
 */
 
247
 
 
248
/**
 
249
 * \defgroup FuncSetSelView Set view selection for branching
 
250
 *
 
251
 * Contains a description of view selection strategies on set
 
252
 * views that can be used together with the generic view/value
 
253
 * branching class Gecode::ViewValBranching (argument \a ViewSel).
 
254
 *
 
255
 * All view selection classes require 
 
256
 * \code #include "set/branch.hh" \endcode
 
257
 * \ingroup Other
 
258
 */
 
259
 
 
260
/**
 
261
 * \defgroup FuncSetSelVal Set value selection for branching
 
262
 *
 
263
 * Contains a description of value selection strategies on set
 
264
 * views that can be used together with the generic view/value
 
265
 * branching class Gecode::ViewValBranching (argument \a ValSel).
 
266
 *
 
267
 * All value selection classes require 
 
268
 * \code #include "set/branch.hh" \endcode
 
269
 * \ingroup Other
 
270
 */
 
271
 
 
272
/**
 
273
 * \defgroup Example Example scripts (models)
 
274
 *
 
275
 * All scripts are compiled into simple standalone programs. These
 
276
 * programs understand the following options given on the 
 
277
 * commandline:
 
278
 *  - <code>-mode (solution, time, stat)</code>
 
279
 *    - <code>solution</code>: print solutions.
 
280
 *    - <code>time</code>: measure time.
 
281
 *    - <code>stat</code>: print statistics.
 
282
 *  - <code>-naive</code>, <code>-smart</code>: if there is a naive and
 
283
 *    a smart model of the problem, select which to use
 
284
 *  - <code>-solutions</code>: give the maximum number of solutions after which
 
285
 *    the search stops. 0 means all solutions.
 
286
 *  - <code>-icl (def, val, bnd, dom)</code>: give the consistency level of
 
287
 *    integer constraints such as <code>distinct</code>.
 
288
 *  - <code>-c_d</code>, <code>-a_c</code>: copying and adaptive recomputation
 
289
 *    distance to be used by the search engine.
 
290
 *  - <code>-samples</code>, <code>-iterations</code>: how many samples and
 
291
 *    iterations per sample to compute in time mode.
 
292
 *  - <code>-help</code>: print usage information and default values for
 
293
 *    all options.
 
294
 *
 
295
 * Many scripts can be given the problem size as an extra argument.
 
296
 */
 
297
 
 
298
/*
 
299
 * Collect some definitions for which no reasonable place exists
 
300
 *
 
301
 */
 
302
 
 
303
/**
 
304
 * \namespace Gecode::Support 
 
305
 * \brief %Support algorithms and datastructures
 
306
 */
 
307
 
 
308
/**
 
309
 * \mainpage Gecode Reference Documentation
 
310
 *
 
311
 * This document provides reference information about
 
312
 * <A HREF="http://www.gecode.org">%Gecode</A>.
 
313
 * The documentation is structured into three major groups: 
 
314
 * common programming tasks, common functionality, and other 
 
315
 * available functionality.
 
316
 *
 
317
 * This document corresponds to %Gecode version @VERSION@.
 
318
 *
 
319
 * \section SecByTask Programming tasks
 
320
 *
 
321
 * Documentation is available for the following tasks:
 
322
 *  - \ref TaskInt
 
323
 *  - \ref TaskMiniModel
 
324
 *  - \ref TaskSearch
 
325
 *  - \ref TaskActor "Programming propagators and branchings"
 
326
 *  - \ref TaskVar
 
327
 *
 
328
 * \section SecByFunc Common functionality
 
329
 *
 
330
 * The most important functionality is:
 
331
 *  - \ref FuncMem
 
332
 *  - \ref FuncThrow
 
333
 *
 
334
 * The complete functionality can be found \ref Func "here".
 
335
 *
 
336
 * \section SecByOther Other available functionality
 
337
 *
 
338
 * The part \ref Other documents existing propagators, variable 
 
339
 * implementations, and so on which serves as documentation of examples.
 
340
 *
 
341
 * \section SecMore More content
 
342
 *
 
343
 * Additionally, the documentation also features the following parts:
 
344
 *  - \ref PageNotation
 
345
 *  - \ref PageGlossary
 
346
 *  - \ref PageUsage
 
347
 *  - \ref PageComp
 
348
 *  - \ref PageInst
 
349
 *  - \ref PageLic
 
350
 *  - \ref PageChange
 
351
 *
 
352
 * \section SecIndex List and index content
 
353
 *
 
354
 * The following lists and indices are available
 
355
 *  - \ref PageCodeStat
 
356
 *  - <a class="el" href="modules.html">List of all modules</a> 
 
357
 *  - <a class="el" href="annotated.html">List of all classes including brief documentation</a>
 
358
 *  - <a class="el" href="namespaces.html">List of all namespaces including brief documentation</a>
 
359
 *  - <a class="el" href="files.html">List of all files</a>
 
360
 *  - <a class="el" href="hierarchy.html">Class hierarchy</a>
 
361
 *  - <a class="el" href="classes.html">Alphabetical class index</a>
 
362
 *  - <a class="el" href="namespacemembers.html">Namespace members</a>
 
363
 *  - <a class="el" href="functions.html">Class members</a>
 
364
 *  - <a class="el" href="globals.html">File members</a>
 
365
 */
 
366
 
 
367
/**
 
368
 * \page PageNotation Notational conventions
 
369
 *
 
370
 * Throughout this reference documentation we use some notational conventions
 
371
 * designed to keep the documentation concise yet understandable. Please
 
372
 * read the following carefully.
 
373
 *
 
374
 * \section NotationArray Array notation
 
375
 *
 
376
 * We allow ourselves to refer to the \f$i\f$-th element of an array \f$x\f$ 
 
377
 * by \f$x_i\f$. The size of an array \f$x\f$ (either provided by a member 
 
378
 * function \c %size() or clear from context) is denoted \f$|x|\f$.
 
379
 *
 
380
 * \section NotationHome The home space
 
381
 *
 
382
 * Many functions and member functions take an argument \a home of 
 
383
 * type \c Space*. The home space serves as manager to many
 
384
 * operations used by variables, views, propagators, spaces, and so
 
385
 * on. It provides
 
386
 * services such as failure management, propagation control, 
 
387
 * memory management, and so on. To keep the documentation concise
 
388
 * the home space is not documented for functions
 
389
 * and member functions.
 
390
 *
 
391
 * \section NotationShare Sharing in update and copy
 
392
 *
 
393
 * In member functions that either copy or update an object during
 
394
 * cloning, an argument \a share of type \c bool is available. This
 
395
 * Boolean value controls whether during cloning the data structure at
 
396
 * hand will be shared among the newly created cloned space and the original
 
397
 * or whether two independent copies are created. Some functions (such
 
398
 * as \c copy for spaces (Gecode::Space) or \c copy for propagators
 
399
 * (Gecode::Propagator) also feature this argument. Here it is used
 
400
 * to pass on the Boolean value to other datastructures used inside spaces
 
401
 * or propagators.
 
402
 *
 
403
 * The actual value the \a share argument has is defined by the search
 
404
 * engine: when a search engine uses the \a clone member function of
 
405
 * a space it decides whether sharing is to be used in the cloning of
 
406
 * the space or not. If the search engine is single-threaded, it will
 
407
 * use full sharing (\a share will be true). Only if the search engine
 
408
 * uses concurrency or parallelism with more than a single thread,
 
409
 * it will pass false as value. This means that by not sharing data structures
 
410
 * among spaces which are to be used in different threads, all parts of
 
411
 * %Gecode but the actual search engine do not need to provide concurrency
 
412
 * control.
 
413
 *
 
414
 * As examples for data structures which are sensitive to sharing, consider
 
415
 * Gecode::Support::SharedArray, Gecode::DomSpec, and Gecode::DFA.
 
416
 */
 
417
 
 
418
/**
 
419
  \page PageGlossary Brief glossary
 
420
 
 
421
This page gives brief explanations about some of the most
 
422
frequently occurring terms (currently limited to important
 
423
entities manifest in the implementation) used in the %Gecode
 
424
reference documentation.
 
425
 
 
426
\section GlossaryActor Actor
 
427
 
 
428
An actor is either a branching (\ref GlossaryBranching) or a
 
429
propagator (\ref GlossaryPropagator). Actors provide the
 
430
functionality that is common for propagators and branchings such
 
431
as member functions for copying during cloning, memory
 
432
allocation, and so on. Actors are implemented by the class
 
433
Gecode::Actor. More on programming actors can be found in the
 
434
module \ref TaskActor.
 
435
 
 
436
\section GlossaryBranching Branching
 
437
 
 
438
A branching defines the shape of the search tree. Branchings are
 
439
also known as labelings or distributors, and a branching creates
 
440
a series of choice points. Branchings are implemented by the
 
441
class Gecode::Branching. A common abstraction for defining
 
442
branchings based on view and value selection is provided by the
 
443
class Gecode::ViewValBranching.
 
444
 
 
445
\section GlossaryBranchingDesc Branching description
 
446
 
 
447
A branching description speeds up recomputation by providing
 
448
batch recomputation. It is created by a branching (\ref
 
449
GlossaryBranching) and allows to replay the effect of that
 
450
branching without the need to first perform constraint
 
451
propagation. The base-class for branching descriptions is
 
452
Gecode::BranchingDesc. An example for a branching description
 
453
that works together with branchings based on view and value
 
454
selection is Gecode::PosValDesc.
 
455
 
 
456
\section GlossarySpace Computation space
 
457
 
 
458
A computation space (space for short) comprises all entities for
 
459
a constraint problem to be solved, including all actors (\ref
 
460
GlossaryActor) and variables (\ref GlossaryVariable). A space can
 
461
be seen as corresponding to a node in the search tree. It
 
462
organizes constraint propagation, the branching process,
 
463
exploration, and memory management. Spaces are implemented by the
 
464
class Gecode::Space. They provide functionality for \ref
 
465
TaskIntScript, \ref TaskSearch, and \ref FuncMemSpace.
 
466
 
 
467
\section GlossaryME Modification event
 
468
 
 
469
A modification event describes how a view (\ref GlossaryView) or
 
470
variable implementation (\ref GlossaryVarImp) is changed by an
 
471
update operation performed on the view or variable. Each variable
 
472
domain defines its own modification events (see \ref
 
473
TaskActorIntMEPC and \ref TaskActorSetMEPC). However modification
 
474
events that describe generic events such as failure, no
 
475
modification, or assignment to a single value are predefined (see
 
476
\ref TaskVarMEPC).
 
477
 
 
478
\section GlossaryPropCond Propagation condition
 
479
 
 
480
A propagation condition defines when a propagator requires to be
 
481
re-executed. Re-execution is controlled by the modification events
 
482
that occur on the variables the propagator depends on (see \ref
 
483
GlossaryPropagator). Propagation conditions and the relation
 
484
between propagation conditions and modification events depends on
 
485
the variable domain (see \ref TaskActorIntMEPC and \ref
 
486
TaskActorSetMEPC). However, the propagation conditions that
 
487
states re-execution when a variable becomes assigned is generic
 
488
(see \ref TaskVarMEPC).
 
489
 
 
490
\section GlossaryPropagator Propagator
 
491
 
 
492
A propagator implements a constraint (actually, a constraint can
 
493
be implemented by a collection of propagators). Execution by a
 
494
propagator is defined by its dependencies: the views (referring to
 
495
some variables) together with their propagation conditions. A
 
496
propagator is implemented by inheriting from the class
 
497
Gecode::Propagator. Common abstractions for propagators are also
 
498
available (see \ref TaskPropPat, \ref TaskPropRePat, and \ref
 
499
TaskPropSetPat).
 
500
 
 
501
\section GlossaryPME Propagator modification event
 
502
 
 
503
A propagator maintains as propagator modification event for each
 
504
variable domain a modification event. These modification events
 
505
describe which modification events occurred on all views
 
506
(variables) the propagator depends on (see \ref
 
507
GlossaryPropagator). A propagator modification event is available
 
508
through a view or variable implementation (see for example \ref
 
509
TaskActorIntView or \ref TaskActorSetView).
 
510
 
 
511
\section GlossaryVariable Variable
 
512
 
 
513
A variable is used for modeling problems, be it for direct
 
514
modeling or for modeling through some interface. A variable
 
515
provides only those operations useful for modeling and excludes
 
516
in particular operations that can modify the variable domain
 
517
directly. A variable is implemented by a variable implementation
 
518
(see below).
 
519
 
 
520
\section GlossaryVarImp Variable implementation
 
521
 
 
522
A variable implementation is implemented by inheriting from
 
523
Gecode::Variable. It implements the variable domain and provides
 
524
operations to access and modify the domain. Examples of variable
 
525
implementations are Gecode::Int::IntVarImp and
 
526
Gecode::Set::SetVarImp.
 
527
 
 
528
\section GlossaryView View
 
529
 
 
530
A view offers essentially the same interface as a variable
 
531
implementation and allows both domain access and
 
532
modification. Typically, several views exist for the same
 
533
variable implementation to obtain several constraints from the
 
534
same propagator. Examples of views are \ref TaskActorIntView and
 
535
\ref TaskActorSetView.
 
536
 
 
537
*/
 
538
 
 
539
/**
 
540
 * \page PageUsage Using Gecode
 
541
 *
 
542
 * \section SecUsageInclude Including header files
 
543
 *
 
544
 * Deciding which header files must be included when using %Gecode is
 
545
 * quite straightforward. There are the following header files for inclusion:
 
546
 *  - kernel.hh must always be included (the header files below
 
547
 *    also always include kernel.hh).
 
548
 *  - search.hh must be included, if search engines are used 
 
549
 *    (see for example \ref TaskIntSearch).
 
550
 *  - int.hh must be included, if any integer functionality is used
 
551
 *    (see for example \ref TaskIntInt and \ref TaskActorInt).
 
552
 *  - set.hh must be included, if any finite set functionality is used
 
553
 *    (see for example \ref TaskIntSet and \ref TaskActorSet).
 
554
 *  - minimodel.hh must be included, if direct modelling support
 
555
 *    is used (see for example \ref TaskMiniModel).
 
556
 *
 
557
 * Other functionality is available through a set of header files. For example
 
558
 * to access the implementation of particular propagators, a particular header
 
559
 * file must be included. The header file to be included is always mentioned
 
560
 * in the documentation of the class or function.
 
561
 *
 
562
 * \section SecUsageLink Linking libraries
 
563
 *
 
564
 * Setting the exact name for a library on a particular platform aside,
 
565
 * inclusion of header files basically coincides with against which
 
566
 * library must be linked. That is:
 
567
 *  - If kernel.hh is included, linking against the kernel library is required.
 
568
 *  - If search.hh is included, linking against the search library is required.
 
569
 *  - If int.hh is included, linking against the integer library is required.
 
570
 *  - If set.hh is included, linking against the set library is required.
 
571
 *  - If minimodel.hh is included, linking against the minimodel library 
 
572
 *    is required.
 
573
 *
 
574
 * The functionality in \ref FuncSupport and \ref FuncIter require no
 
575
 * library for linking. Reusing integer or set propagators of course
 
576
 * require the integer or set library.
 
577
 *
 
578
 * If there is a difference between library and DLL (such as on Windows)
 
579
 * linking must be done against the appropriate library and the
 
580
 * corresponding DLL must be available for execution (such as in the
 
581
 * PATH environment variable).
 
582
 *
 
583
 * \section SecUsageLibraries Library names
 
584
 *
 
585
 * \subsection SULA Windows with Visual Studio
 
586
 *
 
587
 *  - Kernel library and DLL: GecodeKernel.lib and GecodeKernel.dll
 
588
 *  - Search library and DLL: GecodeSearch.lib and GecodeSearch.dll
 
589
 *  - Integer library and DLL: GecodeInt.lib and GecodeInt.dll
 
590
 *  - Set library and DLL: GecodeSet.lib and GecodeSet.dll
 
591
 *  - Minimodel library and DLL: GecodeMiniModel.lib and GecodeMiniModel.dll
 
592
 *
 
593
 * \subsection SULB Unix (Linux, MacOS X)
 
594
 *
 
595
 * Depending on whether %Gecode was compiled as a static or as a dynamic
 
596
 * library, different filename suffixes are used on different Unix platforms.
 
597
 * All library names follow the following scheme:
 
598
 *
 
599
 *  - Kernel library: libgecodekernel.<EXT>
 
600
 *  - Search library: libgecodesearch.<EXT>
 
601
 *  - Integer library: libgecodeint.<EXT>
 
602
 *  - Set library: libgecodeset.<EXT>
 
603
 *  - Minimodel library: libgecodeminimodel.<EXT>
 
604
 *
 
605
 * where <EXT> depends on the library type and platform:
 
606
 *
 
607
 *  - libgecode[...].a for static libaries on all Unix flavors
 
608
 *  - libgecode[...].so for shared libraries on Linux
 
609
 *  - libgecode[...].dylib for shared libraries on MacOS X
 
610
 *
 
611
 * You can use for example
 
612
 * 
 
613
 * <code>gcc -L$GPREFIX/lib -lgecodekernel</code>
 
614
 *
 
615
 * to link the kernel library, if the libraries are found in
 
616
 * <code>$GPREFIX/lib</code>.
 
617
 */
 
618
 
 
619
/**
 
620
 * \page PageInst Installation
 
621
 *
 
622
 * After a successful compilation, you can install the %Gecode library
 
623
 * and all header files necessary for compiling against it by invoking
 
624
 *
 
625
 * <code>make install</code>
 
626
 *
 
627
 * in the build directory.
 
628
 *
 
629
 */
 
630
 
 
631
/**
 
632
 * \page PageComp Compiling Gecode
 
633
 *
 
634
 * The %Gecode library, including examples and documentation, can be built
 
635
 * on all recent versions of Windows, Linux, and MacOS X. Porting to other
 
636
 * Unix flavors should be easy, if any change is necessary at all.
 
637
 *
 
638
 * \section Prerequisites
 
639
 *
 
640
 * In order to compile %Gecode, you need a standard Unix toolchain including
 
641
 * the following programs:
 
642
 *
 
643
 *  - a bash-compatible shell
 
644
 *  - make
 
645
 *  - sed
 
646
 *  - cp
 
647
 *  - tar
 
648
 *
 
649
 * These are available in all standard installations of Linux. On MacOS X,
 
650
 * you need to install the Apple developer tools. For
 
651
 * Windows, we require the
 
652
 * <a href="http://www.cygwin.com/">Cygwin environment</a> that provides
 
653
 * all necessary tools.
 
654
 *
 
655
 * We currently support
 
656
 *   - the Microsoft Visual C++ compilers for Windows. The Microsoft
 
657
 *     Visual C++ toolkit is available free of charge from
 
658
 *     <a href="http://msdn.microsoft.com/visualc/vctoolkit2003/">the MSDN
 
659
 *     web pages</a>. 
 
660
 *   - the GNU Compiler Collection (gcc) for Windows and Unix flavors such as
 
661
 *     Linux and MacOS X. The GNU gcc is open source software and available
 
662
 *     from <a href="http://gcc.gnu.org/">the GCC home page</a>. It is included
 
663
 *     in all Linux distributions and the Apple MacOS X developer tools.
 
664
 *     %Gecode requires at least version 3.4 of gcc. We recommend using version
 
665
 *     4.0 or higher. Very unfortunately, the parser used in versions of gcc
 
666
 *     before 3.4 is broken and hence cannot compile %Gecode.
 
667
 *   - The Intel C++ compiler for Windows and Linux. Please note that this
 
668
 *     compiler was only tested using the evaluation license available from
 
669
 *     Intel. If you encounter problems or have suggestions for improvements,
 
670
 *     please let us know.
 
671
 *
 
672
 * \section CompConf Configuring the sources
 
673
 *
 
674
 * %Gecode uses GNU autoconf to acquire information about the system it is
 
675
 * compiled on. Typically, you need to run the <code>configure</code>
 
676
 * script in the toplevel directory.
 
677
 *
 
678
 * To setup %Gecode for your particular system, you may need to add one or
 
679
 * more of the following options to <code>configure</code>:
 
680
 *
 
681
 *  - When using the Microsoft Visual C++ compiler, add
 
682
 *    <code>CC=cl CXX=cl</code> to your
 
683
 *    invocation of <code>configure</code>
 
684
 *  - When using the Intel C++ compiler under Windows, add
 
685
 *    <code>CC=icl CXX=icl</code> to your
 
686
 *    invokation of configure.
 
687
 *  - When using the Intel C++ compiler under Linux, add
 
688
 *    <code>CC=icc CXX=icpc</code> to your
 
689
 *    invokation of configure.
 
690
 *  - To install %Gecode somewhere else than the default
 
691
 *    <code>/usr/local</code>, use the <code>--prefix=[...]</code> switch
 
692
 *  - You can enable and disable the individual modules %Gecode consists of
 
693
 *    using <code>--enable-[MODULE]</code> and <code>--disable-[MODULE]</code>
 
694
 *
 
695
 * You can get a list of all supported configuration options by calling 
 
696
 * <code>configure</code> with the <code>--help</code> switch.
 
697
 *
 
698
 * \subsection CompConfExamples Example configurations
 
699
 *
 
700
 * To compile %Gecode on a Windows machine using the Microsoft compiler, use
 
701
 *
 
702
 * <code>./configure CC=cl CXX=cl</code>
 
703
 *
 
704
 * To compile only the %Gecode library without examples on a Unix machine, use
 
705
 *
 
706
 * <code>./configure --disable-examples</code>
 
707
 *
 
708
 * To compile on a Unix machine using a different than the default
 
709
 * <code>gcc</code> compiler, and install under <code>/opt/gecode</code>, use
 
710
 *
 
711
 * <code>./configure --prefix=/opt/gecode CC=gcc-4.0 CXX=g++-4.0</code>
 
712
 *
 
713
 * To compile a debug build on Unix, turning on all assertions and not
 
714
 * inlining anything, use
 
715
 *
 
716
 * <code>./configure --enable-debug</code>
 
717
 *
 
718
 * To compile on Cygwin, but linking against the Windows libraries instead
 
719
 * of the Cygwin libraries, use
 
720
 *
 
721
 * <code>./configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"</code>
 
722
 *
 
723
 * \subsection CompConfUsr Passing options for compilation
 
724
 *
 
725
 * Additional options for compilation can be passed to the compiler
 
726
 * from the make commandline via the variable <code>CXXUSR</code>. For
 
727
 * example, to pass to gcc the additional option "-mtune=i686" the following
 
728
 * can be used:
 
729
 *
 
730
 * <code>make CXXUSR="-mtune=i686"</code>
 
731
 *
 
732
 * \subsection CompConfSepDir Compiling in a separate directory
 
733
 *
 
734
 * The %Gecode library can be built in a separate directory. This is useful
 
735
 * if you do not want to clutter the source tree with all the object files
 
736
 * and libraries.
 
737
 *
 
738
 * Configuring %Gecode in a separate directory is easy. Assume that the
 
739
 * sources can be found in directory <code>$GSOURCEDIR</code>, change to
 
740
 * the directory where you want to compile %Gecode and call
 
741
 *
 
742
 * <code>$GSOURCEDIR/configure [options]</code>
 
743
 *
 
744
 * This will generate all necessary files in the new build directory.
 
745
 *
 
746
 * \section CompComp Compiling the sources
 
747
 *
 
748
 * After successful configuration, simply invoking
 
749
 *
 
750
 * <code>make</code>
 
751
 *
 
752
 * in the toplevel %Gecode directory will compile the whole library.
 
753
 *
 
754
 * \section CompExamples Running the examples
 
755
 *
 
756
 * After compiling the examples, they can be run directly from the command
 
757
 * line. For instance, try the %Golomb Rulers Problem:
 
758
 *
 
759
 * <code>./examples/golomb</code>
 
760
 *
 
761
 * or (when running Windows):
 
762
 *
 
763
 * <code>./examples/golomb.exe</code>
 
764
 * 
 
765
 * For more information on example scripts see \ref Example.
 
766
 *
 
767
 * \section DepMngmt Dependency management
 
768
 *
 
769
 * The dependencies between source files are not handled automatically. If you
 
770
 * are using a Gecode version from our subversion repository or if you
 
771
 * modified any of the source files, you will have to call
 
772
 * <code>make depend</code> before compilation in order to determine the
 
773
 * source dependencies.
 
774
 *
 
775
 * Dependency management is only needed for recompiling Gecode after changing
 
776
 * something. In an unmodified version (or after a <code>make clean</code>)
 
777
 * all files are compiled anyway.
 
778
 *
 
779
 * \section UnsupPlatfrms Compiling for unsupported platforms
 
780
 *
 
781
 * If you want to try compiling Gecode on a platform that we do not support
 
782
 * officially, you can override the platform tests during
 
783
 * <code>configure</code>. There are two options to specify the type of
 
784
 * platform:
 
785
 *
 
786
 *  - <code>--with-host-os=[linux|darwin|windows]</code>
 
787
 *  - <code>--with-compiler-vendor=[gnu|microsoft|intel]</code>
 
788
 *
 
789
 * Using the first option, you can state that your platform should behave like
 
790
 * Linux, Darwin (which is actually BSD), or Windows. This affects mainly
 
791
 * the filenames and the tools used to generate shared and static libraries.
 
792
 *
 
793
 * The second option says
 
794
 * that your compiler can be used very much like the gnu compiler
 
795
 * <code>gcc</code>, the Microsoft compiler <code>cl</code>, or the Intel
 
796
 * compiler <code>icl</code>. Please let us know of any successfull attempt at
 
797
 * compiling Gecode on other platforms.
 
798
 */
 
799
 
 
800
/**
 
801
 * \page PageChange Changelog
 
802
 *
 
803
 * A changelog will only be available after the first release.
 
804
 *
 
805
 * 
 
806
 */
 
807