GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
Public Member Functions | List of all members
galib::BidirectionalRingTopology Class Reference

A topology where islands are connected in a bidirectional circle. More...

#include <BidirectionalRingTopology.h>

Inheritance diagram for galib::BidirectionalRingTopology:
[legend]

Public Member Functions

 BidirectionalRingTopology (const std::size_t num_nodes)
 Constructs a bidirectional ring topology for num_nodes nodes.
 
internal::NodeLinks getLinks (const std::size_t node) const override
 Returns both adjacent nodes as input and output neighbors.
 
- Public Member Functions inherited from galib::Topology
virtual ~Topology ()=default
 
 Topology (const std::size_t num_nodes)
 Constructs a topology for a specific number of nodes.
 

Additional Inherited Members

- Protected Member Functions inherited from galib::Topology
std::size_t getNumNodes () const
 Returns the total number of nodes in the topology.
 

Detailed Description

A topology where islands are connected in a bidirectional circle.

Similar to the one-way ring but allows genetic material to flow in both directions between neighbors.

Definition at line 16 of file BidirectionalRingTopology.h.

Constructor & Destructor Documentation

◆ BidirectionalRingTopology()

galib::BidirectionalRingTopology::BidirectionalRingTopology ( const std::size_t  num_nodes)
inlineexplicit

Constructs a bidirectional ring topology for num_nodes nodes.

Definition at line 19 of file BidirectionalRingTopology.h.

Member Function Documentation

◆ getLinks()

internal::NodeLinks galib::BidirectionalRingTopology::getLinks ( const std::size_t  node) const
inlineoverridevirtual

Returns both adjacent nodes as input and output neighbors.

Parameters
nodeLocal node ID.
Returns
Neighbors in a two-way ring.

Implements galib::Topology.

Definition at line 26 of file BidirectionalRingTopology.h.

References galib::Topology::getNumNodes().


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