45 const std::vector<size_t> &axes);
62 const std::vector<size_t> &axes);
79 const std::vector<size_t> &axes);
96 const std::vector<size_t> &axes);
113 const std::vector<size_t> &axes);
130 const std::vector<size_t> &axes);
227 const std::vector<size_t> &axes)
228 requires(std::convertible_to<T, bool>);
245 const std::vector<size_t> &axes)
246 requires(std::convertible_to<T, bool>);
346 static void verify_parameters(
const txeo::Tensor<T> &tensor,
const std::vector<size_t> &axes);
349 std::function<T(std::vector<T> &)>);
352 std::function<
size_t(std::vector<T> &)>);
354 static T median(std::vector<T> &values);
355 static T geometric_mean(std::vector<T> &values);
356 static T variance(std::vector<T> &values);
357 static T maximum_norm(std::vector<T> &values);
367 using std::runtime_error::runtime_error;
Exceptions concerning txeo::TensorAgg.
A utility class for aggregation functions on tensors.
static T sum_all(const txeo::Tensor< T > &tensor)
Computes the sum of all elements in the tensor.
static txeo::Tensor< T > reduce_maximum_norm(const txeo::Tensor< T > &tensor, size_t axis)
Computes the maximum norm of tensor elements along the specified axis.
static txeo::Tensor< T > reduce_max(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the maximum of tensor elements along the specified axes.
static txeo::Tensor< size_t > arg_max(const txeo::Tensor< T > &tensor, size_t axis)
Finds the indices of the maximum values along the specified axis.
static txeo::Tensor< T > reduce_any(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the logical OR (any) of tensor elements along the specified axes.
static txeo::Tensor< T > reduce_sum(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the sum of tensor elements along the specified axes.
static txeo::Tensor< T > reduce_prod(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the product of tensor elements along the specified axes.
static txeo::Tensor< T > reduce_euclidean_norm(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the Euclidean norm of tensor elements along the specified axes.
static txeo::Tensor< T > reduce_geometric_mean(const txeo::Tensor< T > &tensor, size_t axis)
Computes the geometric mean of tensor elements along the specified axis.
static txeo::Tensor< T > reduce_mean(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the mean of tensor elements along the specified axes.
TensorAgg & operator=(TensorAgg &&)=delete
static txeo::Tensor< T > cumulative_prod(const txeo::Tensor< T > &tensor, size_t axis)
Computes the cumulative product of tensor elements along the specified axis.
static txeo::Tensor< size_t > count_non_zero(const txeo::Tensor< T > &tensor, size_t axis)
Counts the number of non-zero elements along the specified axis.
TensorAgg(TensorAgg &&)=delete
static txeo::Tensor< T > reduce_standard_deviation(const txeo::Tensor< T > &tensor, size_t axis)
Computes the standard deviation of tensor elements along the specified axis.
static txeo::Tensor< size_t > arg_min(const txeo::Tensor< T > &tensor, size_t axis)
Finds the indices of the minimum values along the specified axis.
static txeo::Tensor< T > reduce_median(const txeo::Tensor< T > &tensor, size_t axis)
Computes the median of tensor elements along the specified axis.
static txeo::Tensor< T > reduce_variance(const txeo::Tensor< T > &tensor, size_t axis)
Computes the variance of tensor elements along the specified axis.
TensorAgg & operator=(const TensorAgg &)=delete
static txeo::Tensor< T > cumulative_sum(const txeo::Tensor< T > &tensor, size_t axis)
Computes the cumulative sum of tensor elements along the specified axis.
TensorAgg(const TensorAgg &)=delete
static txeo::Tensor< T > reduce_min(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the minimum of tensor elements along the specified axes.
static txeo::Tensor< T > reduce_all(const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes)
Computes the logical AND (all) of tensor elements along the specified axes.
Implements the mathematical concept of tensor, which is a magnitude of multiple order....