Skip to content
badcast edited this page Aug 29, 2023 · 1 revision

library-brainmap Wiki

Welcome to the library-brainmap wiki! This guide will provide you with detailed information about the basic_brain_map class and how to use its functionalities.

Table of Contents

Introduction

The basic_brain_map class is a versatile tool for creating and managing a basic brain map. It offers a range of methods for handling neurons, sites, and related operations.

Usage

Creating a Brain Map

To create a basic_brain_map instance, provide the dimensions when initializing:

brain::brain_map brainMap(xlength, ylength);

This creates a basic_brain_map object with the specified dimensions. You can replace xlength and ylength with the desired values for the horizontal and vertical dimensions. Manipulating Neurons and Sites

    clear(bool clearLocks = false): Clears neurons. Pass true to clear locks too.
    fill(bool fillLocks = false): Fills the map with data. Pass true to fill locks as well.
    randomize_hardware(int flagFilter = 0xdeadbeff): Randomizes data based on the filter.
    set_random_function(const randomize_function &randomizer): Sets a custom randomization function.
    create_maze(): Generates a maze on the map.
    create_maze_ex(...): Generates a maze on the map with more arguments.
    ...

Finding Neurons and Sites

find(navigate_result<list_type> &navResult, INeuron *firstNeuron, INeuron *lastNeuron): Finds neurons between two neurons.
find(navigate_result<list_type> &navResult, const ISite &first, const ISite &last): Finds sites between two locations.
...

Loading and Saving

load(const brain_breakfast &): Loads data into the brain map.
save(brain_breakfast *): Saves data from the brain map.

Contributing

Contributions are welcome! If you encounter issues or have suggestions for improvements, feel free to create an issue or submit a pull request.

License

This project is licensed under the GNU General Public License v3 (GPL-3.0)