SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
norms.hpp File Reference

Provides some algorithms to compute norms. More...

#include <algorithm>
#include <numeric>
#include <cassert>
#include <cmath>
#include "complex_cast.hpp"
Include dependency graph for norms.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 slip
 This namespace corresponds to the kernel of the Simple Library on Image Processing (SLIP). That is to say that it contains the data structures and the algorithms needed by these data strucutres.
 

Functions

template<typename Value_T , typename InputIterator >
Value_T slip::L22_norm (InputIterator first, InputIterator last)
 Computes the L22 norm ( $\sum_i x_i^2$) of a range. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::L22_norm_mask (InputIterator first, InputIterator last, MaskIterator mask_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the L22 norm $ \sum_i x_i^2$ of a range according to a mask sequence. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::L22_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the L22 norm $ \sum_i x_i^2$ a range according to a Predicate. More...
 
template<typename Value_T , typename InputIterator >
Value_T slip::L2_norm (InputIterator first, InputIterator last)
 Computes the L2 norm $ \sqrt{\sum_i x_i^2}$ of a range. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::L2_norm_mask (InputIterator first, InputIterator last, MaskIterator mask_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range according to a mask sequence. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::L2_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ a range according to a Predicate. More...
 
template<typename Value_T , typename InputIterator >
Value_T slip::Euclidean_norm (InputIterator first, InputIterator last)
 Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::Euclidean_norm_mask (InputIterator first, InputIterator last, MaskIterator mask_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range according to a mask sequence. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::Euclidean_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ a range according to a Predicate. More...
 
template<typename Value_T , typename InputIterator >
Value_T slip::L1_norm (InputIterator first, InputIterator last)
 Computes the L1 norm $ \sum_i{|x_i|}$ of a range. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::L1_norm_mask (InputIterator first, InputIterator last, MaskIterator mask_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the L1 norm $ \sum_i{|x_i|}$ of a range according to a mask sequence. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::L1_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the L1 norm $ \sum_i{|x_i|}$ a range according to a Predicate. More...
 
template<typename Value_T , typename InputIterator >
Value_T slip::infinite_norm (InputIterator first, InputIterator last)
 Computes the infinite norm $\max_i{|x_i|}$ of a range. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::infinite_norm_mask (InputIterator first, InputIterator last, MaskIterator mask_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the infinite norm $\max_i{|x_i|}$ of a range according to a mask sequence. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::infinite_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the infinite norm $\max_i{|x_i|}$ a range according to a Predicate. More...
 

Detailed Description

Provides some algorithms to compute norms.

Definition in file norms.hpp.