PaGMO  1.1.5
Public Member Functions | Friends
pagmo::algorithm::nn_tsp Class Reference

Nearest Neighbor Algorithm (NN) More...

#include <nn_tsp.h>

Inheritance diagram for pagmo::algorithm::nn_tsp:
Inheritance graph
[legend]

Public Member Functions

 nn_tsp (int start_city=-1)
 Constructor. More...
 
base_ptr clone () const
 Clone method.
 
void evolve (population &) const
 Evolve implementation. More...
 
std::string get_name () const
 Algorithm name.
 
- Public Member Functions inherited from pagmo::algorithm::base
 base ()
 Default constructor. More...
 
virtual ~base ()
 Trivial destructor. More...
 
std::string human_readable () const
 Return human readable representation of the algorithm. More...
 
virtual std::string human_readable_extra () const
 Extra information in human readable format. More...
 
void set_screen_output (const bool p)
 Setter-Getter for protected m_screen_output data. More...
 
bool get_screen_output () const
 Gets screen output. More...
 
void reset_rngs (const unsigned int) const
 Resets the seed of the internal rngs using a user-provided seed. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from pagmo::algorithm::base
bool m_screen_output
 Indicates to the derived class whether to print stuff on screen.
 
rng_double m_drng
 Random number generator for double-precision floating point values.
 
rng_uint32 m_urng
 Random number generator for unsigned integer values.
 
unsigned int m_fevals
 A counter for the number of function evaluations.
 

Detailed Description

Nearest Neighbor Algorithm (NN)

The Nearest Neighbor algorithm generates a tour starting either from a single, in the input, specified vertex or loops over all possible initial vertices, computes the corresponding tours and returns the shortest tour.

Author
Ingmar Getzner (ingma.nosp@m.r.ge.nosp@m.tzner.nosp@m.@gma.nosp@m.il.co.nosp@m.m)

Definition at line 45 of file nn_tsp.h.

Constructor & Destructor Documentation

pagmo::algorithm::nn_tsp::nn_tsp ( int  start_city = -1)

Constructor.

Allows to specify in detail all the parameters of the algorithm.

Parameters
[in]start_cityFirst City in the tour.

Definition at line 43 of file nn_tsp.cpp.

Member Function Documentation

void pagmo::algorithm::nn_tsp::evolve ( population pop) const
virtual

Evolve implementation.

Runs the NN_TSP algorithm.

Parameters
[in,out]popinput/output pagmo::population to be evolved.

Implements pagmo::algorithm::base.

Definition at line 60 of file nn_tsp.cpp.


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