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

Phase 9 tests for ca-kernels.H. More...

#include <array>
#include <stdexcept>
#include <gtest/gtest.h>
#include <ca-kernels.H>
#include <ca-traits.H>
Include dependency graph for ca_kernels_test.cc:

Go to the source code of this file.

Functions

 TEST (CAKernels, Laplacian5pHasExpectedWeightsAndZeroMass)
 
 TEST (CAKernels, Laplacian9pAndSmoothersHaveExpectedMass)
 
 TEST (CAKernels, ApplyUsesCentreAndMooreOrderedNeighbours)
 
 TEST (CAKernels, SobelDetectsLinearGradients)
 
 TEST (CAKernels, MatrixExportPreservesWeights)
 
 TEST (CAKernels, ValidatesShapeAndBounds)
 

Detailed Description

Phase 9 tests for ca-kernels.H.

Coverage:

  • Built-in Laplacian, mean, Sobel and Gaussian kernels.
  • Canonical neighbour-weight ordering compatible with Moore<2, R>.
  • Kernel application on scalar neighbourhood buffers.
  • Export to Aleph::Matrix for matrix-backed inspection.
  • Shape and bounds validation.

Definition in file ca_kernels_test.cc.

Function Documentation

◆ TEST() [1/6]

TEST ( CAKernels  ,
ApplyUsesCentreAndMooreOrderedNeighbours   
)

◆ TEST() [2/6]

TEST ( CAKernels  ,
Laplacian5pHasExpectedWeightsAndZeroMass   
)

Definition at line 43 of file ca_kernels_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and k.

◆ TEST() [3/6]

TEST ( CAKernels  ,
Laplacian9pAndSmoothersHaveExpectedMass   
)

Definition at line 63 of file ca_kernels_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [4/6]

TEST ( CAKernels  ,
MatrixExportPreservesWeights   
)

Definition at line 127 of file ca_kernels_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), k, and m.

◆ TEST() [5/6]

TEST ( CAKernels  ,
SobelDetectsLinearGradients   
)

Definition at line 99 of file ca_kernels_test.cc.

References Aleph::blossom_maximum_cardinality_matching().

◆ TEST() [6/6]

TEST ( CAKernels  ,
ValidatesShapeAndBounds   
)

Definition at line 137 of file ca_kernels_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and k.