IgANet
IGAnets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
tuple.hpp File Reference

Tuple utility functions. More...

#include <tuple>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Classes

struct  iganet::utils::is_tuple< T >
 Type trait for std::tuple type. More...
 
struct  iganet::utils::is_tuple< std::tuple< Ts... > >
 
struct  iganet::utils::is_tuple_of_tuples< T >
 Type trait for std::tuple<std::tuple> type. More...
 
struct  iganet::utils::is_tuple_of_tuples< std::tuple< Ts... > >
 
struct  iganet::utils::tuple_cat< std::tuple< Ts... >, Tuples... >
 
struct  iganet::utils::tuple_cat< T, Tuples... >
 
struct  iganet::utils::tuple_cat<>
 

Namespaces

namespace  iganet
 
namespace  iganet::utils
 

Typedefs

template<class T >
using iganet::utils::is_tuple_of_tuples_t = is_tuple_of_tuples< T >::type
 Alias for is_tuple_of_tuples::type.
 
template<typename... Tuples>
using iganet::utils::tuple_cat_t = tuple_cat< Tuples... >::type
 Alias for tuple_cat::type.
 

Functions

template<typename... Tensors, typename Func >
torch::Tensor iganet::utils::cat_tuple_into_tensor (const std::tuple< Tensors... > &tensors, Func &&func, int64_t dim=0)
 Concatenates the entries of a std::tuple object into a single Torch tensor along the given dimension after applying the callback function.
 
template<typename... Tensors>
torch::Tensor iganet::utils::cat_tuple_into_tensor (const std::tuple< Tensors... > &tensors, int64_t dim=0)
 Concatenates the entries of a std::tuple object into a single Torch tensor along the given dimension.
 
template<std::size_t N, typename T >
constexpr auto iganet::utils::repeat_tuple (const T &value)
 Returns a std::tuple object with N replications of the given value.
 

Variables

template<class T >
constexpr auto iganet::utils::is_tuple_of_tuples_v = is_tuple_of_tuples<T>::value
 Alias for is_tuple_of_tuples::value.
 
template<class T >
constexpr bool iganet::utils::is_tuple_v = is_tuple<T>::value
 
template<typename... Tuples>
constexpr auto iganet::utils::tuple_cat_v = tuple_cat<Tuples...>::value
 Alias for tuple_cat::value.
 

Detailed Description

Tuple utility functions.

Author
Matthias Moller

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


Class Documentation

◆ iganet::utils::tuple_cat< std::tuple< Ts... >, Tuples... >

struct iganet::utils::tuple_cat< std::tuple< Ts... >, Tuples... >
template<typename... Ts, typename... Tuples>
struct iganet::utils::tuple_cat< std::tuple< Ts... >, Tuples... >
Class Members
typedef decltype(tuple_cat(declval< tuple< Ts... > >(), type >())) type

◆ iganet::utils::tuple_cat< T, Tuples... >

struct iganet::utils::tuple_cat< T, Tuples... >
template<typename T, typename... Tuples>
struct iganet::utils::tuple_cat< T, Tuples... >
Class Members
typedef decltype(tuple_cat(declval< tuple< T > >(), type >())) type

◆ iganet::utils::tuple_cat<>

struct iganet::utils::tuple_cat<>
Class Members
typedef tuple<> type