HighMap library (C++)
Loading...
Searching...
No Matches
convolve.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
19#pragma once
20
21#include "highmap/array.hpp"
22#include "macrologger.h"
23
24namespace hmap
25{
26
46Array convolve1d_i(const Array &array, const std::vector<float> &kernel);
47
67Array convolve1d_j(const Array &array, const std::vector<float> &kernel);
68
83Array convolve2d(const Array &array, const Array &kernel);
84
100Array convolve2d_truncated(const Array &array, const Array &kernel);
101
123Array convolve2d_svd(const Array &z, const Array &kernel, int rank = 3);
124
150Array convolve2d_svd_rotated_kernel(const Array &z,
151 const Array &kernel,
152 int rank = 3,
153 int n_rotations = 6,
154 uint seed = 1);
155
156} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
unsigned int uint
Definition array.hpp:14
Definition algebra.hpp:28
Array convolve2d_svd(const Array &z, const Array &kernel, int rank=3)
Return the approximate convolution product of the array with a Singular Value Decomposition (SVD) of ...
Definition convolve2d_svd.cpp:19
Array convolve1d_j(const Array &array, const std::vector< float > &kernel)
Return the convolution product of the array with a 1D kernel along the 'j' direction.
Definition convolve.cpp:48
Array convolve2d_truncated(const Array &array, const Array &kernel)
Return the convolution product of the array with a given 2D kernel, with a truncated output size.
Definition convolve.cpp:94
Array convolve1d_i(const Array &array, const std::vector< float > &kernel)
Return the convolution product of the array with a 1D kernel along the 'i' direction.
Definition convolve.cpp:16
Array convolve2d(const Array &array, const Array &kernel)
Return the convolution product of the array with a given 2D kernel.
Definition convolve.cpp:81
Array convolve2d_svd_rotated_kernel(const Array &z, const Array &kernel, int rank=3, int n_rotations=6, uint seed=1)
Return the approximate convolution product of the array with a Singular Value Decomposition (SVD) of ...
Definition convolve2d_svd.cpp:68