|
Expression Templates Library (ETL)
|
Contains all the operators and functions to build expressions. More...
#include "etl/impl/dot.hpp"#include "etl/impl/sum.hpp"#include "etl/impl/norm.hpp"#include "etl/builder/binary_expression_builder.hpp"#include "etl/builder/wrapper_expression_builder.hpp"#include "etl/builder/view_expression_builder.hpp"#include "etl/builder/function_expression_builder.hpp"

Go to the source code of this file.
Namespaces | |
| etl | |
| Root namespace for the ETL library. | |
Typedefs | |
| template<typename E > | |
| using | etl::detail::value_return_t = std::conditional_t< decay_traits< E >::is_value, std::conditional_t< std::is_lvalue_reference_v< E >, std::conditional_t< std::is_const_v< std::remove_reference_t< E > >, const value_t< E > &, value_t< E > & >, value_t< E > >, value_t< E > > |
| Helper to compute the return type for max/min operation. | |
Functions | |
| template<typename E > | |
| auto | etl::operator- (E &&value) |
| template<typename E > | |
| auto | etl::operator+ (E &&value) |
| template<etl_expr E> | |
| auto | etl::abs (E &&value) |
| Apply absolute on each value of the given expression. More... | |
| template<etl_expr L, typename R > | |
| auto | etl::max (L &&lhs, R &&rhs) |
| Create an expression with the max value of lhs or rhs. More... | |
| template<etl_expr L, typename R > | |
| auto | etl::min (L &&lhs, R &&rhs) |
| Create an expression with the min value of lhs or rhs. More... | |
| template<etl_expr E> | |
| auto | etl::floor (E &&value) |
| Round down each values of the ETL expression. More... | |
| template<etl_expr E> | |
| auto | etl::ceil (E &&value) |
| Round up each values of the ETL expression. More... | |
| template<etl_expr E, arithmetic T> | |
| auto | etl::clip (E &&value, T min, T max) |
| Clip each values of the ETL expression between min and max. More... | |
| template<etl_expr E, arithmetic T> | |
| auto | etl::pow (E &&value, T v) |
| Apply pow(x, v) on each element x of the ETL expression. More... | |
| template<etl_expr E> | |
| auto | etl::pow_int (E &&value, size_t v) |
| Apply pow(x, v) on each element x of the ETL expression. More... | |
| template<etl_expr E, arithmetic T> | |
| auto | etl::pow_precise (E &&value, T v) |
| Apply pow(x, v) on each element x of the ETL expression. More... | |
| template<etl_expr E, arithmetic T> | |
| auto | etl::one_if (E &&value, T v) |
| Creates an expression with values of 1 where the ETL expression has a value of v. More... | |
| template<etl_expr E> | |
| auto | etl::one_if_max (E &&value) |
| Creates an expression with a value of 1 where the max value is and all zeroes other places. More... | |
| template<etl_complex_expr E> | |
| auto | etl::real (E &&value) |
| Extract the real part of each complex value of the given expression. More... | |
| template<etl_complex_expr E> | |
| auto | etl::imag (E &&value) |
| Extract the imag part of each complex value of the given expression. More... | |
| template<etl_complex_expr E> | |
| auto | etl::conj (E &&value) |
| Apply the conjugate operation on each complex value of the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::uniform_noise (E &&value) |
| Add some uniform noise (0, 1.0) to the given expression. More... | |
| template<etl_expr E, typename G > | |
| auto | etl::uniform_noise (G &g, E &&value) |
| Add some uniform noise (0, 1.0) to the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::normal_noise (E &&value) |
| Add some normal noise (0, 1.0) to the given expression. More... | |
| template<etl_expr E, typename G > | |
| auto | etl::normal_noise (G &g, E &&value) |
| Add some normal noise (0, 1.0) to the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::logistic_noise (E &&value) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<etl_expr E, typename G > | |
| auto | etl::logistic_noise (G &g, E &&value) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::state_logistic_noise (E &&value) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::state_logistic_noise (E &&value, const std::shared_ptr< void *> &states) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<typename G , etl_expr E> | |
| auto | etl::state_logistic_noise (G &g, E &&value) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<etl_expr E, typename G > | |
| auto | etl::state_logistic_noise (G &g, E &&value, const std::shared_ptr< void *> &states) |
| Add some normal noise (0, sigmoid(x)) to the given expression. More... | |
| template<etl_expr E, arithmetic T> | |
| auto | etl::ranged_noise (E &&value, T v) |
| Add some normal noise N(0,1) to x. No noise is added to values equal to zero or to given the value. More... | |
| template<size_t D1, size_t... D, etl_expr E> | |
| auto | etl::rep (E &&value) |
| Repeats the expression to the right (adds dimension after existing) More... | |
| template<size_t D1, size_t... D, etl_expr E> | |
| auto | etl::rep_r (E &&value) |
| Repeats the expression to the right (adds dimension after existing) More... | |
| template<size_t D1, size_t... D, etl_expr E> | |
| auto | etl::rep_l (E &&value) |
| Repeats the expression to the left (adds dimension before existing) More... | |
| template<typename... D, etl_expr E> | |
| auto | etl::rep (E &&value, size_t d1, D... d) |
| Repeats the expression to the right (adds dimension after existing) More... | |
| template<typename... D, etl_expr E> | |
| auto | etl::rep_r (E &&value, size_t d1, D... d) |
| Repeats the expression to the right (adds dimension after existing) More... | |
| template<typename... D, etl_expr E> | |
| auto | etl::rep_l (E &&value, size_t d1, D... d) |
| Repeats the expression to the left (adds dimension after existing) More... | |
| template<etl_expr E> | |
| auto | etl::argmax (E &&value) |
| Returns the indices of the maximum values in the first axis of the given matrix. If passed a vector, returns the index of the maximum element. More... | |
| template<etl_expr E> | |
| auto | etl::argmin (E &&value) |
| Returns the indices of the minimum values in the first axis of the given matrix. If passed a vector, returns the index of the mimimum element. More... | |
| template<matrix E> | |
| auto | etl::sum_r (E &&value) |
| Aggregate (sum) a dimension from the right. This effectively removes the last dimension from the expression and sums its values to the left. the last dimension from the expression and sums its values to the left. More... | |
| template<matrix E> | |
| auto | etl::sum_l (E &&value) |
| Aggregate (sum) a dimension from the left. This effectively removes the first dimension from the expression and sums its values to the right. More... | |
| template<matrix E> | |
| auto | etl::mean_r (E &&value) |
| Aggregate (average) a dimension from the right. This effectively removes the last dimension from the expression and averages its values to the left. More... | |
| template<matrix E> | |
| auto | etl::mean_l (E &&value) |
| Aggregate (average) a dimension from the left. This effectively removes the first dimension from the expression and averages its values to the right. More... | |
| template<etl_2d E> | |
| auto | etl::one_if_max_sub (const E &value) |
| Return, for each original position, 1.0 if the value is the max of the sub matrix, 0.0 otherwise. More... | |
| template<mat_or_vec E> | |
| auto | etl::hflip (const E &value) |
| Returns the horizontal flipping of the given expression. More... | |
| template<mat_or_vec E> | |
| auto | etl::vflip (const E &value) |
| Returns the vertical flipping of the given expression. More... | |
| template<mat_or_vec E> | |
| auto | etl::fflip (const E &value) |
| Returns the horizontal and vertical flipping of the given expression. More... | |
| template<mat_or_vec E> | |
| auto | etl::transpose (const E &value) |
| Returns the transpose of the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::trans (const E &value) |
| Returns the transpose of the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::conj_transpose (const E &value) |
| Returns the conjugate transpose of the given expression. More... | |
| template<etl_expr E> | |
| auto | etl::ctrans (const E &value) |
| Returns the conjugate transpose of the given expression. More... | |
| template<deep_mat E> | |
| auto | etl::transpose_front (const E &value) |
| Returns the transpose of the given expression. More... | |
| template<typename A > | |
| value_t< A > | etl::norm (const A &a) |
| Returns euclidean norm of the given expression. More... | |
| template<typename A , typename B > | |
| value_t< A > | etl::dot (const A &a, const B &b) |
| Returns the dot product of the two given expressions. More... | |
| template<etl_1d A, etl_1d B> | |
| etl::fast_vector< value_t< A >, 3 > | etl::cross (const A &a, const B &b) |
| Returns the dot product of the two given expressions. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::sum (E &&values) |
| Returns the sum of all the values contained in the given expression. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::asum (E &&values) |
| Returns the sum of all the absolute values contained in the given expression. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::mean (E &&values) |
| Returns the mean of all the values contained in the given expression. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::amean (E &&values) |
| Returns the mean of all the absolute values contained in the given expression. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::stddev (E &&values) |
| Returns the standard deviation of all the values contained in the given expression. More... | |
| template<etl_expr E> | |
| value_t< E > | etl::stddev (E &&values, value_t< E > mean) |
| Returns the standard deviation of all the values contained in the given expression. More... | |
| template<etl_expr E> | |
| size_t | etl::max_index (E &&values) |
| Returns the index of the maximum element contained in the expression. More... | |
| template<etl_expr E> | |
| detail::value_return_t< E > | etl::max (E &&values) |
| Returns the maximum element contained in the expression When possible, this returns a reference to the element. More... | |
| template<etl_expr E> | |
| size_t | etl::min_index (E &&values) |
| Returns the index of the minimum element contained in the expression. More... | |
| template<etl_expr E> | |
| detail::value_return_t< E > | etl::min (E &&values) |
| Returns the minimum element contained in the expression When possible, this returns a reference to the element. More... | |
| template<typename T = double> | |
| auto | etl::normal_generator (T mean=0.0, T stddev=1.0) |
| Create an expression generating numbers from a normal distribution. More... | |
| template<typename T = double, typename G > | |
| auto | etl::normal_generator (G &g, T mean=0.0, T stddev=1.0) |
| Create an expression generating numbers from a normal distribution using the given custom random engine. More... | |
| template<typename T = double> | |
| auto | etl::truncated_normal_generator (T mean=0.0, T stddev=1.0) |
| Create an expression generating numbers from a truncated normal distribution. More... | |
| template<typename T = double, typename G > | |
| auto | etl::truncated_normal_generator (G &g, T mean=0.0, T stddev=1.0) |
| Create an expression generating numbers from a truncated normal distribution using the given custom random engine. More... | |
| template<typename T = double> | |
| auto | etl::uniform_generator (T start, T end) |
| Create an expression generating numbers from an uniform distribution. More... | |
| template<typename T = double, typename G > | |
| auto | etl::uniform_generator (G &g, T start, T end) |
| Create an expression generating numbers from an uniform distribution using the given custom random engine. More... | |
| template<typename T = double> | |
| auto | etl::sequence_generator (T current=0) |
| Create an expression generating numbers from a consecutive sequence. More... | |
| template<typename T = float> | |
| auto | etl::dropout_mask (T probability) |
| Create an expression generating numbers for a dropout mask. More... | |
| template<typename T = float, typename G > | |
| auto | etl::dropout_mask (G &g, T probability) |
| Create an expression generating numbers for a dropout mask using the given custom random engine. More... | |
| template<typename T = float> | |
| auto | etl::state_dropout_mask (T probability) |
| Create an expression generating numbers for a dropout mask. More... | |
| template<typename T = float, typename G > | |
| auto | etl::state_dropout_mask (G &g, T probability) |
| Create an expression generating numbers for a dropout mask using the given custom random engine. More... | |
| template<typename T = float> | |
| auto | etl::inverted_dropout_mask (T probability) |
| Create an expression generating numbers for an inverted dropout mask. More... | |
| template<typename T = float, typename G > | |
| auto | etl::state_inverted_dropout_mask (G &g, T probability) |
| Create an expression generating numbers for an inverted dropout mask using the given custom random engine. More... | |
| template<typename T = float> | |
| auto | etl::state_inverted_dropout_mask (T probability) |
| Create an expression generating numbers for an inverted dropout mask. More... | |
| template<typename T = float, typename G > | |
| auto | etl::inverted_dropout_mask (G &g, T probability) |
| Create an expression generating numbers for an inverted dropout mask using the given custom random engine. More... | |
| template<etl_expr Expr> | |
| decltype(auto) | etl::operator* (Expr &&expr) |
| Force evaluation of an expression. More... | |
Contains all the operators and functions to build expressions.
1.8.13