Skip to content

uaineteine/Floodfiller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floodfill

A c++ floodfiller and cell size calculator for 4-square connections.

Getting Started

There are 2 classes: a 'floodfiller' and 'floodfillersize' class for 2 different purposes. The floodfiller is designed to perform a flood fille to an integer or boolean map and overwrite the input given. The floodfillersize uses the floodfiller algorithm to give back the size of that 'chamber'.

The following will return the size of an int/boolean 2d matrix as well as overwrite that data.

floodfiller filler = floodfiller(Width, Height);
int size = filler.floodfill(matrix, pos1, pos2, cor);

The following will return the size of an int/boolean 2d matrix but not overwrite that data.

floodfillersize filler = floodfillersize(Width, Height);
int size = filler.getSize(matrix, pos1, pos2);
  • Note this is handled with static memory for performance where the maximum length is given by the maplen.h file.

See the myfloodfill.cpp file for execution of various problems.

Authors

  • Daniel Stamer-Squair - UaineTeine

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A c++ floodfilling algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages