Provides link operations.
More...
#include <lab.h>
|
| static void | link (const std::shared_ptr< cell > &c1, const std::shared_ptr< cell > &c2, bool bidi=true) noexcept |
| | Links two cell objects, optionally in both directions.
|
| |
| static void | unlink (const std::shared_ptr< cell > &c1, const std::shared_ptr< cell > &c2, bool bidi=true) noexcept |
| | Unlinks two cell objects, optionally in both directions.
|
| |
| static void | set_neighbors (configurator const &config, const std::vector< int > &indices, std::vector< std::shared_ptr< cell > > &cells_to_set) noexcept |
| | Sets neighbors for a collection of cells based on the provided indices.
|
| |
Provides link operations.
Provides link operations
◆ link()
| static void mazes::lab::link |
( |
const std::shared_ptr< cell > & | c1, |
|
|
const std::shared_ptr< cell > & | c2, |
|
|
bool | bidi = true ) |
|
staticnoexcept |
Links two cell objects, optionally in both directions.
- Parameters
-
| c1 | A shared pointer to the first cell object. |
| c2 | A shared pointer to the second cell object. |
| bidi | A boolean flag indicating if the link should be bidirectional. Defaults to true. |
◆ set_neighbors()
| static void mazes::lab::set_neighbors |
( |
configurator const & | config, |
|
|
const std::vector< int > & | indices, |
|
|
std::vector< std::shared_ptr< cell > > & | cells_to_set ) |
|
staticnoexcept |
Sets neighbors for a collection of cells based on the provided indices.
- Parameters
-
| config | The configurator containing maze configuration parameters. |
| indices | A vector of indices representing the cells to set neighbors for. |
| cells_to_set | A vector of cell objects to set neighbors for. |
This function uses the configurator to determine the maze structure and sets neighbors accordingly.
◆ unlink()
| static void mazes::lab::unlink |
( |
const std::shared_ptr< cell > & | c1, |
|
|
const std::shared_ptr< cell > & | c2, |
|
|
bool | bidi = true ) |
|
staticnoexcept |
Unlinks two cell objects, optionally in both directions.
- Parameters
-
| c1 | A shared pointer to the first cell object. |
| c2 | A shared pointer to the second cell object. |
| bidi | A boolean flag indicating if the unlink should be bidirectional. Defaults to true. |
The documentation for this class was generated from the following file: