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 "macrologger.h"
22
23#include "highmap/array.hpp"
24
25namespace hmap
26{
27
47Array convolve1d_i(const Array &array, const std::vector<float> &kernel);
48
68Array convolve1d_j(const Array &array, const std::vector<float> &kernel);
69
84Array convolve2d(const Array &array, const Array &kernel);
85
101Array convolve2d_truncated(const Array &array, const Array &kernel);
102
124Array convolve2d_svd(const Array &z, const Array &kernel, int rank = 3);
125
151Array convolve2d_svd_rotated_kernel(const Array &z,
152 const Array &kernel,
153 int rank = 3,
154 int n_rotations = 6,
155 std::uint32_t seed = 1);
156
157} // namespace hmap
158
159namespace hmap::gpu
160{
161
185Array sparse_max_convolution(const Array &array,
186 const Array &kernel,
187 float k_smoothmax = 0.f);
188
189} // namespace hmap::gpu
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition blending.hpp:186
Array sparse_max_convolution(const Array &array, const Array &kernel, float k_smoothmax=0.f)
Apply a sparse max-convolution.
Definition sparse_max_convolution.cpp:13
Definition algebra.hpp:23
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:21
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:34
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:67
Array convolve2d_svd_rotated_kernel(const Array &z, const Array &kernel, int rank=3, int n_rotations=6, std::uint32_t seed=1)
Return the approximate convolution product of the array with a Singular Value Decomposition (SVD) of ...
Definition convolve2d_svd.cpp:70
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:54