cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
chip.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_CHIP_H
4#define pRC_CORE_FUNCTORS_CHIP_H
5
8
9namespace pRC
10{
11 template<Index... Ds>
12 struct Chip
13 {
14 template<class X, class... Is, If<All<IsConvertible<Is, Index>...>> = 0,
15 If<True<decltype(chip<Ds...>(declval<X>(),
16 declval<Is const>()...))>> = 0>
17 constexpr decltype(auto) operator()(X &&a, Is const... indices) const
18 {
19 return chip<Ds...>(forward<X>(a), indices...);
20 }
21 };
22}
23#endif // pRC_CORE_FUNCTORS_CHIP_H
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
Size Index
Definition type_traits.hpp:21
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
static constexpr auto chip(Sequence< T, Is... > const)
Definition sequence.hpp:551
Definition chip.hpp:13
constexpr decltype(auto) operator()(X &&a, Is const ... indices) const
Definition chip.hpp:17
Definition type_traits.hpp:38