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

A topology where every island is connected to every other island. More...

#include <FullyConnectedTopology.h>

Inheritance diagram for galib::FullyConnectedTopology:
[legend]

Public Member Functions

 FullyConnectedTopology (const std::size_t num_nodes)
 Constructs a fully connected topology for num_nodes nodes.
 
internal::NodeLinks getLinks (const std::size_t node) const override
 Returns all nodes (except node) as both 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 every island is connected to every other island.

High connectivity results in rapid convergence as elite individuals spread throughout the archipelago quickly.

Definition at line 16 of file FullyConnectedTopology.h.

Constructor & Destructor Documentation

◆ FullyConnectedTopology()

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

Constructs a fully connected topology for num_nodes nodes.

Definition at line 19 of file FullyConnectedTopology.h.

Member Function Documentation

◆ getLinks()

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

Returns all nodes (except node) as both input and output neighbors.

Parameters
nodeLocal node ID.
Returns
Links to every other node in the network.

Implements galib::Topology.

Definition at line 26 of file FullyConnectedTopology.h.

References galib::Topology::getNumNodes(), galib::internal::NodeLinks::neighbors_in, and galib::internal::NodeLinks::neighbors_out.


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