![]() |
IgANet
IgANets - Isogeometric Analysis Networks
|
Container utility functions. More...
#include <array>
#include <initializer_list>
#include <vector>
#include <options.hpp>
#include <torch/torch.h>
Go to the source code of this file.
Namespaces | |
namespace | iganet |
namespace | iganet::utils |
Functions | |
template<typename T , typename U , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::make_array (std::array< U, N > array) |
Creates an std::array object from another std::array object. | |
template<typename T , std::size_t N> | |
constexpr auto | iganet::utils::make_array (T value) |
Creates an std::array object filled with a constant. | |
template<typename T , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::operator* (std::array< T, N > lhs, std::array< T, N > rhs) |
Multiplies two std::arrays. | |
template<typename T , std::size_t N> | |
constexpr auto | iganet::utils::operator+ (std::array< T, N > array, T data) |
Appends data to a std::array object. | |
template<typename T , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::operator+ (std::array< T, N > lhs, std::array< T, N > rhs) |
Adds two std::arrays. | |
template<typename T > | |
constexpr auto | iganet::utils::operator+ (std::vector< T > vector, T data) |
Appends data to a std::vector object. | |
template<typename T , std::size_t N> | |
constexpr auto | iganet::utils::operator+ (T data, std::array< T, N > array) |
Prepends data to a std::array object. | |
template<typename T > | |
constexpr auto | iganet::utils::operator+ (T data, std::vector< T > vector) |
Prepends data to a std::vector object. | |
template<typename T > | |
constexpr auto | iganet::utils::operator+ (T data, torch::ArrayRef< T > array) |
Prepends data to a torch::ArrayRef object. | |
template<typename T > | |
constexpr auto | iganet::utils::operator+ (torch::ArrayRef< T > array, T data) |
Appends data to a torch::ArrayRef object. | |
template<typename T , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::operator- (std::array< T, N > array) |
Negates all entries of an std::array. | |
template<typename T , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::operator- (std::array< T, N > lhs, std::array< T, N > rhs) |
Subtracts one std::array from another std::array. | |
template<typename T , std::size_t N> | |
constexpr std::array< T, N > | iganet::utils::operator/ (std::array< T, N > lhs, std::array< T, N > rhs) |
Divides one std::array by another std::array. | |
template<typename T , std::size_t N, std::size_t M = 1> | |
constexpr std::array< T, N - M > | iganet::utils::remove_from_back (std::array< T, N > array) |
Derives an std::array object from a given std::array object dropping the last M entries. | |
template<typename T , std::size_t N, std::size_t M = 1> | |
constexpr std::array< T, N - M > | iganet::utils::remove_from_front (std::array< T, N > array) |
Derives an std::array object from a given std::array object dropping the first M entries. | |
template<typename... Args> | |
auto | iganet::utils::to_array (Args &&...args) |
Converts a list of arguments into std::array. | |
template<std::size_t N, typename T > | |
std::array< T, N > | iganet::utils::to_array (std::vector< T > &&vector) |
Converts an std::vector object into std::array. | |
template<typename T , std::size_t N> | |
auto | iganet::utils::to_ArrayRef (const std::array< T, N > &array) |
Converts an std::array<int64_t, N> to a at::IntArrayRef object. | |
template<typename... Args> | |
auto | iganet::utils::to_vector (Args &&...args) |
Converts a list of arguments into std::vector. | |
template<typename T , std::size_t N> | |
std::vector< T > | iganet::utils::to_vector (std::array< T, N > &&array) |
Converts an std::array object into std::vector. | |
Container utility functions.
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/.