Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_neighborhoods_example.cc File Reference

Pretty-print every neighborhood in the Phase 2 catalogue. More...

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <ca-traits.H>
#include <tpl_ca_neighborhood.H>
Include dependency graph for ca_neighborhoods_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Pretty-print every neighborhood in the Phase 2 catalogue.

For each 2D neighborhood (Moore<2,1>, Moore<2,2>, Von_Neumann<2,1>, Von_Neumann<2,2>, Hex_Neighborhood, Triangular_Neighborhood with both parities, plus a Custom example) the example draws a compact ASCII grid where:

o = the centre cell # = a neighbour reported by for_each_offset . = an unrelated cell (within the bounding box)

It also prints the runtime values of radius() and size() so the user can sanity-check the catalogue at a glance.

Definition in file ca_neighborhoods_example.cc.

Function Documentation

◆ main()

int main ( void  )