Vita
Public Types | Public Member Functions | Public Attributes | List of all members
vita::basic_gene< K > Class Template Reference

A gene is a unit of heredity in a living organism. More...

#include <gene.h>

Public Types

enum  : decltype(K) { k_args = K }
 
using arg_pack = small_vector< packed_index_t, K >
 
using packed_index_t = std::uint16_t
 

Public Member Functions

small_vector< locus, K > arguments () const
 
 basic_gene (const std::pair< symbol *, std::vector< index_t > > &)
 
 basic_gene (const symbol &, index_t, index_t)
 
 basic_gene (const terminal &)
 
locus locus_of_argument (std::size_t) const
 

Public Attributes

arg_pack args
 
terminal_param_t par
 
const symbolsym
 

Detailed Description

template<unsigned K>
class vita::basic_gene< K >

A gene is a unit of heredity in a living organism.

Template Parameters
Kthe maximum function's number of arguments

The class gene is the building block of a i_mep individual.

Definition at line 33 of file gene.h.

Member Typedef Documentation

◆ arg_pack

template<unsigned K>
using vita::basic_gene< K >::arg_pack = small_vector<packed_index_t, K>

Definition at line 46 of file gene.h.

◆ packed_index_t

template<unsigned K>
using vita::basic_gene< K >::packed_index_t = std::uint16_t

Definition at line 45 of file gene.h.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned K>
anonymous enum : decltype(K)

Definition at line 48 of file gene.h.

Constructor & Destructor Documentation

◆ basic_gene()

template<unsigned K>
vita::basic_gene< K >::basic_gene ( )
inline

Definition at line 36 of file gene.h.

Member Data Documentation

◆ args

template<unsigned K>
arg_pack vita::basic_gene< K >::args

Definition at line 53 of file gene.h.

◆ par

template<unsigned K>
terminal_param_t vita::basic_gene< K >::par

Definition at line 52 of file gene.h.

◆ sym

template<unsigned K>
const symbol* vita::basic_gene< K >::sym

Definition at line 51 of file gene.h.


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