|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Abstract base class for archipelago topologies. More...
#include <Topology.h>
Public Member Functions | |
| virtual | ~Topology ()=default |
| Topology (const std::size_t num_nodes) | |
| Constructs a topology for a specific number of nodes. | |
| virtual internal::NodeLinks | getLinks (std::size_t node) const =0 |
| Determines the neighbors for a specific island rank. | |
Protected Member Functions | |
| std::size_t | getNumNodes () const |
| Returns the total number of nodes in the topology. | |
Abstract base class for archipelago topologies.
Defines the logical connectivity between islands in a distributed parallel GA.
Definition at line 28 of file Topology.h.
|
virtualdefault |
|
inlineexplicit |
Constructs a topology for a specific number of nodes.
| num_nodes | Total islands in the archipelago. Must be >= 2. |
| std::invalid_argument | if num_nodes < 2. |
Definition at line 44 of file Topology.h.
|
pure virtual |
Determines the neighbors for a specific island rank.
| node | The rank/ID of the local island. |
Implemented in galib::BidirectionalRingTopology, galib::FullyConnectedTopology, and galib::OneWayRingTopology.
|
inlineprotected |
Returns the total number of nodes in the topology.
Definition at line 34 of file Topology.h.
Referenced by galib::BidirectionalRingTopology::getLinks(), galib::FullyConnectedTopology::getLinks(), and galib::OneWayRingTopology::getLinks().