TRIQS/nda 1.3.0
Multi-dimensional array library for C++
|
#include "./concepts.hpp"
#include "./layout/for_each.hpp"
#include "./traits.hpp"
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <type_traits>
#include <utility>
Provides various algorithms to be used with nda::Array objects.
Definition in file algorithms.hpp.
Go to the source code of this file.
Functions | |
template<Array A> | |
bool | nda::all (A const &a) |
Do all elements of the array evaluate to true? | |
template<Array A> | |
bool | nda::any (A const &a) |
Does any of the elements of the array evaluate to true? | |
template<Array A, typename F > | |
auto | nda::fold (F f, A const &a) |
The same as nda::fold, except that the initial value is a default constructed value type of the array. | |
template<Array A, typename F , typename R > | |
auto | nda::fold (F f, A const &a, R r) |
Perform a fold operation on the given nda::Array object. | |
template<ArrayOfRank< 2 > A> | |
double | nda::frobenius_norm (A const &a) |
Calculate the Frobenius norm of a 2-dimensional array. | |
template<Array A> | |
auto | nda::max_element (A const &a) |
Find the maximum element of an array. | |
template<Array A> | |
auto | nda::min_element (A const &a) |
Find the minimum element of an array. | |
template<Array A> requires (nda::is_scalar_v<get_value_t<A>>) | |
auto | nda::product (A const &a) |
Multiply all the elements of an nda::Array object. | |
template<Array A> requires (nda::is_scalar_v<get_value_t<A>>) | |
auto | nda::sum (A const &a) |
Sum all the elements of an nda::Array object. | |