Ponca  4d2a58fa5c6375adef5c4b208f4d47e016cecd6d
Point Cloud Analysis library
Loading...
Searching...
No Matches
concepts.h
1#pragma once
2
3#include "../concepts.h"
4
5namespace Ponca
6{
17 template <typename T>
18 concept ProvidesComputeState = ProvidesCommonTypes<T> && requires(T t, const T ct) {
19 { ct.isStable() } -> std::same_as<bool>;
20 { ct.isReady() } -> std::same_as<bool>;
21 { ct.getCurrentState() } -> std::same_as<FIT_RESULT>;
22 };
26 template <typename T>
27 concept ProvidesBasketUnitBase = ProvidesCommonTypes<T> && ProvidesComputeState<T> && requires(T t, const T ct) {
28 typename T::NeighborFilter;
29 t.setNeighborFilter(typename T::NeighborFilter{});
30 { ct.getNeighborFilter() } -> std::convertible_to<typename T::NeighborFilter>;
31
32 { ct.getWeightSum() } -> std::same_as<typename T::Scalar>;
33 { ct.getNumNeighbors() } -> std::integral;
34 };
35
39 template <typename T>
40 concept ProvidesBasketDiffUnitBase = ProvidesBasketUnitBase<T> && requires(T t, const T ct) {
41 { ct.isScaleDer() } -> std::same_as<bool>;
42 { ct.isSpaceDer() } -> std::same_as<bool>;
43 { ct.derDimension() } -> std::integral;
44 };
45
46} // namespace Ponca
This concept ensures that the default types and accessors in a BasketDiff are well-formed.
Definition concepts.h:40
This concept ensures that the default types and accessors in a Basket are well-formed.
Definition concepts.h:27
This concept if currently only used a base concept for ProvidesBasketUnitBase.
Definition concepts.h:18
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition concepts.h:11