PaGMO  1.1.5
Static Public Member Functions
pagmo::util::neighbourhood::euclidian Class Reference

#include <neighbourhood.h>

Static Public Member Functions

static void compute_neighbours (std::vector< std::vector< pagmo::population::size_type > > &, const std::vector< std::vector< double > > &)
 
static double distance (const std::vector< double > &, const std::vector< double > &)
 

Detailed Description

Build a neighbourhood graph for vectors of real numbers using the euclidian distance

Author
Andrea Mambrini (andre.nosp@m.a.ma.nosp@m.mbrin.nosp@m.i@gm.nosp@m.ail.c.nosp@m.om)

Definition at line 69 of file neighbourhood.h.

Member Function Documentation

void pagmo::util::neighbourhood::euclidian::compute_neighbours ( std::vector< std::vector< pagmo::population::size_type > > &  retval,
const std::vector< std::vector< double > > &  weights 
)
static

Compute the neighbourhood graph. At the end of the call retval[i][j] will contain the j-th closest vector (according to the euclidian distance) to the i-th vector.

Parameters
[out]retvala matrix representing the neigborhood graph
[in]weightsthe vector of real vectors

Definition at line 20 of file neighbourhood.cpp.

double pagmo::util::neighbourhood::euclidian::distance ( const std::vector< double > &  a,
const std::vector< double > &  b 
)
static

Compute the euclidian distance between two real vectors

Parameters
afirst vector
bsecond vector
Returns
euclidian distance between the vectors

Definition at line 36 of file neighbourhood.cpp.


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