libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::CrossOver Struct Reference

Crossover functor. More...

#include <CRNGenetic.h>

Public Member Functions

template<typename T , typename URNG >
std::pair< std::vector< T >
, std::vector< T > > 
operator() (const std::vector< T > &idv1, const std::vector< T > &idv2, URNG &rng) const
 

Detailed Description

Crossover functor.

Creates two vectors from two parent vectors using complementary random strings from each one.

Definition at line 152 of file CRNGenetic.h.

Member Function Documentation

template<typename T , typename URNG >
std::pair<std::vector<T>, std::vector<T> > crn::CrossOver::operator() ( const std::vector< T > &  idv1,
const std::vector< T > &  idv2,
URNG &  rng 
) const
inline
Parameters
[in]idv1first parent
[in]idv2second parent
Exceptions
ExceptionDimensionparents do not have the same size
ExceptionInvalidArgumentparents are empty
Returns
a pair of children

Definition at line 161 of file CRNGenetic.h.


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