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

Fixed 2-D convolution kernels for continuous cellular automata. More...

#include <array>
#include <cstddef>
#include <initializer_list>
#include <memory>
#include <type_traits>
#include <ah-errors.H>
#include <al-domain.H>
#include <al-matrix.H>
#include <ca-traits.H>
Include dependency graph for ca-kernels.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::CA::Kernel2D< T, Rows, Cols >
 Dense odd-sized 2-D convolution kernel. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::CA
 

Functions

template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::laplacian_5p_kernel () noexcept
 Return the 5-point discrete Laplacian kernel.
 
template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::laplacian_9p_kernel () noexcept
 Return the isotropic 9-point discrete Laplacian kernel.
 
template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::mean_3x3_kernel () noexcept
 Return a 3x3 mean filter.
 
template<typename T = double>
constexpr Kernel2D< T, 5, 5 > Aleph::CA::mean_5x5_kernel () noexcept
 Return a 5x5 mean filter.
 
template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::sobel_x_kernel () noexcept
 Return the horizontal Sobel gradient kernel.
 
template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::sobel_y_kernel () noexcept
 Return the vertical Sobel gradient kernel.
 
template<typename T = double>
constexpr Kernel2D< T, 3, 3 > Aleph::CA::gaussian_3x3_kernel () noexcept
 Return the separable 3x3 Gaussian blur kernel.
 
template<typename T = double>
constexpr Kernel2D< T, 5, 5 > Aleph::CA::gaussian_5x5_kernel () noexcept
 Return the separable 5x5 Gaussian blur kernel.
 

Detailed Description

Fixed 2-D convolution kernels for continuous cellular automata.

Phase 9 introduces real-valued neighbourhoods for reaction-diffusion and image-like CA rules. Kernel2D<T, Rows, Cols> stores a small odd kernel in row-major order and exposes helpers that match the canonical Moore<2, R> neighbour order used by tpl_ca_neighborhood.H.

Predefined kernels include 5-point and 9-point Laplacians, mean filters, Sobel gradients and Gaussian smoothers. Small kernels use a fixed std::array for zero-allocation hot loops; to_matrix() exports the same weights into Aleph::Matrix<int, int, T> when sparse matrix tooling is more convenient for larger analysis pipelines.

Author
Leandro Rabindranath Leon

Definition in file ca-kernels.H.