Loading...
Searching...
No Matches
parameter.h
Go to the documentation of this file.
1#ifndef _BBM_PARAMETER_CONCEPT_H_
2#define _BBM_PARAMETER_CONCEPT_H_
3
4#include "concepts/util.h"
5#include "bbm/config.h"
6#include "util/vector_util.h"
7
8/************************************************************************/
9/*! \file parameter.h
10 \brief Concepts related to BSDF model parameters
11*************************************************************************/
12
13namespace bbm {
14 namespace concepts {
15
16 /********************************************************************/
17 /*! \brief Basic parameter concept
18
19 A parameter list must be:
20 + std::ranges::range
21 + concepts::has_basic_math
22 ********************************************************************/
23 template<typename PARAM>
24 concept parameter = std::ranges::range<PARAM> && concepts::has_basic_math<PARAM>;
25
26
27 namespace archetype {
28 //! \brief Archetype of a non-differentiable parameter
29 template<typename CONF=concepts::archetype::config>
31 } // end archetype namespace
32
33
35
36
37 /********************************************************************/
38 /*! \brief Differentiable parameter concept
39
40 A differentiable parameter list must be:
41 + concepts::parameter
42 + its value type must support differentiation
43 *********************************************************************/
44 template<typename PARAM>
45 concept diff_parameter = requires(PARAM param)
46 {
48 requires is_diff_v< decltype(*std::begin(param)) >;
49 };
50
51
52 namespace archetype {
53 //! \brief Archetype of a differentiable parameter
54 template<typename CONF=concepts::archetype::config>
56 } // end archetype namespace
57
58 } // end concepts namespace
59} // end bbm namespace
60
61#endif /* _BBM_PARAMETER_CONCEPT_H_ */
All BBM methods are defined to operate on a variety of value types and spectrum types....
Definition: vector_util.h:27
Differentiable parameter concept.
Definition: parameter.h:45
Definition: util.h:97
Basic parameter concept.
Definition: parameter.h:24
#define BBM_CHECK_CONCEPT(CONCEPTNAME, CLASSNAME,...)
Check a class for a concept with bbm::concepts::archetypes in the namespace.
Definition: macro.h:35
Definition: aggregatebsdf.h:29
Additional basic helper concepts.
Extensions for the STL vector class.