Stratax 0.2.0
Loading...
Searching...
No Matches
reduction Namespace Reference

Functions

bool advance (const stratax::core::Shape &shape, std::vector< std::size_t > &indices)
template<Array A>
int normalize_axis (const A &arr, int axis)
template<Array A>
std::vector< std::size_t > result_shape (const A &arr, int axis, bool keepdims)
template<Array A, typename Func>
auto axis_reduce (const A &array, int axis, Func func, bool keepdims=false)
template<Array A>
A::value_type sum (const A &arr)
template<Array A>
A::value_type prod (const A &arr)
template<Array A>
A::value_type max (const A &arr)
template<Array A>
A::value_type min (const A &arr)
template<Array A>
std::size_t argmax (const A &arr)
template<Array A>
std::size_t argmin (const A &arr)
template<Array A>
double mean (const A &arr)
template<Array A>
double var (const A &arr)
template<Array A>
double std (const A &arr)
template<Array A>
stratax::container::Tensor< typename A::value_type > sum (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< typename A::value_type > sum (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< typename A::value_type > prod (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< typename A::value_type > prod (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< typename A::value_type > max (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< typename A::value_type > max (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< typename A::value_type > min (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< typename A::value_type > min (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< std::size_t > argmax (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< std::size_t > argmax (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< std::size_t > argmin (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< std::size_t > argmin (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< double > mean (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< double > mean (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< double > var (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< double > var (const A &arr, int axis)
template<Array A>
stratax::container::Tensor< double > std (const A &arr, int axis, bool keepdims)
template<Array A>
stratax::container::Tensor< double > std (const A &arr, int axis)

Function Documentation

◆ advance()

bool reduction::advance ( const stratax::core::Shape & shape,
std::vector< std::size_t > & indices )
inline

Definition at line 25 of file Reductions.hpp.

◆ argmax() [1/3]

template<Array A>
std::size_t reduction::argmax ( const A & arr)

Definition at line 197 of file Reductions.hpp.

◆ argmax() [2/3]

template<Array A>
stratax::container::Tensor< std::size_t > reduction::argmax ( const A & arr,
int axis )

Definition at line 302 of file Reductions.hpp.

◆ argmax() [3/3]

template<Array A>
stratax::container::Tensor< std::size_t > reduction::argmax ( const A & arr,
int axis,
bool keepdims )

Definition at line 308 of file Reductions.hpp.

◆ argmin() [1/3]

template<Array A>
std::size_t reduction::argmin ( const A & arr)

Definition at line 208 of file Reductions.hpp.

◆ argmin() [2/3]

template<Array A>
stratax::container::Tensor< std::size_t > reduction::argmin ( const A & arr,
int axis )

Definition at line 314 of file Reductions.hpp.

◆ argmin() [3/3]

template<Array A>
stratax::container::Tensor< std::size_t > reduction::argmin ( const A & arr,
int axis,
bool keepdims )

Definition at line 320 of file Reductions.hpp.

◆ axis_reduce()

template<Array A, typename Func>
auto reduction::axis_reduce ( const A & array,
int axis,
Func func,
bool keepdims = false )

Definition at line 88 of file Reductions.hpp.

◆ max() [1/3]

template<Array A>
A::value_type reduction::max ( const A & arr)

Definition at line 175 of file Reductions.hpp.

◆ max() [2/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::max ( const A & arr,
int axis )

Definition at line 278 of file Reductions.hpp.

◆ max() [3/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::max ( const A & arr,
int axis,
bool keepdims )

Definition at line 284 of file Reductions.hpp.

◆ mean() [1/3]

template<Array A>
double reduction::mean ( const A & arr)

Definition at line 219 of file Reductions.hpp.

◆ mean() [2/3]

template<Array A>
stratax::container::Tensor< double > reduction::mean ( const A & arr,
int axis )

Definition at line 332 of file Reductions.hpp.

◆ mean() [3/3]

template<Array A>
stratax::container::Tensor< double > reduction::mean ( const A & arr,
int axis,
bool keepdims )

Definition at line 326 of file Reductions.hpp.

◆ min() [1/3]

template<Array A>
A::value_type reduction::min ( const A & arr)

Definition at line 186 of file Reductions.hpp.

◆ min() [2/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::min ( const A & arr,
int axis )

Definition at line 290 of file Reductions.hpp.

◆ min() [3/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::min ( const A & arr,
int axis,
bool keepdims )

Definition at line 296 of file Reductions.hpp.

◆ normalize_axis()

template<Array A>
int reduction::normalize_axis ( const A & arr,
int axis )
inline

Definition at line 40 of file Reductions.hpp.

◆ prod() [1/3]

template<Array A>
A::value_type reduction::prod ( const A & arr)

Definition at line 164 of file Reductions.hpp.

◆ prod() [2/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::prod ( const A & arr,
int axis )

Definition at line 266 of file Reductions.hpp.

◆ prod() [3/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::prod ( const A & arr,
int axis,
bool keepdims )

Definition at line 272 of file Reductions.hpp.

◆ result_shape()

template<Array A>
std::vector< std::size_t > reduction::result_shape ( const A & arr,
int axis,
bool keepdims )
inline

Definition at line 52 of file Reductions.hpp.

◆ std() [1/3]

template<Array A>
double reduction::std ( const A & arr)

Definition at line 244 of file Reductions.hpp.

◆ std() [2/3]

template<Array A>
stratax::container::Tensor< double > reduction::std ( const A & arr,
int axis )

Definition at line 356 of file Reductions.hpp.

◆ std() [3/3]

template<Array A>
stratax::container::Tensor< double > reduction::std ( const A & arr,
int axis,
bool keepdims )

Definition at line 350 of file Reductions.hpp.

◆ sum() [1/3]

template<Array A>
A::value_type reduction::sum ( const A & arr)

Definition at line 154 of file Reductions.hpp.

◆ sum() [2/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::sum ( const A & arr,
int axis )

Definition at line 254 of file Reductions.hpp.

◆ sum() [3/3]

template<Array A>
stratax::container::Tensor< typename A::value_type > reduction::sum ( const A & arr,
int axis,
bool keepdims )

Definition at line 260 of file Reductions.hpp.

◆ var() [1/3]

template<Array A>
double reduction::var ( const A & arr)

Definition at line 225 of file Reductions.hpp.

◆ var() [2/3]

template<Array A>
stratax::container::Tensor< double > reduction::var ( const A & arr,
int axis )

Definition at line 344 of file Reductions.hpp.

◆ var() [3/3]

template<Array A>
stratax::container::Tensor< double > reduction::var ( const A & arr,
int axis,
bool keepdims )

Definition at line 338 of file Reductions.hpp.