CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions
Functors reducing a vector to a scalar
BLAS1 -- Vector/Vector operations
Collaboration diagram for Functors reducing a vector to a scalar:

Functions

template<class __value_type , class __memory_space_type >
bool cuv::has_inf (const tensor< __value_type, __memory_space_type > &v)
 Check whether a float vector contains "Inf" or "-Inf".
template<class __value_type , class __memory_space_type >
bool cuv::has_inf (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
bool cuv::has_nan (const tensor< __value_type, __memory_space_type > &v)
 Check whether a float vector contains "NaN".
template<class __value_type , class __memory_space_type >
bool cuv::has_nan (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
unsigned int cuv::count (const tensor< __value_type, __memory_space_type > &v, const __value_type &s)
 Count the elements with a certain scalar value in a vector.
template<class __value_type , class __memory_space_type >
unsigned int cuv::count (const tensor< __value_type, __memory_space_type, column_major > &v, const __value_type &s)
template<class __value_type , class __memory_space_type >
float cuv::sum (const tensor< __value_type, __memory_space_type > &v)
 Return the sum of a vector.
template<class __value_type , class __memory_space_type >
float cuv::sum (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::norm2 (const tensor< __value_type, __memory_space_type > &v)
 Return the two-norm or Euclidean norm of a vector.
template<class __value_type , class __memory_space_type >
float cuv::norm2 (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::diff_norm2 (const tensor< __value_type, __memory_space_type > &v, const tensor< __value_type, __memory_space_type > &w)
 Return the two-norm or of the difference of two vectors.
template<class __value_type , class __memory_space_type >
float cuv::diff_norm2 (const tensor< __value_type, __memory_space_type, column_major > &v, const tensor< __value_type, __memory_space_type, column_major > &w)
template<class __value_type , class __memory_space_type >
float cuv::norm1 (const tensor< __value_type, __memory_space_type > &v)
 Return the one-norm or sum-norm of a vector.
template<class __value_type , class __memory_space_type >
float cuv::norm1 (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::minimum (const tensor< __value_type, __memory_space_type > &v)
 Return the minimum entry of a vector.
template<class __value_type , class __memory_space_type >
float cuv::minimum (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::maximum (const tensor< __value_type, __memory_space_type > &v)
 Return the maximum entry of a vector.
template<class __value_type , class __memory_space_type >
float cuv::maximum (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::mean (const tensor< __value_type, __memory_space_type > &v)
 Return the mean of the entries of a vector.
template<class __value_type , class __memory_space_type >
float cuv::mean (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
float cuv::var (const tensor< __value_type, __memory_space_type > &v)
 Return the variation of the entries of a vector.
template<class __value_type , class __memory_space_type >
float cuv::var (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
tensor< __value_type,
__memory_space_type >
::index_type 
cuv::arg_max (const tensor< __value_type, __memory_space_type > &v)
 Return the index of the maximum element.
template<class __value_type , class __memory_space_type >
tensor< __value_type,
__memory_space_type,
column_major >::index_type 
cuv::arg_max (const tensor< __value_type, __memory_space_type, column_major > &v)
template<class __value_type , class __memory_space_type >
tensor< __value_type,
__memory_space_type >
::index_type 
cuv::arg_min (const tensor< __value_type, __memory_space_type > &v)
 Return the index of the minimum element.
template<class __value_type , class __memory_space_type >
tensor< __value_type,
__memory_space_type,
column_major >::index_type 
cuv::arg_min (const tensor< __value_type, __memory_space_type, column_major > &v)

Detailed Description

Function Documentation

template<class __value_type , class __memory_space_type >
tensor<__value_type, __memory_space_type>::index_type cuv::arg_max ( const tensor< __value_type, __memory_space_type > &  v)

Return the index of the maximum element.

Parameters
vTarget vector
Returns
index of max element
template<class __value_type , class __memory_space_type >
tensor<__value_type, __memory_space_type, column_major>::index_type cuv::arg_max ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
arg_max

Definition at line 822 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
tensor<__value_type, __memory_space_type>::index_type cuv::arg_min ( const tensor< __value_type, __memory_space_type > &  v)

Return the index of the minimum element.

Parameters
vTarget vector
Returns
index of min element
template<class __value_type , class __memory_space_type >
tensor<__value_type, __memory_space_type, column_major>::index_type cuv::arg_min ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
arg_min

Definition at line 838 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
unsigned int cuv::count ( const tensor< __value_type, __memory_space_type > &  v,
const __value_type &  s 
)

Count the elements with a certain scalar value in a vector.

Parameters
vvector
sscalar
Returns
count of elements with that scalar value
template<class __value_type , class __memory_space_type >
unsigned int cuv::count ( const tensor< __value_type, __memory_space_type, column_major > &  v,
const __value_type &  s 
)
See Also
sum

Definition at line 708 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::diff_norm2 ( const tensor< __value_type, __memory_space_type > &  v,
const tensor< __value_type, __memory_space_type > &  w 
)

Return the two-norm or of the difference of two vectors.

Parameters
vsrc vector
wsrc vector
Returns
Two-norm of (v-w)
template<class __value_type , class __memory_space_type >
float cuv::diff_norm2 ( const tensor< __value_type, __memory_space_type, column_major > &  v,
const tensor< __value_type, __memory_space_type, column_major > &  w 
)
See Also
norm2

Definition at line 745 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
bool cuv::has_inf ( const tensor< __value_type, __memory_space_type > &  v)

Check whether a float vector contains "Inf" or "-Inf".

Parameters
vTarget vector
Returns
true if v contains "Inf" or "-Inf", false otherwise
template<class __value_type , class __memory_space_type >
bool cuv::has_inf ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
has_inf

Definition at line 683 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
bool cuv::has_nan ( const tensor< __value_type, __memory_space_type > &  v)

Check whether a float vector contains "NaN".

Parameters
vTarget vector
Returns
true if v contains "NaN", false otherwise
template<class __value_type , class __memory_space_type >
bool cuv::has_nan ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
has_nan

Definition at line 695 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::maximum ( const tensor< __value_type, __memory_space_type > &  v)

Return the maximum entry of a vector.

Parameters
vTarget vector
Returns
Maximum entry of v
template<class __value_type , class __memory_space_type >
float cuv::maximum ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
maximum

Definition at line 781 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::mean ( const tensor< __value_type, __memory_space_type > &  v)

Return the mean of the entries of a vector.

Parameters
vTarget vector
Returns
Mean of entries of v
template<class __value_type , class __memory_space_type >
float cuv::mean ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
mean

Definition at line 793 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::minimum ( const tensor< __value_type, __memory_space_type > &  v)

Return the minimum entry of a vector.

Parameters
vTarget vector
Returns
Minimum entry of v
template<class __value_type , class __memory_space_type >
float cuv::minimum ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
minimum

Definition at line 769 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::norm1 ( const tensor< __value_type, __memory_space_type > &  v)

Return the one-norm or sum-norm of a vector.

Parameters
vTarget vector
Returns
one-norm of v
template<class __value_type , class __memory_space_type >
float cuv::norm1 ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
norm1

Definition at line 757 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::norm2 ( const tensor< __value_type, __memory_space_type > &  v)

Return the two-norm or Euclidean norm of a vector.

Parameters
vTarget vector
Returns
Two-norm of v
template<class __value_type , class __memory_space_type >
float cuv::norm2 ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
norm2

Definition at line 732 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::sum ( const tensor< __value_type, __memory_space_type > &  v)

Return the sum of a vector.

Parameters
vvector
Returns
sum of v
template<class __value_type , class __memory_space_type >
float cuv::sum ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
sum

Definition at line 720 of file tensor_ops.hpp.

template<class __value_type , class __memory_space_type >
float cuv::var ( const tensor< __value_type, __memory_space_type > &  v)

Return the variation of the entries of a vector.

Parameters
vTarget vector
Returns
Variation of entries of v
template<class __value_type , class __memory_space_type >
float cuv::var ( const tensor< __value_type, __memory_space_type, column_major > &  v)
See Also
var

Definition at line 805 of file tensor_ops.hpp.