TRIQS/nda 2.0.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
mapped_functions.hpp
#include "./concepts.hpp"
#include "./macros.hpp"
#include "./map.hpp"
#include "./traits.hpp"
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <type_traits>
#include <utility>

Detailed Description

Provides some custom implementations of standard mathematical functions used for lazy, coefficient-wise array operations.

Definition in file mapped_functions.hpp.

Go to the source code of this file.

Functions

template<Array A>
auto nda::abs (A &&a)
 Function abs for nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::abs (S s)
 Function abs for nda::Scalar types (uses std::abs).
template<ArrayOrScalar A>
auto nda::abs2 (A &&a)
 Function abs2 for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::acos (A &&a)
 Function acos for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::acos (S s)
 Function acos for nda::Scalar types (uses std::acos).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::asin (A &&a)
 Function asin for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::asin (S s)
 Function asin for nda::Scalar types (uses std::asin).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::atan (A &&a)
 Function atan for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::atan (S s)
 Function atan for nda::Scalar types (uses std::atan).
template<ArrayOrScalar A>
decltype(auto) nda::conj (A &&a)
 Function conj for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types with a complex value type).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::cos (A &&a)
 Function cos for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::cos (S s)
 Function cos for nda::Scalar types (uses std::cos).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::cosh (A &&a)
 Function cosh for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::cosh (S s)
 Function cosh for nda::Scalar types (uses std::cosh).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::exp (A &&a)
 Function exp for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::exp (S s)
 Function exp for nda::Scalar types (uses std::exp).
template<Array A>
auto nda::floor (A &&a)
 Function floor for nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::floor (S s)
 Function floor for nda::Scalar types (uses std::floor).
template<ArrayOrScalar A>
auto nda::imag (A &&a)
 Function imag for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<typename A>
requires (Array<A> || is_complex_v<A>)
auto nda::isnan (A &&a)
 Function isnan for nda::Array types and complex nda::Scalar types (lazy and coefficient-wise for nda::Array types).
template<Scalar S>
requires (not is_complex_v<S>)
auto nda::isnan (S s)
 Function isnan for real nda::Scalar types (uses std::isnan).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::log (A &&a)
 Function log for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::log (S s)
 Function log for nda::Scalar types (uses std::log).
template<ArrayOrScalar A, ArrayOrScalar B>
requires (((Scalar<A> && Scalar<B>) || (Array<A> && Array<B> && get_rank<A> == get_rank<B>)) && !is_complex_v<get_value_t<A>> &&
!is_complex_v<get_value_t<B>>)
auto nda::max (A &&a, B &&b)
 Function max for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<ArrayOrScalar A, ArrayOrScalar B>
requires (((Scalar<A> && Scalar<B>) || (Array<A> && Array<B> && get_rank<A> == get_rank<B>)) && !is_complex_v<get_value_t<A>> &&
!is_complex_v<get_value_t<B>>)
auto nda::min (A &&a, B &&b)
 Function min for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<Array A, Scalar S>
auto nda::pow (A &&a, S p)
 Function pow for nda::Array types (lazy and coefficient-wise).
template<Scalar S, Scalar P>
auto nda::pow (S s, P p)
 Function pow for nda::Scalar types (uses std::pow).
template<ArrayOrScalar A>
auto nda::real (A &&a)
 Function real for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<ArrayOrScalar A>
auto nda::reciprocal (A &&a)
 Reciprocal function for nda::ArrayOrScalar types (lazy and coefficient-wise for nda::Array types).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::sin (A &&a)
 Function sin for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::sin (S s)
 Function sin for nda::Scalar types (uses std::sin).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::sinh (A &&a)
 Function sinh for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::sinh (S s)
 Function sinh for nda::Scalar types (uses std::sinh).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::sqrt (A &&a)
 Function sqrt for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::sqrt (S s)
 Function sqrt for nda::Scalar types (uses std::sqrt).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::tan (A &&a)
 Function tan for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::tan (S s)
 Function tan for nda::Scalar types (uses std::tan).
template<Array A>
requires (get_algebra<A> != 'M')
auto nda::tanh (A &&a)
 Function tanh for non-matrix nda::Array types (lazy and coefficient-wise).
template<Scalar S>
auto nda::tanh (S s)
 Function tanh for nda::Scalar types (uses std::tanh).