Generated on Mon Sep 17 2012 22:20:52 for Gecode by doxygen 1.8.1.1
TSP Class Reference

Example: Travelling salesman problem (TSP) More...

List of all members.

Public Member Functions

 TSP (const SizeOptions &opt)
 Actual model.
virtual IntVar cost (void) const
 Return solution cost.
 TSP (bool share, TSP &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os) const
 Print solution.
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (void)
 Default constructor.
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning.
virtual void compare (const Space &, std::ostream &os) const
 Compare with s.

Protected Attributes

Problem p
 Problem instance to be solved.
IntVarArray succ
 Successor edges.
IntVar total
 Total cost of travel.

Related Functions

(Note that these are not member functions.)

int main (int argc, char *argv[])
 Main-function.

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt)

Detailed Description

Example: Travelling salesman problem (TSP)

Simple travelling salesman problem instances. Just meant as a test for circuit.

Definition at line 231 of file tsp.cpp.


Constructor & Destructor Documentation

TSP::TSP ( const SizeOptions opt)
inline

Actual model.

Definition at line 241 of file tsp.cpp.

TSP::TSP ( bool  share,
TSP s 
)
inline

Constructor for cloning s.

Definition at line 279 of file tsp.cpp.


Member Function Documentation

virtual IntVar TSP::cost ( void  ) const
inlinevirtual

Return solution cost.

Definition at line 275 of file tsp.cpp.

virtual Space* TSP::copy ( bool  share)
inlinevirtual

Copy during cloning.

Definition at line 285 of file tsp.cpp.

virtual void TSP::print ( std::ostream &  os) const
inlinevirtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 290 of file tsp.cpp.


Friends And Related Function Documentation

int main ( int  argc,
char *  argv[] 
)
related

Main-function.

Definition at line 323 of file tsp.cpp.


Member Data Documentation

Problem TSP::p
protected

Problem instance to be solved.

Definition at line 234 of file tsp.cpp.

IntVarArray TSP::succ
protected

Successor edges.

Definition at line 236 of file tsp.cpp.

IntVar TSP::total
protected

Total cost of travel.

Definition at line 238 of file tsp.cpp.


The documentation for this class was generated from the following file: