SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
slip Namespace Reference

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. More...

Classes

struct  __fill_border
 
struct  __fill_border< std::random_access_iterator_tag >
 
struct  __fill_border< std::random_access_iterator2d_tag >
 
struct  __fill_border< std::random_access_iterator3d_tag >
 
struct  __fill_border< std::random_access_iterator4d_tag >
 fill border
 
struct  FillBorder
 Generic fill border functor: fill border of 1d, 2d or 3d iterator ranges. More...
 
struct  __update_border
 
struct  __update_border< std::random_access_iterator_tag >
 
struct  __update_border< std::random_access_iterator2d_tag >
 
struct  __update_border< std::random_access_iterator3d_tag >
 
struct  __update_border< std::random_access_iterator4d_tag >
 update border
 
struct  UpdateBorder
 Generic update border functor: update border of 1d, 2d or 3d iterator ranges. More...
 
struct  __add_border
 
struct  __add_border< std::random_access_iterator_tag >
 
struct  __add_border< std::random_access_iterator2d_tag >
 
struct  __add_border< std::random_access_iterator3d_tag >
 
struct  __add_border< std::random_access_iterator4d_tag >
 add border
 
struct  AddBorder
 Generic add border functor: adds border of 1d, 2d or 3d iterator ranges. More...
 
struct  RGBtoL
 Converts a RGB color to a luminance value. More...
 
struct  RGBtoXYZ
 Converts a RGB color to XYZ color. More...
 
struct  XYZtoRGB
 Converts a XYZ color to RGB color. More...
 
struct  RGBtoXYZ_v2
 Converts a RGB color to XYZ color. Another version (not the same white reference) More...
 
struct  XYZtoRGB_v2
 Converts a XYZ color to RGB color. Another version (not the same white reference) More...
 
struct  RGBtoYCrCb
 Converts a RGB color to YCrCb color. More...
 
struct  YCrCbtoRGB
 Converts a YCrCb color to RGB color. More...
 
struct  RGBtoCieLab
 Converts a RGB color to CieLab color. More...
 
struct  CieLabtoRGB
 
struct  RGBtoHSV
 Converts a RGB color to HSV color. More...
 
struct  HSVtoRGB
 
struct  RGBtoHSI
 Converts a RGB color to HSI color. More...
 
struct  HSItoRGB
 Converts a HSI color to RGB color. More...
 
struct  RGBtoHSI_01
 Converts a RGB color to HSI color. More...
 
struct  HSItoRGB_01
 Converts a HSI color to RGB color. More...
 
struct  L1_dist
 Computes the L1 distance between two values x and y: $ |x - y|$. More...
 
struct  L2_dist
 Computes the L2 distance between two values x and y: $ \sqrt{(x - y)^2}$. More...
 
struct  L22_dist
 Computes the L22 distance between two values x and y: $ (x - y)^2$. More...
 
struct  Relative_error_L1
 Computes the L1 relative error between two values x and y: $ \frac{|x - y|}{|x|}$. More...
 
struct  Relative_error_L2
 Computes the L2 relative error between two values x and y: $ \frac{\sqrt{(x - y)^2}}{|x|}$. More...
 
struct  Relative_error_L22
 Computes the Relative L22 error between two values x and y: $ \frac{(x - y)^2}{x^2}$. More...
 
struct  L1_dist_vect
 Computes the L1 distance between two Vectors x and y: $ \sum_i |x_i - y_i|$. More...
 
struct  L2_dist_vect
 Computes the L2 distance between two Vectors x and y: $ \sqrt{\sum_i (x_i - y_i)^2}$. More...
 
struct  L22_dist_vect
 Computes the L22 distance between two Vectors x and y: $ \sum_i (x_i - y_i)^2$. More...
 
struct  __copy
 
struct  __copy< std::random_access_iterator_tag >
 
struct  __copy< std::random_access_iterator2d_tag >
 
struct  __copy< std::random_access_iterator3d_tag >
 
struct  __dx
 
struct  __dx< Real, std::random_access_iterator_tag >
 
struct  __dx< Real, std::random_access_iterator2d_tag >
 
struct  __dx< Real, std::random_access_iterator3d_tag >
 
struct  __dx< Real, std::random_access_iterator4d_tag >
 dx local derivatives 4d extensions
 
struct  Dx
 
struct  __dy
 
struct  __dy< Real, std::random_access_iterator_tag >
 
struct  __dy< Real, std::random_access_iterator2d_tag >
 
struct  __dy< Real, std::random_access_iterator3d_tag >
 
struct  __dy< Real, std::random_access_iterator4d_tag >
 dy local derivatives 4d extensions
 
struct  Dy
 
struct  __dz
 
struct  __dz< Real, std::random_access_iterator_tag >
 
struct  __dz< Real, std::random_access_iterator2d_tag >
 
struct  __dz< Real, std::random_access_iterator3d_tag >
 
struct  __dz< Real, std::random_access_iterator4d_tag >
 dz local derivatives 4d extensions
 
struct  Dz
 
struct  __dt
 dt local derivatives. 4d extensions.
 
struct  __dt< Real, std::random_access_iterator_tag >
 
struct  __dt< Real, std::random_access_iterator2d_tag >
 
struct  __dt< Real, std::random_access_iterator3d_tag >
 
struct  __dt< Real, std::random_access_iterator4d_tag >
 
struct  Dt
 
struct  __dx_fwd
 
struct  __dx_fwd< Real, std::random_access_iterator_tag >
 
struct  __dx_fwd< Real, std::random_access_iterator2d_tag >
 
struct  __dx_fwd< Real, std::random_access_iterator3d_tag >
 
struct  __dx_fwd< Real, std::random_access_iterator4d_tag >
 forward dx local derivatives. 4d extensions.
 
struct  DxFwd
 
struct  __dy_fwd
 
struct  __dy_fwd< Real, std::random_access_iterator_tag >
 
struct  __dy_fwd< Real, std::random_access_iterator2d_tag >
 
struct  __dy_fwd< Real, std::random_access_iterator3d_tag >
 
struct  __dy_fwd< Real, std::random_access_iterator4d_tag >
 forward dy local derivatives. 4d extensions.
 
struct  DyFwd
 
struct  __dz_fwd
 
struct  __dz_fwd< Real, std::random_access_iterator_tag >
 
struct  __dz_fwd< Real, std::random_access_iterator2d_tag >
 
struct  __dz_fwd< Real, std::random_access_iterator3d_tag >
 
struct  __dz_fwd< Real, std::random_access_iterator4d_tag >
 forward dz local derivatives. 4d extensions.
 
struct  DzFwd
 
struct  __dt_fwd
 forward dt local derivatives. 4d extensions.
 
struct  __dt_fwd< Real, std::random_access_iterator_tag >
 
struct  __dt_fwd< Real, std::random_access_iterator2d_tag >
 
struct  __dt_fwd< Real, std::random_access_iterator3d_tag >
 
struct  __dt_fwd< Real, std::random_access_iterator4d_tag >
 
struct  DtFwd
 
struct  __dx_bck
 
struct  __dx_bck< Real, std::random_access_iterator_tag >
 
struct  __dx_bck< Real, std::random_access_iterator2d_tag >
 
struct  __dx_bck< Real, std::random_access_iterator3d_tag >
 
struct  __dx_bck< Real, std::random_access_iterator4d_tag >
 backward dx local derivatives. 4d extensions.
 
struct  DxBck
 
struct  __dy_bck
 
struct  __dy_bck< Real, std::random_access_iterator_tag >
 
struct  __dy_bck< Real, std::random_access_iterator2d_tag >
 
struct  __dy_bck< Real, std::random_access_iterator3d_tag >
 
struct  __dy_bck< Real, std::random_access_iterator4d_tag >
 backward dy local derivatives. 4d extensions.
 
struct  DyBck
 
struct  __dz_bck
 
struct  __dz_bck< Real, std::random_access_iterator_tag >
 
struct  __dz_bck< Real, std::random_access_iterator2d_tag >
 
struct  __dz_bck< Real, std::random_access_iterator3d_tag >
 
struct  __dz_bck< Real, std::random_access_iterator4d_tag >
 backward dz local derivatives. 4d extensions.
 
struct  DzBck
 
struct  __dt_bck
 backward dt local derivatives. 4d extensions.
 
struct  __dt_bck< Real, std::random_access_iterator_tag >
 
struct  __dt_bck< Real, std::random_access_iterator2d_tag >
 
struct  __dt_bck< Real, std::random_access_iterator3d_tag >
 
struct  __dt_bck< Real, std::random_access_iterator4d_tag >
 
struct  DtBck
 
struct  __prewittx
 
struct  __prewittx< Real, std::random_access_iterator_tag >
 
struct  __prewittx< Real, std::random_access_iterator2d_tag >
 
struct  __prewittx< Real, std::random_access_iterator3d_tag >
 
struct  Prewittx
 
struct  __prewitty
 
struct  __prewitty< Real, std::random_access_iterator_tag >
 
struct  __prewitty< Real, std::random_access_iterator2d_tag >
 
struct  __prewitty< Real, std::random_access_iterator3d_tag >
 
struct  Prewitty
 
struct  __prewittz
 
struct  __prewittz< Real, std::random_access_iterator_tag >
 
struct  __prewittz< Real, std::random_access_iterator3d_tag >
 
struct  Prewittz
 
struct  __sobelx
 
struct  __sobelx< Real, std::random_access_iterator_tag >
 
struct  __sobelx< Real, std::random_access_iterator2d_tag >
 
struct  __sobelx< Real, std::random_access_iterator3d_tag >
 
struct  Sobelx
 
struct  __sobely
 
struct  __sobely< Real, std::random_access_iterator_tag >
 
struct  __sobely< Real, std::random_access_iterator2d_tag >
 
struct  __sobely< Real, std::random_access_iterator3d_tag >
 
struct  Sobely
 
struct  __sobelz
 
struct  __sobelz< Real, std::random_access_iterator_tag >
 
struct  __sobelz< Real, std::random_access_iterator3d_tag >
 
struct  Sobelz
 
struct  __dv
 
struct  __dv< Real, std::random_access_iterator_tag >
 
struct  __dv< Real, std::random_access_iterator2d_tag >
 
struct  __dv< Real, std::random_access_iterator3d_tag >
 
struct  __dv< Real, std::random_access_iterator4d_tag >
 dv first derivative in the direction of v. 4d extensions.
 
struct  Dv
 
struct  __grad
 
struct  __grad< Real, std::random_access_iterator2d_tag >
 
struct  __grad< Real, std::random_access_iterator3d_tag >
 
struct  __grad< Real, std::random_access_iterator4d_tag >
 gradient norm. 4d extensions.
 
struct  Grad
 
struct  __dxx
 
struct  __dxx< Real, std::random_access_iterator_tag >
 
struct  __dxx< Real, std::random_access_iterator2d_tag >
 
struct  __dxx< Real, std::random_access_iterator3d_tag >
 
struct  __dxx< Real, std::random_access_iterator4d_tag >
 dxx local derivatives. 4d extensions.
 
struct  Dxx
 
struct  __dyy
 
struct  __dyy< Real, std::random_access_iterator_tag >
 
struct  __dyy< Real, std::random_access_iterator2d_tag >
 
struct  __dyy< Real, std::random_access_iterator3d_tag >
 
struct  __dyy< Real, std::random_access_iterator4d_tag >
 dyy local derivatives. 4d extensions.
 
struct  Dyy
 
struct  __dzz
 
struct  __dzz< Real, std::random_access_iterator_tag >
 
struct  __dzz< Real, std::random_access_iterator2d_tag >
 
struct  __dzz< Real, std::random_access_iterator3d_tag >
 
struct  __dzz< Real, std::random_access_iterator4d_tag >
 dzz local derivatives. 4d extensions.
 
struct  Dzz
 
struct  __dtt
 dtt local derivatives. 4d extensions.
 
struct  __dtt< Real, std::random_access_iterator_tag >
 
struct  __dtt< Real, std::random_access_iterator2d_tag >
 
struct  __dtt< Real, std::random_access_iterator3d_tag >
 
struct  __dtt< Real, std::random_access_iterator4d_tag >
 
struct  Dtt
 
struct  __dxy
 
struct  __dxy< Real, std::random_access_iterator_tag >
 
struct  __dxy< Real, std::random_access_iterator2d_tag >
 
struct  __dxy< Real, std::random_access_iterator3d_tag >
 
struct  Dxy
 
struct  __dxz
 
struct  __dxz< Real, std::random_access_iterator_tag >
 
struct  __dxz< Real, std::random_access_iterator3d_tag >
 
struct  Dxz
 
struct  __dyz
 
struct  __dyz< Real, std::random_access_iterator_tag >
 
struct  __dyz< Real, std::random_access_iterator3d_tag >
 
struct  Dyz
 
struct  __dxy_w
 
struct  __dxy_w< Real, std::random_access_iterator_tag >
 
struct  __dxy_w< Real, std::random_access_iterator2d_tag >
 
struct  __dxy_w< Real, std::random_access_iterator3d_tag >
 
struct  Dxy_W
 
struct  __div
 
struct  __div< Real, std::random_access_iterator_tag >
 
struct  __div< Real, std::random_access_iterator2d_tag >
 
struct  __div< Real, std::random_access_iterator3d_tag >
 
struct  __div< Real, std::random_access_iterator4d_tag >
 divergence local derivatives. 4d extensions.
 
struct  Div
 
struct  __lap
 
struct  __lap< Real, std::random_access_iterator_tag >
 
struct  __lap< Real, std::random_access_iterator2d_tag >
 
struct  __lap< Real, std::random_access_iterator3d_tag >
 
struct  __lap< Real, std::random_access_iterator4d_tag >
 local laplacian. 4d extensions.
 
struct  Lap
 
struct  __lap_8c
 
struct  __lap_8c< Real, std::random_access_iterator2d_tag >
 
struct  Lap8
 
struct  LapLindeberg
 
struct  __iee_sapiro
 
struct  __iee_sapiro< Real, std::random_access_iterator2d_tag >
 
struct  __iee_sapiro< Real, std::random_access_iterator3d_tag >
 
struct  Iee_Sapiro
 
struct  __iee_lucido
 
struct  __iee_lucido< Real, std::random_access_iterator2d_tag >
 
struct  Iee_Lucido
 
struct  __iee_augereau
 
struct  __iee_augereau< Real, std::random_access_iterator2d_tag >
 
struct  Iee_Augereau
 
struct  __iee_alvarez
 
struct  __iee_alvarez< Real, std::random_access_iterator2d_tag >
 
struct  Iee_Alvarez
 
struct  __iee_alvarez2
 
struct  __iee_alvarez2< Real, std::random_access_iterator2d_tag >
 
struct  Iee_Alvarez2
 
struct  __iee_cohignac
 
struct  __iee_cohignac< Real, std::random_access_iterator2d_tag >
 
struct  Iee_Cohignac
 
struct  __inn_sapiro
 
struct  __inn_sapiro< Real, std::random_access_iterator2d_tag >
 
struct  __inn_sapiro< Real, std::random_access_iterator3d_tag >
 
struct  Inn_Sapiro
 
struct  __inn_lucido
 
struct  __inn_lucido< Real, std::random_access_iterator2d_tag >
 
struct  Inn_Lucido
 
struct  __inn_augereau
 
struct  __inn_augereau< Real, std::random_access_iterator2d_tag >
 
struct  Inn_Augereau
 
struct  __inn_alvarez
 
struct  __inn_alvarez< Real, std::random_access_iterator2d_tag >
 
struct  Inn_Alvarez
 
struct  __inn_alvarez2
 
struct  __inn_alvarez2< Real, std::random_access_iterator2d_tag >
 
struct  Inn_Alvarez2
 
struct  __inn_cohignac
 
struct  __inn_cohignac< Real, std::random_access_iterator2d_tag >
 
struct  Inn_Cohignac
 
struct  __dvv
 
struct  __dvv< Real, std::random_access_iterator_tag >
 
struct  __dvv< Real, std::random_access_iterator2d_tag >
 
struct  __dvv< Real, std::random_access_iterator3d_tag >
 
struct  Dvv
 
struct  __minmodx
 
struct  __minmodx< Real, std::random_access_iterator2d_tag >
 
struct  __minmodx< Real, std::random_access_iterator3d_tag >
 
struct  Minmodx
 
struct  __minmody
 
struct  __minmody< Real, std::random_access_iterator2d_tag >
 
struct  __minmody< Real, std::random_access_iterator3d_tag >
 
struct  Minmody
 
struct  __minmodz
 
struct  __minmodz< Real, std::random_access_iterator2d_tag >
 
struct  __minmodz< Real, std::random_access_iterator3d_tag >
 
struct  Minmodz
 
struct  __gradminus_OS
 
struct  __gradminus_OS< Real, std::random_access_iterator2d_tag >
 
struct  __gradminus_OS< Real, std::random_access_iterator3d_tag >
 
struct  Gradminus_OS
 
struct  __gradplus_OS
 
struct  __gradplus_OS< Real, std::random_access_iterator2d_tag >
 
struct  __gradplus_OS< Real, std::random_access_iterator3d_tag >
 
struct  Gradplus_OS
 
struct  __gradminus_BM
 
struct  __gradminus_BM< Real, std::random_access_iterator2d_tag >
 
struct  __gradminus_BM< Real, std::random_access_iterator3d_tag >
 
struct  Gradminus_BM
 
struct  __gradplus_BM
 
struct  __gradplus_BM< Real, std::random_access_iterator2d_tag >
 
struct  __gradplus_BM< Real, std::random_access_iterator3d_tag >
 
struct  Gradplus_BM
 
struct  __gradminus_minmod
 
struct  __gradminus_minmod< Real, std::random_access_iterator2d_tag >
 
struct  __gradminus_minmod< Real, std::random_access_iterator3d_tag >
 
struct  Gradminus_minmod
 
struct  Gradplus_minmod
 
struct  __min_curv
 
struct  __min_curv< Real, std::random_access_iterator_tag >
 
struct  __min_curv< Real, std::random_access_iterator2d_tag >
 
struct  Min_Curv
 
struct  __max_curv
 
struct  __max_curv< Real, std::random_access_iterator_tag >
 
struct  __max_curv< Real, std::random_access_iterator2d_tag >
 
struct  Max_Curv
 
struct  __mean_curv
 
struct  __mean_curv< Real, std::random_access_iterator_tag >
 
struct  __mean_curv< Real, std::random_access_iterator2d_tag >
 
struct  __mean_curv< Real, std::random_access_iterator3d_tag >
 
struct  Mean_Curv
 
struct  __total_curv
 
struct  __total_curv< Real, std::random_access_iterator_tag >
 
struct  __total_curv< Real, std::random_access_iterator2d_tag >
 
struct  __total_curv< Real, std::random_access_iterator3d_tag >
 
struct  Total_Curv
 
struct  __lambda1_curv
 
struct  __lambda1_curv< Real, std::random_access_iterator_tag >
 
struct  __lambda1_curv< Real, std::random_access_iterator2d_tag >
 
struct  Lambda1_Curv
 
struct  __lambda2_curv
 
struct  __lambda2_curv< Real, std::random_access_iterator_tag >
 
struct  __lambda2_curv< Real, std::random_access_iterator2d_tag >
 
struct  Lambda2_Curv
 
struct  __iso_curv
 
struct  __iso_curv< Real, std::random_access_iterator_tag >
 
struct  __iso_curv< Real, std::random_access_iterator2d_tag >
 
struct  Iso_Curv
 
struct  __courant_line_curv
 
struct  __courant_line_curv< Real, std::random_access_iterator_tag >
 
struct  __courant_line_curv< Real, std::random_access_iterator2d_tag >
 
struct  Courant_Line_Curv
 
struct  __delta_g_curv
 
struct  __delta_g_curv< Real, std::random_access_iterator_tag >
 
struct  __delta_g_curv< Real, std::random_access_iterator2d_tag >
 
struct  Delta_G_Curv
 
struct  range_fun_interab
 Functor object uses to change the range of container according to an affine transformation. More...
 
struct  range_fun_inter01
 Functor object uses to change the range of container into [0,1]. More...
 
struct  range_fun_inter0255
 Functor object uses to change the range of container into [0,255]. More...
 
struct  range_fun_inter0b
 Functor object uses to change the range of container into [0,b]. More...
 
struct  range_fun_normal
 Functor object uses to change the range of container applying normal distribution. More...
 
struct  range_fun_sigmoide
 Functor object uses to change the range of container applying sigmoide distribution. More...
 
struct  range_fun_sigmoideb
 Functor object uses to change the range of container applying sigmoide distribution between [0,b]. More...
 
struct  funLM_bp
 Function to compute the backprojection of the 3d world point corresponding to the backprojection of an image point using the Levenberg-Marquadt algorithm. More...
 
struct  funLM_DLT
 Function to compute the camera model of distortion using the Levenberg-Marquadt algorithm. More...
 
struct  LMDerivFunctor
 generic derivative functor More...
 
struct  saxpy
 Computes the saxpy ("scalar a x plus b") operation: ( $a*x + y$) between two values. More...
 
struct  z1conjz2
 Computes the complex operation: ( $z1\overline{z2}$) between two complex values z1 and z2. More...
 
struct  conjz1z2
 Computes the complex operation: ( $\overline{z1}z2$) between two complex values z1 and z2. More...
 
struct  __true_type
 
struct  __false_type
 
struct  __is_real
 
struct  __is_real< float >
 
struct  __is_real< double >
 
struct  __is_real< long double >
 
struct  __is_complex
 
struct  __is_complex< std::complex< float > >
 
struct  __is_complex< std::complex< double > >
 
struct  __is_complex< std::complex< long double > >
 
struct  lin_alg_traits
 
struct  lin_alg_traits< std::complex< _Tp > >
 
struct  un_real
 Real functor. Return the real part of x. More...
 
struct  un_imag
 Imag functor. Return the imaginary part of x. More...
 
struct  un_abs
 Abs functor. Return the absolute value of x. More...
 
struct  less_abs
 Compare two element according to their absolute value. Return true if std::abs(__x) < std::abs( __y). More...
 
struct  greater_abs
 Compare two element according to their absolute value. Return true if std::abs(__x) > std::abs( __y). More...
 
struct  mini
 Computes the minimum value between two values. More...
 
struct  maxi
 Computes the maximum value between two values. More...
 
struct  Sign
 
struct  complex_sign
 
struct  gt_it
 
struct  lt_it
 
struct  constants
 A structure for numeric constants. More...
 
struct  SafeN2C
 
struct  N2C
 
struct  SafePrev2C
 
struct  Prev2C
 
struct  SafeNext2C
 
struct  Next2C
 
struct  SafeN8C
 
struct  N8C
 
struct  SafePrev8C
 
struct  Prev8C
 
struct  SafeNext8C
 
struct  Next8C
 
struct  SafeN4C
 
struct  N4C
 
struct  SafeNext4C
 
struct  SafePrev4C
 
struct  Prev4C
 
struct  Next4C
 
struct  SafePseudoHexagonal
 
struct  PseudoHexagonal
 
struct  SafePrevPseudoHexagonal
 
struct  SafeNextPseudoHexagonal
 
struct  PrevPseudoHexagonal
 
struct  NextPseudoHexagonal
 
struct  SafeN6C
 
struct  N6C
 
struct  SafePrev6C
 
struct  Prev6C
 
struct  SafeNext6C
 
struct  Next6C
 
struct  SafeN26C
 
struct  N26C
 
struct  SafePrev26C
 
struct  Prev26C
 
struct  SafeNext26C
 
struct  Next26C
 
struct  SafeN18C
 
struct  N18C
 
struct  SafePrev18C
 
struct  Prev18C
 
struct  SafeNext18C
 
struct  Next18C
 
struct  SafeN4D8C
 safe version of N4D8C neighborhood (only existing neighbors are returned) More...
 
struct  N4D8C
 N4D8C neighborhood. More...
 
struct  SafePrev4D8C
 safe version of previous N4D8C neighborhood (only previous and existing neighbors are returned) More...
 
struct  Prev4D8C
 previous N4D8C neighborhood (only previous neighbors are returned) More...
 
struct  SafeNext4D8C
 safe version of next N4D8C neighborhood (only next and existing neighbors are returned) More...
 
struct  Next4D8C
 next N4D8C neighborhood (only next neighbors are returned) More...
 
struct  EvalBasis
 
struct  EvalPowerBasis
 
struct  EvalLegendreBasis
 
struct  EvalChebyshevBasis
 
struct  EvalPower2dBasis
 
struct  EvalPowerNdBasis
 
struct  Statistics
 This is a structure to store descriptive statistics. More...
 
struct  __cardinal
 
struct  __cardinal< Integer, std::random_access_iterator_tag >
 
struct  __cardinal< Integer, std::random_access_iterator2d_tag >
 
struct  __cardinal< Integer, std::random_access_iterator3d_tag >
 
struct  __median
 
struct  __median< std::random_access_iterator_tag >
 
class  GenericComparator
 
struct  binarize_fun
 Functor object used to binarize a value. More...
 
struct  threshold_fun
 Functor object used to threshold a value. More...
 
struct  db_threshold_fun
 Functor object used to double-threshold a value. More...
 
class  Array
 This is a linear (one-dimensional) dynamic template container. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). More...
 
class  stride_iterator
 
class  iterator2d_box
 This is some iterator to iterate a 2d container into a slip::Box2d area defined by the indices of the 2d container. More...
 
class  iterator2d_range
 This is some iterator to iterate a 2d container into two Range defined by the indices and strides of the 2d container. More...
 
class  const_iterator2d_box
 This is some iterator to iterate a 2d container into a Box area defined by the indices of the 2d container. More...
 
class  const_iterator2d_range
 This is some iterator to iterate a 2d container into two Range defined by the indices and strides of the 2d container. More...
 
class  DPoint2d
 Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2. More...
 
class  Point2d
 This is a point2d class, a specialized version of Point<CoordType,DIM> with DIM = 2. More...
 
class  Array2d
 This is a two-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. More...
 
class  Array3d
 This is a three-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. More...
 
class  Array4d
 This is a four-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 4d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the quadruple bracket element access. More...
 
struct  block
 This is a linear (one-dimensional) static container. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). More...
 
class  kstride_iterator
 
struct  block2d
 This is a two-dimensional static and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. More...
 
class  block3d
 This a three-dimensional static and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 3d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. More...
 
class  block4d
 This a four-dimensional static and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 4d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the quadruple bracket element access. More...
 
class  Point
 Define an abstract Point structure. More...
 
class  DPoint
 Define an abstract DPoint structure. More...
 
class  Box
 Define an abstract Box structure. More...
 
class  Box1d
 This is a Box1d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 1. More...
 
class  Box2d
 This is a Box2d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 2. More...
 
class  Box3d
 This is a Box3d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 3. More...
 
class  Box4d
 This is a Box4d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 4. More...
 
class  CameraModel
 Define an abstract CameraModel class. More...
 
class  Color
 This is a Color struct. More...
 
class  ColorHyperVolume
 This is a color hyper volume (4D) class. This container defines STL Bidirectionnal iterators begin and end. It defines also 4d extensions of the RandomAccess Iterators called first_front_upper_left and last_back_bottom_right(). As a consequence, the bracket element access is replaced by the triple bracket element access. It is a specialization of GenericMulitComponent4d using Color blocks. More...
 
class  ColorImage
 This is a color image class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It is a specialization of GenericMulitComponent2d using Color blocks. Moreover it contains image read/write operations. These operations are done using the ImageMagick library. More...
 
class  Colormap
 Colormap container. This is a linear (one-dimensional) dynamic template container. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). More...
 
class  ColorVolume
 This is a color volume class. This container defines STL Bidirectionnal iterators begin and end. It defines also 3d extensions of the RandomAccess Iterators called front_upper_left and back_bottom_right(). As a consequence, the bracket element access is replaced by the triple bracket element access. It is a specialization of GenericMulitComponent3d using Color blocks. More...
 
class  component_iterator2d_box
 This is some iterator to iterate a 2d MultiComponentContainer into a Box area defined by the indices of the 2d container. More...
 
class  const_component_iterator2d_box
 This is some iterator to iterate a 2d MultiComponentContainer into a Box area defined by the indices of the 2d container. More...
 
class  component_iterator2d_range
 This is some iterator to iterate a 2d container into two Range defined by the indices and strides of the 2d container. More...
 
class  const_component_iterator2d_range
 This is some iterator to iterate a 2d container into two Range defined by the indices and strides of the 2d container. More...
 
class  component_iterator3d_box
 This is some iterator to iterate a 3d MultiComponentContainer into a Box area defined by the indices of the 3d container. More...
 
class  const_component_iterator3d_box
 This is some iterator to iterate a 3d MultiComponentContainer into a Box area defined by the indices of the 3d container. More...
 
class  component_iterator3d_range
 This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container. More...
 
class  const_component_iterator3d_range
 This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container. More...
 
class  component_iterator4d_box
 This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices of the 4d container. More...
 
class  const_component_iterator4d_box
 This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices of the 4d container. More...
 
class  component_iterator4d_range
 This is some iterator to iterate a 4d container into two Range defined by the indices and strides of the 4d container. More...
 
class  const_component_iterator4d_range
 This is some iterator to iterate a 4d container into two Range defined by the indices and strides of the 4d container. More...
 
struct  __container_iterator_cast
 
struct  __container_iterator_cast< std::random_access_iterator_tag >
 
struct  __container_iterator_cast< std::random_access_iterator2d_tag >
 
struct  __container_iterator_cast< std::random_access_iterator3d_tag >
 
struct  __reverse_container_iterator_cast
 
struct  __reverse_container_iterator_cast< std::random_access_iterator_tag >
 
struct  __reverse_container_iterator_cast< std::random_access_iterator2d_tag >
 
struct  __reverse_container_iterator_cast< std::random_access_iterator3d_tag >
 
struct  __container_iterator_castR
 
struct  __container_iterator_castR< std::random_access_iterator_tag >
 
struct  __container_iterator_castR< std::random_access_iterator2d_tag >
 
struct  __container_iterator_castR< std::random_access_iterator3d_tag >
 
class  CUFTree
 Define an union find tree. More...
 
class  DenseVector2dField2d
 This is a Dense Vector2d Field. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It is a specialization of GenericMultiComponent2d using Vector2d blocks. It implements arithmetic and mathematical operators and read/write methods (tecplot and gnuplot file format...). Contrary to slip::RegularVector2dField2d, this container is not associated with a grid. More...
 
class  DenseVector3dField2d
 This is a dense 2d Field containing Vector3d. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It is a specialization of GenericMultiComponent2d using Vector3d blocks. It implements arithmetic and mathematical operators and read/write methods (tecplot and gnuplot file format...). More...
 
class  iterator3d_box
 This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d container. More...
 
class  iterator3d_range
 This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container. More...
 
class  const_iterator3d_box
 This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d container. More...
 
class  const_iterator3d_range
 This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container. More...
 
class  DPoint3d
 Difference of Point3D class, specialization of DPoint<CoordType,DIM> with DIM = 3. More...
 
class  Point3d
 This is a point3d class, a specialized version of Point<CoordType,DIM> with DIM = 3. More...
 
class  DenseVector3dField3d
 This is a Dense Vector3d Field. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 3d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. It is a specialization of GenericMultiComponent3d using Vector3d blocks. It implements arithmetic and mathematical operators and read/write methods (tecplot and gnuplot file format...). Contrary to slip::RegularVector3dField3d, this container is not associated with a grid. More...
 
struct  DistStruct
 
class  DistortionCamera
 Define a DistortionCamera class. More...
 
class  DPoint1d
 Difference of Point1D class, specialization of DPoint<CoordType,DIM> with DIM = 1. More...
 
class  DPoint4d
 Difference of Point4D class, specialization of DPoint<CoordType,DIM> with DIM = 4. More...
 
class  slip_exception
 standard exception extension name have been changed to eliminate conflicts with QT More...
 
class  GenericMultiComponent2d
 This is a GenericMultiComponent2d class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. Data are stored using a Matrix of Block. It is essentially an internal class used to define slip::ColorImage, slip::MultispectralImage, slip::DenseVector2dField2d, slip::DenseVector3dField2d. But it can be used to define other 2d Multicomponent structures. More...
 
class  Matrix
 Numerical matrix class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It extends the interface of Array2d adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators: min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply... More...
 
class  GenericMultiComponent3d
 This is a GenericMultiComponent3d class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 3d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. Data are stored using a Matrix3d of Block. It is essentially an internal class used to define slip::DenseVector3dField3d. But it can be used to define other 3d Multicomponent structures. More...
 
class  Matrix3d
 Numerical matrix3d class. This container statisfies the RandomAccessContainer concepts of the STL except the simple bracket which is replaced by a double bracket. It extends the interface of Array3d adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators : min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply... More...
 
struct  L2_dist< typename Block::value_type, slip::GenericMultiComponent3d< Block > >
 
class  Point4d
 This is a point4d class, a specialized version of Point<CoordType,DIM> with DIM = 4. More...
 
class  GenericMultiComponent4d
 This is a GenericMultiComponent4d class. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 4d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. Data are stored using a Matrix4d of Block. This class can be used to define 4d Multicomponent structures. More...
 
class  Matrix4d
 Numerical matrix4d class. This container statisfies the RandomAccessContainer concepts of the STL except the simple bracket which is replaced by a double bracket. It extends the interface of Array4d adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators : min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply... More...
 
class  Range
 This is a Range class. More...
 
class  GrayscaleImage
 This is a grayscaleimage class. This is a two-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. Data are stored using a Matrix class. It extends the interface of Matrix adding image read/write operations. These operations are done using the ImageMagick library. More...
 
class  HyperVolume
 Numerical container class This is a four-dimensional dynamic and generic container. This container satisfies the BidirectionnalContainer concepts of the STL. It is also an 4d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. Data are stored using a Matrix4d class. It extends the interface of Matrix4d adding image read/write operations. These operations are done using the ImageMagick library. More...
 
class  iterator3d_plane
 This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d container. More...
 
class  const_iterator3d_plane
 This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d container. More...
 
class  iterator4d_box
 This is some iterator to iterate a 4d container into a Box area defined by the subscripts of the 4d container. More...
 
class  const_iterator4d_box
 This is some iterator to iterate a 4d container into a Box area defined by the subscripts of the 4d container. More...
 
class  iterator4d_range
 This is some iterator to iterate a 4d container into two Range defined by the indices and strides of the 4d container. More...
 
class  const_iterator4d_range
 Some const iterator to iterate a 4d container into two Range defined by the indices and strides of the 4d container. More...
 
struct  kvector
 This is a linear (one-dimensional) static vector. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). It extends the interface of Array adding arithmetical: +=, -=, *=, /=, +,-,/,*... and mathematical operators : min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply, Euclidean norm, L1 norm, L2 norm... More...
 
class  MultispectralImage
 This is a Multi Spectral Image container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It is a specialization of slip::GenericMulitComponent2d using blocks. More...
 
struct  Monomial
 Numerical Monomial structure. More...
 
class  MultivariatePolynomial
 Numerical MultivariatePolynomial class. More...
 
class  PinholeCamera
 Define a PinholeCamera class. More...
 
class  PinholeDLTCamera
 Define a PinholeDLTCamera class. More...
 
class  PinholeFaugerasCamera
 Define a PinholeFaugerasCamera class. More...
 
class  Point1d
 This is a point1d class, a specialized version of Point<CoordType,DIM> with DIM = 1. More...
 
class  Polynomial
 Numerical Polynomial class. This container statisfies the RandomAccessContainer concepts of the STL The coefficients of the polynomial $a0 + a1x + a2x^2 +... anx^n $ are ordered as follows : (a0,a1,...,an) More...
 
struct  __container_size
 
struct  __container_size< Container, std::random_access_iterator_tag >
 
struct  __container_size< Container, std::random_access_iterator2d_tag >
 
struct  __container_size< Container, std::random_access_iterator3d_tag >
 
struct  ContainerSize
 
struct  __container_resolution
 
struct  __container_resolution< Container, std::random_access_iterator_tag >
 
struct  __container_resolution< Container, std::random_access_iterator2d_tag >
 
struct  __container_resolution< Container, std::random_access_iterator3d_tag >
 
struct  ContainerResolution
 
struct  __container_allocator
 
struct  __container_allocator< Container, std::random_access_iterator_tag >
 
struct  __container_allocator< Container, std::random_access_iterator2d_tag >
 
struct  __container_allocator< Container, std::random_access_iterator3d_tag >
 
struct  ContainerAllocator
 
struct  __pyramid_allocator
 
struct  __pyramid_allocator< Container, std::random_access_iterator_tag >
 
struct  __pyramid_allocator< Container, std::random_access_iterator2d_tag >
 
struct  __pyramid_allocator< Container, std::random_access_iterator3d_tag >
 
struct  Pyramid_Allocator
 
struct  __pyramid_copy
 
struct  __pyramid_copy< Container, std::random_access_iterator_tag >
 
struct  __pyramid_copy< Container, std::random_access_iterator2d_tag >
 
struct  __pyramid_copy< Container, std::random_access_iterator3d_tag >
 
struct  Pyramid_Copy
 
class  Pyramid
 This is container to handle a pyramid of containers. More...
 
class  RegularVector2dField2d
 This is a 2d Field containing slip::Vector2d associated with a regular grid. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the double bracket element access. It is a specialization of GenericMultiComponent2d using Vector2d blocks. It implements arithmetic and mathematical operators (divergence, vorticity, derivative...) and read/write methods (tecplot and gnuplot file format). The points of the Vector field grid are assumed to be spaced by two regular steps. The inital point (closest point from the physical axis origin) of the grid is also stored within the data structure. More...
 
class  RegularVector3dField3d
 This is a Regular Vector3d Field. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 3d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. It is a specialization of GenericMultiComponent3d using slip::Vector3d blocks. It implements arithmetic and mathematical operators (divergence, vorticity, derivative...) and read/write methods (tecplot file format). The points of the Vector field grid are assumed to be spaced by two regular steps. The inital point (closest point from the physical axis origin) of the grid is also stored within the data structure. More...
 
class  Signal
 Numerical Signal class. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). Data are stored using a Vector class. It extends the interface of Vector adding signal read/write operations. More...
 
class  SoloffCamera
 Define a SoloffCamera class. More...
 
class  Vector
 Numerical Vector class. This container statisfies the RandomAccessContainer concepts of the Standard Template Library (STL). It extends the interface of Array adding arithmetical: +=, -=, *=, /=,+,-,/,*... and mathematical operators : min, max, abs, sqrt, cos, acos, sin, asin, tan, atan, exp, log, cosh, sinh, tanh, log10, sum, apply... More...
 
class  Vector2d
 This is a Vector2d struct. It is a specialization of kvector. It implements some peculiar 2d operations. More...
 
struct  AE_rad
 Computes the angular error usually used in optical flow estimation evaluations:

\[ \arccos\left(\frac{w_g\cdot w_e}{||w_g||_2||w_e||_2}\right) \]

where : More...

 
struct  AE_deg
 Computes the angular error usually used in optical flow estimation evaluations:

\[ \frac{180}{\pi}\arccos\left(\frac{w_g\cdot w_e}{||w_g||_2||w_e||_2}\right) \]

where: More...

 
class  Vector3d
 This is a Vector3d struct. It is a specialization of kvector. It implements some specific 3d operations. More...
 
class  Vector4d
 This is a Vector4d struct. It is a specialization of kvector. It implements some specific 4d operations. More...
 
class  Volume
 Numerical volume class This is a two-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 3d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. Data are stored using a Matrix3d class. It extends the interface of Matrix3d adding image read/write operations. These operations are done using the ImageMagick library. More...
 
class  AvReader
 AvReader, inherited from ContainerReader, is a reader for videos. More...
 
class  AvWriter
 AvWriter is a video writer. More...
 
class  ContainerReader
 ContainerReader is the base class of the readers classes. All readers are working the same way: More...
 
class  ContainerWriter
 ContainerWriter is the base class of the writer classes. All the writers are working the same way: More...
 
class  FITSReader
 FITSReader, inherited from ContainerReader, is a reader of fits files (only Single Image FITS file as the reader read only the PHDU) More...
 
class  FITSWriter
 FITSWriter is a fits writer. More...
 
class  JpegReader
 JpegReader, inherited from ContainerReader, is a reader for jpeg images. More...
 
class  JpegWriter
 JpegWriter is the jpeg image writer. More...
 
class  NetCDFReader
 NetCDFReader, inherited from ContainerReader, is a reader of netcdf files. More...
 
class  NetCDFWriter
 NetCDFWriter is a net. More...
 
class  PngReader
 PngReader, inherited from ContainerReader, is a reader for png images. More...
 
struct  png_static_cast_func
 
class  PngWriter
 PngWriter is the png image writer. More...
 
class  WavReader
 WavReader, inherited from ContainerReader, is a reader for wav audio files. More...
 
class  WavWriter
 WavWriter is the wave array writer. More...
 

Typedefs

typedef slip::Array< double > Array_d
 double alias More...
 
typedef slip::Array< float > Array_f
 float alias More...
 
typedef slip::Array< long > Array_l
 long alias More...
 
typedef slip::Array< unsigned
long > 
Array_ul
 unsigned long alias More...
 
typedef slip::Array< short > Array_s
 short alias More...
 
typedef slip::Array< unsigned
short > 
Array_us
 unsigned long alias More...
 
typedef slip::Array< int > Array_i
 int alias More...
 
typedef slip::Array< unsigned int > Array_ui
 unsigned int alias More...
 
typedef slip::Array< char > Array_c
 char alias More...
 
typedef slip::Array< unsigned
char > 
Array_uc
 unsigned char alias More...
 
typedef slip::Array2d< double > Array2d_d
 double alias More...
 
typedef slip::Array2d< float > Array2d_f
 float alias More...
 
typedef slip::Array2d< long > Array2d_l
 long alias More...
 
typedef slip::Array2d
< unsigned long > 
Array2d_ul
 unsigned long alias More...
 
typedef slip::Array2d< short > Array2d_s
 short alias More...
 
typedef slip::Array2d
< unsigned short > 
Array2d_us
 unsigned long alias More...
 
typedef slip::Array2d< int > Array2d_i
 int alias More...
 
typedef slip::Array2d
< unsigned int > 
Array2d_ui
 unsigned int alias More...
 
typedef slip::Array2d< char > Array2d_c
 char alias More...
 
typedef slip::Array2d
< unsigned char > 
Array2d_uc
 unsigned char alias More...
 
typedef slip::Array3d< double > Array3d_d
 double alias More...
 
typedef slip::Array3d< float > Array3d_f
 float alias More...
 
typedef slip::Array3d< long > Array3d_l
 long alias More...
 
typedef slip::Array3d
< unsigned long > 
Array3d_ul
 unsigned long alias More...
 
typedef slip::Array3d< short > Array3d_s
 short alias More...
 
typedef slip::Array3d
< unsigned short > 
Array3d_us
 unsigned long alias More...
 
typedef slip::Array3d< int > Array3d_i
 int alias More...
 
typedef slip::Array3d
< unsigned int > 
Array3d_ui
 unsigned int alias More...
 
typedef slip::Array3d< char > Array3d_c
 char alias More...
 
typedef slip::Array3d
< unsigned char > 
Array3d_uc
 unsigned char alias More...
 
typedef slip::Array4d< double > Array4d_d
 double alias More...
 
typedef slip::Array4d< float > Array4d_f
 float alias More...
 
typedef slip::Array4d< long > Array4d_l
 long alias More...
 
typedef slip::Array4d
< unsigned long > 
Array4d_ul
 unsigned long alias More...
 
typedef slip::Array4d< short > Array4d_s
 short alias More...
 
typedef slip::Array4d
< unsigned short > 
Array4d_us
 unsigned long alias More...
 
typedef slip::Array4d< int > Array4d_i
 int alias More...
 
typedef slip::Array4d
< unsigned int > 
Array4d_ui
 unsigned int alias More...
 
typedef slip::Array4d< char > Array4d_c
 char alias More...
 
typedef slip::Array4d
< unsigned char > 
Array4d_uc
 unsigned char alias More...
 
typedef slip::Color< double > Color_d
 double alias More...
 
typedef slip::Color< float > Color_f
 float alias More...
 
typedef slip::Color< long > Color_l
 long alias More...
 
typedef slip::Color< unsigned
long > 
Color_ul
 unsigned long alias More...
 
typedef slip::Color< short > Color_s
 short alias More...
 
typedef slip::Color< unsigned
short > 
Color_us
 unsigned long alias More...
 
typedef slip::Color< int > Color_i
 int alias More...
 
typedef slip::Color< unsigned int > Color_ui
 unsigned int alias More...
 
typedef slip::Color< char > Color_c
 char alias More...
 
typedef slip::Color< unsigned
char > 
Color_uc
 unsigned char alias More...
 
typedef slip::ColorHyperVolume
< double > 
ColorHyperVolume_d
 double alias More...
 
typedef slip::ColorHyperVolume
< float > 
ColorHyperVolume_f
 float alias More...
 
typedef slip::ColorHyperVolume
< long > 
ColorHyperVolume_l
 long alias More...
 
typedef slip::ColorHyperVolume
< unsigned long > 
ColorHyperVolume_ul
 unsigned long alias More...
 
typedef slip::ColorHyperVolume
< short > 
ColorHyperVolume_s
 short alias More...
 
typedef slip::ColorHyperVolume
< unsigned short > 
ColorHyperVolume_us
 unsigned long alias More...
 
typedef slip::ColorHyperVolume
< int > 
ColorHyperVolume_i
 int alias More...
 
typedef slip::ColorHyperVolume
< unsigned int > 
ColorHyperVolume_ui
 unsigned int alias More...
 
typedef slip::ColorHyperVolume
< char > 
ColorHyperVolume_c
 char alias More...
 
typedef slip::ColorHyperVolume
< unsigned char > 
ColorHyperVolume_uc
 unsigned char alias More...
 
typedef slip::ColorImage< double > ColorImage_d
 double alias More...
 
typedef slip::ColorImage< float > ColorImage_f
 float alias More...
 
typedef slip::ColorImage< long > ColorImage_l
 long alias More...
 
typedef slip::ColorImage
< unsigned long > 
ColorImage_ul
 unsigned long alias More...
 
typedef slip::ColorImage< short > ColorImage_s
 short alias More...
 
typedef slip::ColorImage
< unsigned short > 
ColorImage_us
 unsigned long alias More...
 
typedef slip::ColorImage< int > ColorImage_i
 int alias More...
 
typedef slip::ColorImage
< unsigned int > 
ColorImage_ui
 unsigned int alias More...
 
typedef slip::ColorImage< char > ColorImage_c
 char alias More...
 
typedef slip::ColorImage
< unsigned char > 
ColorImage_uc
 unsigned char alias More...
 
typedef slip::Colormap< double > Colormap_d
 double alias More...
 
typedef slip::Colormap< float > Colormap_f
 float alias More...
 
typedef slip::Colormap< long > Colormap_l
 long alias More...
 
typedef slip::Colormap
< unsigned long > 
Colormap_ul
 unsigned long alias More...
 
typedef slip::Colormap< short > Colormap_s
 short alias More...
 
typedef slip::Colormap
< unsigned short > 
Colormap_us
 unsigned long alias More...
 
typedef slip::Colormap< int > Colormap_i
 int alias More...
 
typedef slip::Colormap
< unsigned int > 
Colormap_ui
 unsigned int alias More...
 
typedef slip::Colormap< char > Colormap_c
 char alias More...
 
typedef slip::Colormap
< unsigned char > 
Colormap_uc
 unsigned char alias More...
 
typedef slip::ColorVolume< double > ColorVolume_d
 double alias More...
 
typedef slip::ColorVolume< float > ColorVolume_f
 float alias More...
 
typedef slip::ColorVolume< long > ColorVolume_l
 long alias More...
 
typedef slip::ColorVolume
< unsigned long > 
ColorVolume_ul
 unsigned long alias More...
 
typedef slip::ColorVolume< short > ColorVolume_s
 short alias More...
 
typedef slip::ColorVolume
< unsigned short > 
ColorVolume_us
 unsigned long alias More...
 
typedef slip::ColorVolume< int > ColorVolume_i
 int alias More...
 
typedef slip::ColorVolume
< unsigned int > 
ColorVolume_ui
 unsigned int alias More...
 
typedef slip::ColorVolume< char > ColorVolume_c
 char alias More...
 
typedef slip::ColorVolume
< unsigned char > 
ColorVolume_uc
 unsigned char alias More...
 
typedef
slip::DenseVector2dField2d
< double > 
DenseVector2dField2d_d
 double alias More...
 
typedef
slip::DenseVector2dField2d
< float > 
DenseVector2dField2d_f
 float alias More...
 
typedef
slip::DenseVector2dField2d
< long > 
DenseVector2dField2d_l
 long alias More...
 
typedef
slip::DenseVector2dField2d
< unsigned long > 
DenseVector2dField2d_ul
 unsigned long alias More...
 
typedef
slip::DenseVector2dField2d
< short > 
DenseVector2dField2d_s
 short alias More...
 
typedef
slip::DenseVector2dField2d
< unsigned short > 
DenseVector2dField2d_us
 unsigned long alias More...
 
typedef
slip::DenseVector2dField2d
< int > 
DenseVector2dField2d_i
 int alias More...
 
typedef
slip::DenseVector2dField2d
< unsigned int > 
DenseVector2dField2d_ui
 unsigned int alias More...
 
typedef
slip::DenseVector2dField2d
< char > 
DenseVector2dField2d_c
 char alias More...
 
typedef
slip::DenseVector2dField2d
< unsigned char > 
DenseVector2dField2d_uc
 unsigned char alias More...
 
typedef
slip::DenseVector3dField2d
< double > 
DenseVector3dField2d_d
 double alias More...
 
typedef
slip::DenseVector3dField2d
< float > 
DenseVector3dField2d_f
 float alias More...
 
typedef
slip::DenseVector3dField2d
< long > 
DenseVector3dField2d_l
 long alias More...
 
typedef
slip::DenseVector3dField2d
< unsigned long > 
DenseVector3dField2d_ul
 unsigned long alias More...
 
typedef
slip::DenseVector3dField2d
< short > 
DenseVector3dField2d_s
 short alias More...
 
typedef
slip::DenseVector3dField2d
< unsigned short > 
DenseVector3dField2d_us
 unsigned long alias More...
 
typedef
slip::DenseVector3dField2d
< int > 
DenseVector3dField2d_i
 int alias More...
 
typedef
slip::DenseVector3dField2d
< unsigned int > 
DenseVector3dField2d_ui
 unsigned int alias More...
 
typedef
slip::DenseVector3dField2d
< char > 
DenseVector3dField2d_c
 char alias More...
 
typedef
slip::DenseVector3dField2d
< unsigned char > 
DenseVector3dField2d_uc
 unsigned char alias More...
 
typedef
slip::DenseVector3dField3d
< double > 
DenseVector3dField3d_d
 double alias More...
 
typedef
slip::DenseVector3dField3d
< float > 
DenseVector3dField3d_f
 float alias More...
 
typedef
slip::DenseVector3dField3d
< long > 
DenseVector3dField3d_l
 long alias More...
 
typedef
slip::DenseVector3dField3d
< unsigned long > 
DenseVector3dField3d_ul
 unsigned long alias More...
 
typedef
slip::DenseVector3dField3d
< short > 
DenseVector3dField3d_s
 short alias More...
 
typedef
slip::DenseVector3dField3d
< unsigned short > 
DenseVector3dField3d_us
 unsigned long alias More...
 
typedef
slip::DenseVector3dField3d
< int > 
DenseVector3dField3d_i
 int alias More...
 
typedef
slip::DenseVector3dField3d
< unsigned int > 
DenseVector3dField3d_ui
 unsigned int alias More...
 
typedef
slip::DenseVector3dField3d
< char > 
DenseVector3dField3d_c
 char alias More...
 
typedef
slip::DenseVector3dField3d
< unsigned char > 
DenseVector3dField3d_uc
 unsigned char alias More...
 
typedef slip::GrayscaleImage
< double > 
GrayscaleImage_d
 double alias More...
 
typedef slip::GrayscaleImage
< float > 
GrayscaleImage_f
 float alias More...
 
typedef slip::GrayscaleImage
< long > 
GrayscaleImage_l
 long alias More...
 
typedef slip::GrayscaleImage
< unsigned long > 
GrayscaleImage_ul
 unsigned long alias More...
 
typedef slip::GrayscaleImage
< short > 
GrayscaleImage_s
 short alias More...
 
typedef slip::GrayscaleImage
< unsigned short > 
GrayscaleImage_us
 unsigned long alias More...
 
typedef slip::GrayscaleImage< int > GrayscaleImage_i
 int alias More...
 
typedef slip::GrayscaleImage
< unsigned int > 
GrayscaleImage_ui
 unsigned int alias More...
 
typedef slip::GrayscaleImage
< char > 
GrayscaleImage_c
 char alias More...
 
typedef slip::GrayscaleImage
< unsigned char > 
GrayscaleImage_uc
 unsigned char alias More...
 
typedef slip::HyperVolume< double > HyperVolume_d
 double alias More...
 
typedef slip::HyperVolume< float > HyperVolume_f
 float alias More...
 
typedef slip::HyperVolume< long > HyperVolume_l
 long alias More...
 
typedef slip::HyperVolume
< unsigned long > 
HyperVolume_ul
 unsigned long alias More...
 
typedef slip::HyperVolume< short > HyperVolume_s
 short alias More...
 
typedef slip::HyperVolume
< unsigned short > 
HyperVolume_us
 unsigned long alias More...
 
typedef slip::HyperVolume< int > HyperVolume_i
 int alias More...
 
typedef slip::HyperVolume
< unsigned int > 
HyperVolume_ui
 unsigned int alias More...
 
typedef slip::HyperVolume< char > HyperVolume_c
 char alias More...
 
typedef slip::HyperVolume
< unsigned char > 
HyperVolume_uc
 unsigned char alias More...
 
typedef slip::Matrix< double > Matrix_d
 double alias More...
 
typedef slip::Matrix< float > Matrix_f
 float alias More...
 
typedef slip::Matrix< long > Matrix_l
 long alias More...
 
typedef slip::Matrix< unsigned
long > 
Matrix_ul
 unsigned long alias More...
 
typedef slip::Matrix< short > Matrix_s
 short alias More...
 
typedef slip::Matrix< unsigned
short > 
Matrix_us
 unsigned long alias More...
 
typedef slip::Matrix< int > Matrix_i
 int alias More...
 
typedef slip::Matrix< unsigned
int > 
Matrix_ui
 unsigned int alias More...
 
typedef slip::Matrix< char > Matrix_c
 char alias More...
 
typedef slip::Matrix< unsigned
char > 
Matrix_uc
 unsigned char alias More...
 
typedef slip::Matrix3d< double > Matrix3d_d
 double alias More...
 
typedef slip::Matrix3d< float > Matrix3d_f
 float alias More...
 
typedef slip::Matrix3d< long > Matrix3d_l
 long alias More...
 
typedef slip::Matrix3d
< unsigned long > 
Matrix3d_ul
 unsigned long alias More...
 
typedef slip::Matrix3d< short > Matrix3d_s
 short alias More...
 
typedef slip::Matrix3d
< unsigned short > 
Matrix3d_us
 unsigned long alias More...
 
typedef slip::Matrix3d< int > Matrix3d_i
 int alias More...
 
typedef slip::Matrix3d
< unsigned int > 
Matrix3d_ui
 unsigned int alias More...
 
typedef slip::Matrix3d< char > Matrix3d_c
 char alias More...
 
typedef slip::Matrix3d
< unsigned char > 
Matrix3d_uc
 unsigned char alias More...
 
typedef slip::Matrix4d< double > Matrix4d_d
 double alias More...
 
typedef slip::Matrix4d< float > Matrix4d_f
 float alias More...
 
typedef slip::Matrix4d< long > Matrix4d_l
 long alias More...
 
typedef slip::Matrix4d
< unsigned long > 
Matrix4d_ul
 unsigned long alias More...
 
typedef slip::Matrix4d< short > Matrix4d_s
 short alias More...
 
typedef slip::Matrix4d
< unsigned short > 
Matrix4d_us
 unsigned long alias More...
 
typedef slip::Matrix4d< int > Matrix4d_i
 int alias More...
 
typedef slip::Matrix4d
< unsigned int > 
Matrix4d_ui
 unsigned int alias More...
 
typedef slip::Matrix4d< char > Matrix4d_c
 char alias More...
 
typedef slip::Matrix4d
< unsigned char > 
Matrix4d_uc
 unsigned char alias More...
 
typedef slip::Point1d< double > Point1d_d
 double alias More...
 
typedef slip::Point1d< float > Point1d_f
 float alias More...
 
typedef slip::Point1d< long > Point1d_l
 long alias More...
 
typedef slip::Point1d
< unsigned long > 
Point1d_ul
 unsigned long alias More...
 
typedef slip::Point1d< short > Point1d_s
 short alias More...
 
typedef slip::Point1d
< unsigned short > 
Point1d_us
 unsigned long alias More...
 
typedef slip::Point1d< int > Point1d_i
 int alias More...
 
typedef slip::Point1d
< unsigned int > 
Point1d_ui
 unsigned int alias More...
 
typedef slip::Point1d< char > Point1d_c
 char alias More...
 
typedef slip::Point1d
< unsigned char > 
Point1d_uc
 unsigned char alias More...
 
typedef slip::Point2d< double > Point2d_d
 double alias More...
 
typedef slip::Point2d< float > Point2d_f
 float alias More...
 
typedef slip::Point2d< long > Point2d_l
 long alias More...
 
typedef slip::Point2d
< unsigned long > 
Point2d_ul
 unsigned long alias More...
 
typedef slip::Point2d< short > Point2d_s
 short alias More...
 
typedef slip::Point2d
< unsigned short > 
Point2d_us
 unsigned long alias More...
 
typedef slip::Point2d< int > Point2d_i
 int alias More...
 
typedef slip::Point2d
< unsigned int > 
Point2d_ui
 unsigned int alias More...
 
typedef slip::Point2d< char > Point2d_c
 char alias More...
 
typedef slip::Point2d
< unsigned char > 
Point2d_uc
 unsigned char alias More...
 
typedef slip::Point3d< double > Point3d_d
 double alias More...
 
typedef slip::Point3d< float > Point3d_f
 float alias More...
 
typedef slip::Point3d< long > Point3d_l
 long alias More...
 
typedef slip::Point3d
< unsigned long > 
Point3d_ul
 unsigned long alias More...
 
typedef slip::Point3d< short > Point3d_s
 short alias More...
 
typedef slip::Point3d
< unsigned short > 
Point3d_us
 unsigned long alias More...
 
typedef slip::Point3d< int > Point3d_i
 int alias More...
 
typedef slip::Point3d
< unsigned int > 
Point3d_ui
 unsigned int alias More...
 
typedef slip::Point3d< char > Point3d_c
 char alias More...
 
typedef slip::Point3d
< unsigned char > 
Point3d_uc
 unsigned char alias More...
 
typedef slip::Point4d< double > Point4d_d
 double alias More...
 
typedef slip::Point4d< float > Point4d_f
 float alias More...
 
typedef slip::Point4d< long > Point4d_l
 long alias More...
 
typedef slip::Point4d
< unsigned long > 
Point4d_ul
 unsigned long alias More...
 
typedef slip::Point4d< short > Point4d_s
 short alias More...
 
typedef slip::Point4d
< unsigned short > 
Point4d_us
 unsigned long alias More...
 
typedef slip::Point4d< int > Point4d_i
 int alias More...
 
typedef slip::Point4d
< unsigned int > 
Point4d_ui
 unsigned int alias More...
 
typedef slip::Point4d< char > Point4d_c
 char alias More...
 
typedef slip::Point4d
< unsigned char > 
Point4d_uc
 unsigned char alias More...
 
typedef RegularVector2dField2d
< double, double > 
Regular2D3Cd
 double alias More...
 
typedef RegularVector2dField2d
< float, double > 
Regular2D3Cf
 float alias More...
 
typedef RegularVector2dField2d
< double, double > 
Regular2D3C_d
 double alias More...
 
typedef RegularVector2dField2d
< float, double > 
Regular2D3C_f
 float alias More...
 
typedef
slip::RegularVector2dField2d
< double, double > 
RegularVector2dField2d_d
 double alias More...
 
typedef
slip::RegularVector2dField2d
< float, double > 
RegularVector2dField2d_f
 float alias More...
 
typedef
slip::RegularVector2dField2d
< long, double > 
RegularVector2dField2d_l
 long alias More...
 
typedef
slip::RegularVector2dField2d
< unsigned long, double > 
RegularVector2dField2d_ul
 unsigned long alias More...
 
typedef
slip::RegularVector2dField2d
< short, double > 
RegularVector2dField2d_s
 short alias More...
 
typedef
slip::RegularVector2dField2d
< unsigned short, double > 
RegularVector2dField2d_us
 unsigned long alias More...
 
typedef
slip::RegularVector2dField2d
< int, double > 
RegularVector2dField2d_i
 int alias More...
 
typedef
slip::RegularVector2dField2d
< unsigned int, double > 
RegularVector2dField2d_ui
 unsigned int alias More...
 
typedef
slip::RegularVector2dField2d
< char, double > 
RegularVector2dField2d_c
 char alias More...
 
typedef
slip::RegularVector2dField2d
< unsigned char, double > 
RegularVector2dField2d_uc
 unsigned char alias More...
 
typedef RegularVector3dField3d
< double, double > 
Regular3D3Cd
 double alias More...
 
typedef RegularVector3dField3d
< float, double > 
Regular3D3Cf
 float alias More...
 
typedef RegularVector3dField3d
< double, double > 
Regular3D3C_d
 double alias More...
 
typedef RegularVector3dField3d
< float, double > 
Regular3D3C_f
 float alias More...
 
typedef
slip::RegularVector3dField3d
< double, double > 
RegularVector3dField3d_d
 double alias More...
 
typedef
slip::RegularVector3dField3d
< float, float > 
RegularVector3dField3d_f
 float alias More...
 
typedef
slip::RegularVector3dField3d
< long, double > 
RegularVector3dField3d_l
 long alias More...
 
typedef
slip::RegularVector3dField3d
< unsigned long, double > 
RegularVector3dField3d_ul
 unsigned long alias More...
 
typedef
slip::RegularVector3dField3d
< short, double > 
RegularVector3dField3d_s
 short alias More...
 
typedef
slip::RegularVector3dField3d
< unsigned short, double > 
RegularVector3dField3d_us
 unsigned long alias More...
 
typedef
slip::RegularVector3dField3d
< int, double > 
RegularVector3dField3d_i
 int alias More...
 
typedef
slip::RegularVector3dField3d
< unsigned int, double > 
RegularVector3dField3d_ui
 unsigned int alias More...
 
typedef
slip::RegularVector3dField3d
< char, double > 
RegularVector3dField3d_c
 char alias More...
 
typedef
slip::RegularVector3dField3d
< unsigned char, double > 
RegularVector3dField3d_uc
 unsigned char alias More...
 
typedef slip::Signal< double > Signal_d
 double alias More...
 
typedef slip::Signal< float > Signal_f
 float alias More...
 
typedef slip::Signal< long > Signal_l
 long alias More...
 
typedef slip::Signal< unsigned
long > 
Signal_ul
 unsigned long alias More...
 
typedef slip::Signal< short > Signal_s
 short alias More...
 
typedef slip::Signal< unsigned
short > 
Signal_us
 unsigned long alias More...
 
typedef slip::Signal< int > Signal_i
 int alias More...
 
typedef slip::Signal< unsigned
int > 
Signal_ui
 unsigned int alias More...
 
typedef slip::Signal< char > Signal_c
 char alias More...
 
typedef slip::Signal< unsigned
char > 
Signal_uc
 unsigned char alias More...
 
typedef slip::Vector< double > Vector_d
 double alias More...
 
typedef slip::Vector< float > Vector_f
 float alias More...
 
typedef slip::Vector< long > Vector_l
 long alias More...
 
typedef slip::Vector< unsigned
long > 
Vector_ul
 unsigned long alias More...
 
typedef slip::Vector< short > Vector_s
 short alias More...
 
typedef slip::Vector< unsigned
short > 
Vector_us
 unsigned long alias More...
 
typedef slip::Vector< int > Vector_i
 int alias More...
 
typedef slip::Vector< unsigned
int > 
Vector_ui
 unsigned int alias More...
 
typedef slip::Vector< char > Vector_c
 char alias More...
 
typedef slip::Vector< unsigned
char > 
Vector_uc
 unsigned char alias More...
 
typedef slip::Vector2d< double > Vector2d_d
 double alias More...
 
typedef slip::Vector2d< float > Vector2d_f
 float alias More...
 
typedef slip::Vector2d< long > Vector2d_l
 long alias More...
 
typedef slip::Vector2d
< unsigned long > 
Vector2d_ul
 unsigned long alias More...
 
typedef slip::Vector2d< short > Vector2d_s
 short alias More...
 
typedef slip::Vector2d
< unsigned short > 
Vector2d_us
 unsigned long alias More...
 
typedef slip::Vector2d< int > Vector2d_i
 int alias More...
 
typedef slip::Vector2d
< unsigned int > 
Vector2d_ui
 unsigned int alias More...
 
typedef slip::Vector2d< char > Vector2d_c
 char alias More...
 
typedef slip::Vector2d
< unsigned char > 
Vector2d_uc
 unsigned char alias More...
 
typedef slip::Vector3d< double > Vector3d_d
 double alias More...
 
typedef slip::Vector3d< float > Vector3d_f
 float alias More...
 
typedef slip::Vector3d< long > Vector3d_l
 long alias More...
 
typedef slip::Vector3d
< unsigned long > 
Vector3d_ul
 unsigned long alias More...
 
typedef slip::Vector3d< short > Vector3d_s
 short alias More...
 
typedef slip::Vector3d
< unsigned short > 
Vector3d_us
 unsigned long alias More...
 
typedef slip::Vector3d< int > Vector3d_i
 int alias More...
 
typedef slip::Vector3d
< unsigned int > 
Vector3d_ui
 unsigned int alias More...
 
typedef slip::Vector3d< char > Vector3d_c
 char alias More...
 
typedef slip::Vector3d
< unsigned char > 
Vector3d_uc
 unsigned char alias More...
 
typedef slip::Vector4d< double > Vector4d_d
 double alias More...
 
typedef slip::Vector4d< float > Vector4d_f
 float alias More...
 
typedef slip::Vector4d< long > Vector4d_l
 long alias More...
 
typedef slip::Vector4d
< unsigned long > 
Vector4d_ul
 unsigned long alias More...
 
typedef slip::Vector4d< short > Vector4d_s
 short alias More...
 
typedef slip::Vector4d
< unsigned short > 
Vector4d_us
 unsigned long alias More...
 
typedef slip::Vector4d< int > Vector4d_i
 int alias More...
 
typedef slip::Vector4d
< unsigned int > 
Vector4d_ui
 unsigned int alias More...
 
typedef slip::Vector4d< char > Vector4d_c
 char alias More...
 
typedef slip::Vector4d
< unsigned char > 
Vector4d_uc
 unsigned char alias More...
 
typedef slip::Volume< double > Volume_d
 double alias More...
 
typedef slip::Volume< float > Volume_f
 float alias More...
 
typedef slip::Volume< long > Volume_l
 long alias More...
 
typedef slip::Volume< unsigned
long > 
Volume_ul
 unsigned long alias More...
 
typedef slip::Volume< short > Volume_s
 short alias More...
 
typedef slip::Volume< unsigned
short > 
Volume_us
 unsigned long alias More...
 
typedef slip::Volume< int > Volume_i
 int alias More...
 
typedef slip::Volume< unsigned
int > 
Volume_ui
 unsigned int alias More...
 
typedef slip::Volume< char > Volume_c
 char alias More...
 
typedef slip::Volume< unsigned
char > 
Volume_uc
 unsigned char alias More...
 

Enumerations

enum  BORDER_TREATMENT {
  BORDER_TREATMENT_AVOID, BORDER_TREATMENT_ZERO_PADDED, BORDER_TREATMENT_NEUMANN, BORDER_TREATMENT_CIRCULAR,
  BORDER_TREATMENT_REFLECT, BORDER_TREATMENT_COPY
}
 Choose between different border treatment modes for convolution algorithms. More...
 
enum  DECOMP_TYPE { RQ, direct }
 
enum  CROSSCORRELATION_TYPE { CC, CCC, PNCC, NCC }
 Choose between different types of crosscorrelation. More...
 
enum  SPATIAL_DIRECTION { X_DIRECTION, Y_DIRECTION, Z_DIRECTION }
 Choose between different spatial directions. More...
 
enum  NORMALIZATION_FUNCTION { AFFINE_FUNCTION, NORMAL_FUNCTION, SIGMOID_FUNCTION }
 Choose between different border treatment modes for convolution algorithms. More...
 
enum  DENSE_MATRIX_TYPE {
  DENSE_MATRIX_FULL, DENSE_MATRIX_DIAGONAL, DENSE_MATRIX_UPPER_BIDIAGONAL, DENSE_MATRIX_LOWER_BIDIAGONAL,
  DENSE_MATRIX_TRIDIAGONAL, DENSE_MATRIX_UPPER_TRIANGULAR, DENSE_MATRIX_LOWER_TRIANGULAR, DENSE_MATRIX_BANDED,
  DENSE_MATRIX_UPPER_HESSENBERG, DENSE_MATRIX_LOWER_HESSENBERG, DENSE_MATRIX_NULL
}
 Indicate the type of a dense matrix. More...
 
enum  PLANE_ORIENTATION { IJ_PLANE = 0, KJ_PLANE, KI_PLANE }
 Choose between different plane orientations. More...
 
enum  NEIGHBOURHOOD {
  N_2_C, N_4_C, N_6o_C, N_6e_C,
  N_8_C, N_6_C, N_18_C, N_26_C,
  N_4D_8_C
}
 Choose between different neighbourhood. More...
 

Functions

template<typename _II >
void fill_border (_II first, _II last, std::size_t b_size=1, const typename std::iterator_traits< _II >::value_type &value=typename std::iterator_traits< _II >::value_type())
 Fills the border of the range [first,last) with value. More...
 
template<typename _II >
void update_border (_II first, _II last, const slip::BORDER_TREATMENT border, const std::size_t b_size=1)
 Updates the border of the range [first,last) according to b_size and border condition: border. More...
 
template<typename _II , typename _OI >
void add_border (_II first, _II last, _OI out_first, _OI out_last, const slip::BORDER_TREATMENT border, const std::size_t b_size=1)
 Adds the border of the range [first,last) according to the border condtion border and the border size b_size. More...
 
template<typename Container1 , typename Container2 >
void add_border1d (const Container1 &in, const slip::BORDER_TREATMENT border_type, Container2 &out, const std::size_t border_size=1)
 Adds the border at a 1d container according to the border condition border and the border size b_size. More...
 
template<typename Container2d1 , typename Container2d2 >
void add_border2d (const Container2d1 &in, const slip::BORDER_TREATMENT border_type, Container2d2 &out, const std::size_t border_size=1)
 Adds the border at a 2d container according to the border condition border and the border size b_size. More...
 
template<typename Container3d1 , typename Container3d2 >
void add_border3d (const Container3d1 &in, const slip::BORDER_TREATMENT border_type, Container3d2 &out, const std::size_t border_size=1)
 Adds the border at a 3d container according to the border condition border and the border size b_size. More...
 
template<typename Container4d1 , typename Container4d2 >
void add_border4d (const Container4d1 &in, const slip::BORDER_TREATMENT border_type, Container4d2 &out, const std::size_t border_size=1)
 Adds the border at a 4d container according to the border condition border and the border size b_size. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
int rq_decomp (const Matrix1 &A, Matrix2 &R, Matrix3 &Q)
 Computes the RQ decomposition of a matrix. More...
 
template<typename Type >
void getpars_DLT (const slip::Matrix< Type > &P, slip::Matrix< Type > &Mat)
 Get calibration parameters using the DLT. More...
 
template<typename Type >
void getpars_DLT_norm (const slip::Matrix< Type > &P, slip::Matrix< Type > &Mat)
 Get calibration parameters using the DLT. More...
 
template<typename Type >
void getpars_Faugeras (const slip::Matrix< Type > &P, slip::Matrix< Type > &Mat)
 Get calibration parameters using the Faugeras-Algorithm. More...
 
template<typename Type >
void getpars_SoloffUV (const slip::Matrix< Type > &P, slip::MultivariatePolynomial< Type, 3 > &Pol_x, slip::MultivariatePolynomial< Type, 3 > &Pol_y)
 Get calibration parameters using a polynomial fit (computation "by hand") More...
 
template<typename Type >
void getpars_SoloffXY (const slip::Matrix< Type > &P, slip::MultivariatePolynomial< Type, 3 > &Pol_x, slip::MultivariatePolynomial< Type, 3 > &Pol_y)
 Get calibration parameters using a polynomial fit (computation "by hand") More...
 
template<typename Type >
int decompose_RQ (const slip::Matrix< Type > &M, slip::Matrix< Type > &K, slip::Matrix< Type > &R, slip::Vector3d< Type > &c)
 RQ-Decomposition 3x4-Matrix into internal and external parameters. More...
 
template<typename Type >
int decompose_direct (const slip::Matrix< Type > &M, slip::Matrix< Type > &K, slip::Matrix< Type > &R, slip::Vector3d< Type > &c)
 Direct-Decomposition a 3x4-Matrix into internal and external parameters. More...
 
template<typename Type >
slip::Point2d< Type > invert_distortion_model (const slip::Point2d< Type > &pd, const slip::Vector< Type > &p)
 Inverts distortion model using the Newton-method. More...
 
template<typename Real >
Real fCieLab (const Real x)
 
int conj (const int arg)
 
unsigned conj (const unsigned arg)
 
long conj (const long arg)
 
short conj (const short arg)
 
char conj (const char arg)
 
float conj (const float arg)
 
double conj (const double arg)
 
long double conj (const long double arg)
 
template<typename T >
std::complex< T > conj (const std::complex< T > &arg)
 
template<typename _II , typename _OI >
void copy (_II first, _II last, _OI output_first)
 Copy algorithm optimized for slip iterators. More...
 
template<typename Real >
Real minmod (const Real gplus, const Real gminus)
 
template<typename Real >
Real max_brockett_maragos_plus (const Real gplus, const Real gminus)
 
template<typename Real >
Real max_brockett_maragos_minus (const Real gplus, const Real gminus)
 
template<typename Real >
Real osher_sethian_plus (const Real gplus, const Real gminus)
 
template<typename Real >
Real osher_sethian_minus (const Real gplus, const Real gminus)
 
template<typename InputIterator , typename OutputIterator , typename UnaryOperation >
void change_dynamic (InputIterator first, InputIterator last, OutputIterator result, UnaryOperation dynamic_fun)
 Changes the dynamic of a container. More...
 
template<typename InputIterator , typename OutputIterator , typename MaskIterator , typename UnaryOperation >
void change_dynamic_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, UnaryOperation dynamic_fun, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Changes the dynamic of a container according to a mask sequence. More...
 
template<typename InputIterator , typename OutputIterator , typename UnaryOperation , typename Predicate >
void change_dynamic_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, UnaryOperation dynamic_fun)
 Changes the dynamic of a container according to a predicate. More...
 
template<typename InputIterator , typename OutputIterator >
void change_dynamic_01 (InputIterator first, InputIterator last, OutputIterator result, slip::NORMALIZATION_FUNCTION fun)
 Changes the dynamic of a container. More...
 
template<class RandomAccessIterator , class InnerProduct >
void gram_schmidt_normalization (RandomAccessIterator init_base_first, RandomAccessIterator init_base_end, RandomAccessIterator ortho_base_first, RandomAccessIterator ortho_base_end, InnerProduct inner_prod)
 Gram-Schmidt orthonormalization algorithm. More...
 
template<class RandomAccessIterator , class InnerProduct >
void modified_gram_schmidt_normalization (RandomAccessIterator init_base_first, RandomAccessIterator init_base_end, RandomAccessIterator ortho_base_first, RandomAccessIterator ortho_base_end, InnerProduct inner_prod)
 Modified Gram-Schmidt orthonormalization algorithm. More...
 
template<class RandomAccessIterator , class InnerProduct >
void gram_schmidt_orthogonalization (RandomAccessIterator init_base_first, RandomAccessIterator init_base_end, RandomAccessIterator ortho_base_first, RandomAccessIterator ortho_base_end, InnerProduct inner_prod)
 Gram-Schmidt orthogonalization algorithm. More...
 
template<class RandomAccessIterator , class InnerProduct >
void modified_gram_schmidt_orthogonalization (RandomAccessIterator init_base_first, RandomAccessIterator init_base_end, RandomAccessIterator ortho_base_first, RandomAccessIterator ortho_base_end, InnerProduct inner_prod)
 Modified Gram-Schmidt orthogonalization algorithm. More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void modified_gram_schmidt (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Q_up, MatrixIterator2 Q_bot, MatrixIterator3 R_up, MatrixIterator3 R_bot)
 Modified Gram-Schmidt orthogonalization algorithm on a matrix. More...
 
template<class RandomAccessIterator , class RandomAccessIterator2d , class InnerProduct >
void gram_matrix (RandomAccessIterator init_base_first, RandomAccessIterator init_base_end, RandomAccessIterator2d matrix_upper_left, RandomAccessIterator2d matrix_bottom_right, InnerProduct inner_prod)
 Compute the Gram matrix from a base. More...
 
template<typename InputIterator , typename RandomAccessIterator >
void histogram (InputIterator first, InputIterator last, RandomAccessIterator histo_first, RandomAccessIterator histo_last, typename std::iterator_traits< InputIterator >::value_type minval, typename std::iterator_traits< InputIterator >::value_type maxval, typename std::iterator_traits< InputIterator >::value_type step=1)
 Simple histogram algorithm (uniform step) More...
 
template<typename InputIterator , typename RandomAccessIterator , typename MaskIterator >
void histogram_mask (InputIterator first, InputIterator last, MaskIterator mask_first, RandomAccessIterator histo_first, RandomAccessIterator histo_last, typename std::iterator_traits< InputIterator >::value_type minval, typename std::iterator_traits< InputIterator >::value_type maxval, typename std::iterator_traits< InputIterator >::value_type step=1, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Simple histogram algorithm (uniform step) according to a mask sequence. More...
 
template<typename InputIterator , typename RandomAccessIterator , typename Predicate >
void histogram_if (InputIterator first, InputIterator last, RandomAccessIterator histo_first, RandomAccessIterator histo_last, Predicate pred, typename std::iterator_traits< InputIterator >::value_type minval, typename std::iterator_traits< InputIterator >::value_type maxval, typename std::iterator_traits< InputIterator >::value_type step=1)
 Simple histogram algorithm (uniform step) according to a predicate. More...
 
template<typename InputIterator , typename InputIterator2 , typename OutputIterator >
void real_histogram (InputIterator first, InputIterator last, InputIterator2 stepfirst, InputIterator2 steplast, OutputIterator result)
 Complex histogram algorithm (variable step) More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void cumulative_histogram (RandomAccessIterator1 histo_first, RandomAccessIterator1 histo_last, RandomAccessIterator2 cum_histo_first, RandomAccessIterator2 cum_histo_last)
 Computes the cumulative histogram from a histogram. More...
 
template<typename T , typename RandomAccessIterator >
LM_chi2 (RandomAccessIterator first, RandomAccessIterator last)
 Computes Chi2 for Lebvenberg Marquardt algorithm. More...
 
template<typename Function , typename Real , typename DerivativeFunction >
void marquardt (Function &fun, DerivativeFunction &df, slip::Vector< Real > &par, slip::Vector< Real > &r, Real &calchi2, const int maxiter=10000, const Real eps=static_cast< Real >(1e-6))
 Optimization of function using the Levenberg-Marquardt algorithm. More...
 
template<class Matrix1 , class Vector1 , class Matrix2 >
void hermitian_eigen (const Matrix1 &A, Vector1 &EigenValues, Matrix2 &EigenVectors)
 Eigen Values Computation of an hermitian semi-definite positive matrix. More...
 
template<class Matrix1 , class Vector1 >
void eigen (const Matrix1 &A, Vector1 &E, bool sort=false)
 Eigen Values Computation for non symmetric matrix. More...
 
template<class Matrix1 >
slip::lin_alg_traits< typename
Matrix1::value_type >
::value_type 
spectral_radius (const Matrix1 &A)
 Spectral radius of a matrix $ \rho(A) = \max_i \{ |\lambda_i|\}$. More...
 
template<class Matrix1 , class Matrix2 >
void balance (Matrix1 &A, Matrix2 &D)
 applies a diagonal similarity transform to the square matrix A to make the rows and columns as close in norm as possible. Balancing may reduce the 1-norm of the matrix, and improves the accuracy of the computed eigenvalues and/or eigenvectors. To avoid round-off errors, balance scales A with powers of 2. A is replaced by the balanced matrix which has the same eigenvalues and singular values : $ A = D \times A \times D^{-1} $ More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void gram_schmidt_qr (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Q_up, MatrixIterator2 Q_bot, MatrixIterator3 R_up, MatrixIterator3 R_bot, const typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type tol)
 (modified) Gram-Schmidt qr decomposition. More...
 
template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void gram_schmidt_qr (const Matrix1 &A, Matrix2 &Q, Matrix3 &R, const typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type tol)
 (modified) Gram-Schmidt qr decomposition. More...
 
template<typename Matrix1 , typename Vector >
void householder_qr (Matrix1 &M, Vector &V0)
 in place Householder QR decomposition M = QR

\[ M = Q \times R \]

\[ Q \times Q^{t} = I \]

Q is a rotation matrix and R is an upper triangular matrix More...

 
template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void householder_qr (const Matrix1 &M, Matrix2 &Q, Matrix3 &R)
 Computes the QR decomposition of a matrix M :

\[ M = Q \times R \]

\[ Q \times Q^{t} = I \]

Q is a rotation matrix and R is an upper triangular matrix. More...

 
template<typename MatrixIterator >
std::size_t subdiag_smaller_elem (MatrixIterator A_up, MatrixIterator A_bot, typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator >::value_type >::value_type precision)
 find the smaller non null (according to the precision) subdiagonal element of a matrix More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void Schur_factorization_2by2 (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Z_up, MatrixIterator2 Z_bot, MatrixIterator3 D_up, MatrixIterator3 D_bot)
 Computes the Schur factorization of a real 2-by-2 2d container : $ A = Z \times D \times Z^{t*} $

\[ \left( \begin{array}{cc} a & b \\ c & d \end{array}\right) = \left( \begin{array}{cc} cs & -sn \\ sn & cs \end{array}\right) \times \left( \begin{array}{cc} D_{00} & D_{01} \\ D_{10} & D_{11} \end{array}\right) \times \left( \begin{array}{cc} cs & sn \\ -sn & cs \end{array}\right) \]

where : More...

 
template<class Matrix , typename VectorIterator >
void MatrixHouseholder (Matrix &H, VectorIterator V_begin, VectorIterator V_end)
 Computes the Householder matrix of a vector V :

\[ H = I - \frac{2 \times V \times V^{t*}}{V^{t*} \times V} \]

If V is an householder vector of a matrix M then $ H \times M $ is a matrix with zeros on the first column (except the first element). More...

 
template<class Vector , typename MatrixIterator >
void VectorHouseholder (Vector &V, MatrixIterator M_up, MatrixIterator M_bot)
 Computes a Householder vector V from a matrix M :

\[ V = M_{.0} - \alpha \times e_0 \]

with $ M_{.0} $ represents the first column of M and

\[ \alpha = - \frac{ M_{00}}{abs( M_{00})} \times \|M_{.0}\| \]

. More...

 
template<typename HessenbergMatrix , typename Matrix >
bool Francis_QR_Step (HessenbergMatrix &H, Matrix &Z, slip::Box2d< int > box, bool compute_z)
 Computes the Francis QR Step used in the Schur decomposition

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-1 in "Matrix Computations", Golub and Van Loan. More...

 
template<class HessenbergMatrix , class Vector , class Matrix >
void Francis_Schur_standardize (HessenbergMatrix &H, Vector &Eig, Matrix &Z, slip::Box2d< int > b22, bool compute_z)
 Converts a 2-by-2 diagonal block of H in the Schur form, normalizes H and extract the associated eigenvalues.

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-1 in "Matrix Computations", Golub and Van Loan. More...

 
template<class HessenbergMatrix , class Vector , class Matrix >
bool Francis_Schur_decomp (HessenbergMatrix &H, Vector &Eig, Matrix &Z, slip::Box2d< int > &box, typename slip::lin_alg_traits< typename HessenbergMatrix::value_type >::value_type precision, bool compute_Z)
 computes the Schur decomposition of a square Hessenberg Matrix and copy the eigenvalues in the Eig vector :

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-2 in "Matrix Computations", Golub and Van Loan. More...

 
template<class Matrix1 , class Matrix2 , class Vector , class Matrix3 >
bool schur (const Matrix1 &M, Matrix2 &H, Matrix3 &Z, Vector &Eig, bool compute_Z, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type(1.0E-12))
 computes the shur decomposition of a square Matrix and copy the eigenvalues in the Eig vector:

\[ M = Z \times H \times Z^{t}\]

Algorithm 7.5-2 in "Matrix Computations", Golub and Van Loan. More...

 
template<class Matrix1 , class Matrix2 >
bool Sylvester_solve (const Matrix1 &S, slip::Box2d< int > &b11, slip::Box2d< int > &b22, double &g, Matrix2 &X)
 Solve the sylvester equation (from Z.Bai and J.W. Demmel article : -On Swapping Diagonal Blocks in Real Schur Form- In Linear Algebra and its Applications 186:73-95(1993)) : $ A_{11}X - XA_{22} = \gamma A_{12} $. More...
 
template<typename T >
bool is_real (const T &val)
 Test if an element is real. More...
 
template<typename T >
bool is_complex (const T &val)
 Test if an element is complex. More...
 
template<typename T >
slip::lin_alg_traits< T >
::value_type 
epsilon ()
 Returns the epsilon value of a real or a complex. More...
 
template<typename T >
sign (T a)
 Computes the sign of a. More...
 
template<typename Real >
Real pythagore (const Real &x, const Real &y)
 Computes $ (x^2+y^2)^\frac{1}{2}$ without destructive underflow or overflow. More...
 
template<int N, typename T >
nth_power (T x)
 Computes the nth power of an element $ x^n$. More...
 
template<typename T , typename Integer >
power (T x, Integer N)
 function to compute. More...
 
template<typename Value_T , typename InputIterator >
Value_T 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 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 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 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 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 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 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 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 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 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 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 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 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 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 infinite_norm_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the infinite norm $\max_i{|x_i|}$ a range according to a Predicate. More...
 
template<class OutputMatrix >
void pca_uniform_metric (OutputMatrix &metric)
 Get uniform metric for PCA computation. More...
 
template<class Matrix , class OutputMatrix >
void pca_adaptative_metric (const Matrix &data, OutputMatrix &metric)
 Get adaptative metric for PCA computation. More...
 
template<class Matrix , class OutputMatrix >
void pca_center_data (const Matrix &data, OutputMatrix &centerdata, const bool normalize_data=false)
 Get uniform metric for PCA computation. More...
 
template<class Matrix , class Matrix2 , class OutputMatrix , class OutputVector >
void pca_computation (const Matrix &data, OutputMatrix &acp, const Matrix2 &metric, OutputVector &eigenval)
 Compute the PCA (data need to be centered) More...
 
template<class Matrix , class OutputMatrix >
void pca_simple_data_reduction_axis (const Matrix &acp, OutputMatrix &result, const std::size_t &nbaxis)
 Reduce ACP data. More...
 
template<class Matrix , class Matrix2 , class OutputMatrix >
void pca_data_reduction (const Matrix &data, const Matrix2 &metric, OutputMatrix &result, const std::size_t &nbaxis, const bool normalize_data=false)
 Data reduction using ACP. More...
 
template<class Matrix , class Matrix2 , class OutputMatrix >
void pca_data_reduction (const Matrix &data, const Matrix2 &metric, OutputMatrix &result, const bool normalize_data=false)
 Data reduction using ACP. More...
 
template<typename Integer , typename InputIterator >
Integer cardinal (InputIterator first, InputIterator last)
 Computes the cardinal or the number of elements of a range. More...
 
template<typename Value_T , typename InputIterator >
Value_T mean (InputIterator first, InputIterator last)
 Computes the mean value of a range

\[ \frac{1}{n}\sum_i x_i\]

. More...

 
template<typename Value_T , typename InputIterator >
Value_T weighted_mean (InputIterator first, InputIterator last, InputIterator w_first, InputIterator w_last)
 Computes the weighted mean value of a range:

\[\frac{\sum_i w_ix_i}{\sum_i w_i}\]

. More...

 
template<typename T , int N, typename InputIterator >
nth_moment (InputIterator first, InputIterator last, T mean)
 Computes the nth moment of a range

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 >
covariance (InputIterator first, InputIterator last, InputIterator2 first2, T mean1, T mean2)
 Computes the covariance of a two sequences

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 >
unbiased_covariance (InputIterator first, InputIterator last, InputIterator2 first2, T mean1, T mean2)
 Computes the unbiased covariance of a two sequences

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator >
variance (InputIterator first, InputIterator last, T mean)
 Computes the variance of a range

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator >
unbiased_variance (InputIterator first, InputIterator last, T mean)
 Computes the unbiased variance of a range

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator >
std_dev (InputIterator first, InputIterator last, T mean)
 Computes the standard deviation of a range

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator >
unbiased_std_dev (InputIterator first, InputIterator last, T mean)
 Computes the unbiased standard deviation of a range

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator >
kurtosis (InputIterator first, InputIterator last, T mean)
 Computes the kurtosis of a range

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities: More...

 
template<typename T , typename InputIterator >
unbiased_kurtosis (InputIterator first, InputIterator last, T mean)
 Computes the unbiased kurtosis of a range

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. More...

 
template<typename T , typename InputIterator >
skewness (InputIterator first, InputIterator last, T mean)
 Computes the skewness of a range

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator >
unbiased_skewness (InputIterator first, InputIterator last, T mean)
 Computes the unbiased skewness of a range

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator >
rms (InputIterator first, InputIterator last)
 Computes the root mean square (rms) value of a range

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

. More...

 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
median_from_sorted_data (InputIterator first, InputIterator last)
 Computes the median value from a sorted range: returns *(first + (last - first) / 2) More...
 
template<typename RandomAccessIterator , typename Size >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median_from_sorted_data_n (RandomAccessIterator first, Size n)
 Computes the median value from a sorted range: returns *(first + n/2). More...
 
template<typename RandomAccessIterator , typename Size >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median_from_data_n (RandomAccessIterator first, RandomAccessIterator last, Size n)
 Computes the median value from a non sorted range. More...
 
template<typename RandomAccessIterator , typename Size , typename StrictWeakOrdering >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median_from_data_n (RandomAccessIterator first, RandomAccessIterator last, Size n, StrictWeakOrdering comp)
 Computes the median value from a non sorted range. More...
 
template<typename RandomAccessIterator >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median (RandomAccessIterator first, RandomAccessIterator last)
 Computes the median value from a range. More...
 
template<typename RandomAccessIterator , typename StrictWeakOrdering >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median (RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp)
 Computes the median value from a range. More...
 
template<typename RandomAccessIterator , typename SizeType >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median_n (RandomAccessIterator first, RandomAccessIterator last, SizeType n)
 Computes the median value from a range of size n. More...
 
template<typename RandomAccessIterator , typename SizeType , typename StrictWeakOrdering >
std::iterator_traits
< RandomAccessIterator >
::value_type 
median_n (RandomAccessIterator first, RandomAccessIterator last, SizeType n, StrictWeakOrdering comp)
 Computes the median value from a range of size n. More...
 
template<typename RandomAccessIterator >
std::iterator_traits
< RandomAccessIterator >
::value_type 
first_quartile (RandomAccessIterator first, RandomAccessIterator last)
 Computes the first quartile value from a non sorted range. More...
 
template<typename RandomAccessIterator >
std::iterator_traits
< RandomAccessIterator >
::value_type 
third_quartile (RandomAccessIterator first, RandomAccessIterator last)
 Computes the third quartile value from a non sorted range. More...
 
template<typename ForwardIterator >
void n_max_elements (ForwardIterator first, ForwardIterator last, std::vector< ForwardIterator > &max, const std::size_t n=1)
 finds the n largest elements in the range [first, last). More...
 
template<typename ForwardIterator >
void n_min_elements (ForwardIterator first, ForwardIterator last, std::vector< ForwardIterator > &min, const std::size_t n=1)
 finds the n smallest elements in the range [first, last). More...
 
template<typename RandomAccessIterator , typename RandomAccessIterator2 >
void center (RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator2 out_first)
 Substracts its mean to a range. More...
 
template<typename RandomAccessIterator , typename RandomAccessIterator2 >
void studentize (RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator2 out_first)
 Substracts its mean to a range and divide it by its standard deviation. More...
 
template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T mean_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 mean value of a range over a mask

\[ \frac{1}{n}\sum_i x_i\]

. More...

 
template<typename T , int N, typename InputIterator , typename MaskIterator >
nth_moment_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the nth moment of a range over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 , typename MaskIterator >
covariance_mask (InputIterator first, InputIterator last, InputIterator2 first2, MaskIterator mask_first, T mean1, T mean2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the covariance of a two sequences over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 , typename MaskIterator >
unbiased_covariance_mask (InputIterator first, InputIterator last, InputIterator2 first2, MaskIterator mask_first, T mean1, T mean2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the unbiased covariance of a two sequences over a mask

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
variance_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the variance of a range over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
unbiased_variance_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the unbiased variance of a range over a mask

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
std_dev_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the standard deviation of a range over a mask

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
unbiased_std_dev_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the unbiased standard deviation of a range over a mask

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
kurtosis_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the kurtosis of a range over a mask

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities: More...

 
template<typename T , typename InputIterator , typename MaskIterator >
unbiased_kurtosis_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the unbiased kurtosis of a range over a mask

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
skewness_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the skewness of a range over a mask

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
unbiased_skewness_mask (InputIterator first, InputIterator last, MaskIterator mask_first, T mean, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the unbiased skewness of a range over a mask

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator , typename MaskIterator >
rms_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 root mean square (rms) value of a range over a mask

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

. More...

 
template<typename Integer , typename MaskIterator >
Integer cardinal_mask (MaskIterator mask_first, MaskIterator mask_last, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the cardinal or the number of elements of a mask range. More...
 
template<typename InputIterator , typename MaskIterator >
std::iterator_traits
< InputIterator >::value_type 
median_from_sorted_data_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 median value from a sorted range over a mask. More...
 
template<typename InputIterator , typename MaskIterator >
std::iterator_traits
< InputIterator >::value_type 
median_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 median value from a non sorted range over a mask. More...
 
template<typename InputIterator , typename MaskIterator >
std::iterator_traits
< InputIterator >::value_type 
first_quartile_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 first quartile value from a non sorted range over a mask. More...
 
template<typename InputIterator , typename MaskIterator >
std::iterator_traits
< InputIterator >::value_type 
third_quartile_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 third quartile value from a non sorted range over a mask. More...
 
template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void center_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator out_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Substracts its mean to a range according a mask. More...
 
template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void studentize_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator out_first, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Substracts its mean to a range and divide it by its standard deviation according a mask. More...
 
template<typename Integer , typename InputIterator , typename Predicate >
Integer cardinal_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the cardinal or the number of elements of a range using a predicate. More...
 
template<typename Value_T , typename InputIterator , typename Predicate >
Value_T mean_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the mean value of a range using a predicate

\[ \frac{1}{n}\sum_i x_i\]

. More...

 
template<typename T , int N, typename InputIterator , typename Predicate >
nth_moment_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the nth moment of a range using a predicate

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 , typename Predicate >
covariance_if (InputIterator first, InputIterator last, InputIterator2 first2, T mean1, T mean2, Predicate pred)
 Computes the covariance of a two sequences using a predicate on the first one

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator , typename InputIterator2 , typename Predicate >
unbiased_covariance_if (InputIterator first, InputIterator last, InputIterator2 first2, T mean1, T mean2, Predicate pred)
 Computes the unbiased covariance of a two sequences using a predicate on the first one

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

. More...

 
template<typename T , typename InputIterator , typename Predicate >
variance_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the variance of a range using a predicate

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator , typename Predicate >
unbiased_variance_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the unbiased variance of a range using a predicate

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

. More...

 
template<typename T , typename InputIterator , typename Predicate >
std_dev_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the standard deviation of a range using a predicate

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator , typename Predicate >
unbiased_std_dev_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the unbiased standard deviation of a range using a predicate

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

. More...

 
template<typename T , typename InputIterator , typename Predicate >
kurtosis_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the kurtosis of a range using a predicate

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities: More...

 
template<typename T , typename InputIterator , typename Predicate >
unbiased_kurtosis_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the unbiased kurtosis of a range using a predicate

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. More...

 
template<typename T , typename InputIterator , typename Predicate >
skewness_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the skewness of a range using a predicate

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator , typename Predicate >
unbiased_skewness_if (InputIterator first, InputIterator last, T mean, Predicate pred)
 Computes the unbiased skewness of a range using a predicate

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. More...

 
template<typename T , typename InputIterator , typename Predicate >
rms_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the root mean square (rms) value of a range using a predicate

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

. More...

 
template<typename InputIterator , typename Predicate >
std::iterator_traits
< InputIterator >::value_type 
median_from_sorted_data_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the median value from a sorted range using a predicate. More...
 
template<typename InputIterator , typename Predicate >
std::iterator_traits
< InputIterator >::value_type 
median_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the median value from a non sorted range using a predicate. More...
 
template<typename InputIterator , typename Predicate >
std::iterator_traits
< InputIterator >::value_type 
first_quartile_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the first quartile value from a non sorted range using a predicate. More...
 
template<typename InputIterator , typename Predicate >
std::iterator_traits
< InputIterator >::value_type 
third_quartile_if (InputIterator first, InputIterator last, Predicate pred)
 Computes the third quartile value from a non sorted range using a predicate. More...
 
template<typename InputIterator , typename Predicate , typename OutputIterator >
void center_if (InputIterator first, InputIterator last, Predicate pred, OutputIterator out_first)
 Substracts its mean to a range using a predicate. More...
 
template<typename InputIterator , typename Predicate , typename OutputIterator >
void studentize_if (InputIterator first, InputIterator last, Predicate pred, OutputIterator out_first)
 Substracts its mean to a range and divide it by its standard deviation using a predicate. More...
 
template<typename InputIterator , typename T >
void statistics (InputIterator first, InputIterator last, slip::Statistics< T > &statistic)
 compute all statistics of a range More...
 
template<typename InputIterator , typename T >
void unbiased_statistics (InputIterator first, InputIterator last, slip::Statistics< T > &statistic)
 compute all unbiased statistics of a range More...
 
template<typename InputIterator , typename T , typename MaskIterator >
void statistics_mask (InputIterator first, InputIterator last, MaskIterator mask_first, slip::Statistics< T > &statistic, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 compute all statistics of a range according to a mask range. More...
 
template<typename InputIterator , typename T , typename MaskIterator >
void unbiased_statistics_mask (InputIterator first, InputIterator last, MaskIterator mask_first, slip::Statistics< T > &statistic, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 compute all unbiased statistics of a range according to a mask range. More...
 
template<typename InputIterator , typename T , typename Predicate >
void statistics_if (InputIterator first, InputIterator last, slip::Statistics< T > &statistic, Predicate pred)
 compute all statistics of a range according to a preidcate. More...
 
template<typename InputIterator , typename T , typename Predicate >
void unbiased_statistics_if (InputIterator first, InputIterator last, slip::Statistics< T > &statistic, Predicate pred)
 compute all unbiased statistics of a range according to a preidcate. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _Tp >
_Tp inner_product_mask (_InputIterator1 first1, _InputIterator1 last1, _MaskIterator mask_first, _InputIterator2 first2, _Tp init, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Compute inner product of two ranges according to a mask range. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 >
_Tp inner_product_mask (_InputIterator1 first1, _InputIterator1 last1, _MaskIterator mask_first, _InputIterator2 first2, _Tp init, _BinaryOperation1 binary_op1, _BinaryOperation2 binary_op2, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Compute inner product of two ranges according to a mask range. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _Predicate , typename _Tp >
_Tp inner_product_if (_InputIterator1 first1, _InputIterator1 last1, _InputIterator2 first2, _Tp init, _Predicate pred)
 Compute inner product of two ranges according to a Predicate. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 , typename _Predicate >
_Tp inner_product_if (_InputIterator1 first1, _InputIterator1 last1, _InputIterator2 first2, _Tp init, _BinaryOperation1 binary_op1, _BinaryOperation2 binary_op2, _Predicate pred)
 Compute inner product of two ranges according to a Predicate. More...
 
template<typename T >
int get_tecplot_type ()
 Convert the type of a variable to an integer using Tecplot conventions. More...
 
int plt_get_order (std::ifstream &fp)
 Read a binary tecplot file, move the stream pointer and return header informations. More...
 
int plt_get_order (const std::string &file_path_name)
 Read a binary tecplot file, move the stream pointer and return header informations. More...
 
int plt_get_file_type (std::ifstream &fp)
 Read a binary tecplot file, move the stream pointer and return header informations. More...
 
int plt_get_file_type (const std::string &file_path_name)
 Read a binary tecplot file, move the stream pointer and return header informations. More...
 
void plt_read_header (std::ifstream &fp, int &NbVars, int &NbZones, int &K, int &I, int &J, std::string &title, std::string &zonename, std::vector< std::string > &varnames, double &SolTime, int NumZone=1)
 Read a binary tecplot file, move the stream pointer and return header informations. More...
 
void plt_read_header (std::ifstream &fp, int &NbVars, int &NbZones, int &K, int &I, int &J, int NumZone=1)
 Read a binary tecplot file and return header informations. More...
 
void plt_read_header (const std::string &file_path_name, int &NbVars, int &NbZones, int &K, int &I, int &J, int NumZone=1)
 Read a binary tecplot file and return header informations. More...
 
void plt_read_header (const std::string &file_path_name, int &NbVars, int &NbZones, int &K, int &I, int &J, double &SolTime, int NumZone=1)
 Read a binary tecplot file and return header informations. More...
 
void plt_read_header (const std::string &file_path_name, int &NbVars, int &NbZones, int &K, int &I, int &J, std::string &title, std::string &zonename, std::vector< std::string > &varnames, double &SolTime, int NumZone=1)
 Read a binary tecplot file and return header informations. More...
 
template<typename Container2d >
void plt_to_Array2d (const std::string &file_path_name, Container2d &reg, const int zone_loaded=1)
 Read a binary tecplot file and put the data in a 2d container. More...
 
template<typename RegularVector3dField3d >
void plt_to_RegularVector3dField3d (const std::string &file_path_name, RegularVector3dField3d &reg, std::string &title, std::string &zonename, std::vector< std::string > &varnames, const int zone_loaded=1)
 Read a slip::RegularVector3dField3d from a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void plt_to_RegularVector3dField3d (const std::string &file_path_name, RegularVector3dField3d &reg, const int zone_loaded=1)
 Read a slip::RegularVector3dField3d from a binary tecplot file. More...
 
bool compareTwoRows3D (double *rowA, double *rowB)
 Comparator used to sort an Array2d. More...
 
template<typename RegularVector3dField3d >
void generic_plt_to_RegularVector3dField3d (const std::string &file_path_name, RegularVector3dField3d &reg, std::string &title, std::string &zonename, std::vector< std::string > &varnames, const int zone_loaded=1)
 Read a slip::RegularVector3dField3d from a binary tecplot file even if data are not properly sorted. This function is slower than plt_to_RegularVector3dField3d(). More...
 
template<typename RegularVector3dField3d >
void generic_plt_to_RegularVector3dField3d (const std::string &file_path_name, RegularVector3dField3d &reg, const int zone_loaded=1)
 Read a slip::RegularVector3dField3d from a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void RegularVector3dField3d_to_plt (const std::string &file_path_name, RegularVector3dField3d &reg, std::string title, std::string zone, const double SolTime, std::vector< std::string > varnames=std::vector< std::string >(), const int FileType=0)
 Write a slip::RegularVector3dField3d to a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void RegularVector3dField3d_to_plt (const std::string &file_path_name, RegularVector3dField3d &reg, const int FileType=0)
 Write a slip::RegularVector3dField3d to a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void RegularVector3dField3d_to_plt (const std::string &file_path_name, RegularVector3dField3d &reg, const double SolTime, const int FileType=0)
 Write a slip::RegularVector3dField3d to a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void RegularVector3dField3d_to_plt (const std::string &file_path_name, RegularVector3dField3d &reg, std::string title, std::string zone, const int FileType=0)
 Write a slip::RegularVector3dField3d to a binary tecplot file. More...
 
template<typename RegularVector3dField3d >
void RegularVector3dField3d_to_plt (const std::string &file_path_name, RegularVector3dField3d &reg, std::string title, std::string zone, std::vector< std::string > varnames, const int FileType=0)
 Write a slip::RegularVector3dField3d to a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void plt_to_RegularVector2dField2d (const std::string &file_path_name, RegularVector2dField2d &reg, std::string &title, std::string &zonename, std::vector< std::string > &varnames, const int zone_loaded=1)
 Read a slip::RegularVector2dField2d from a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void plt_to_RegularVector2dField2d (const std::string &file_path_name, RegularVector2dField2d &reg, const int zone_loaded=1)
 Read a slip::RegularVector2dField2d from a binary tecplot file. More...
 
bool compareTwoRows2D (double *rowA, double *rowB)
 Comparator used to sort an Array2d. More...
 
template<typename RegularVector2dField2d >
void generic_plt_to_RegularVector2dField2d (const std::string &file_path_name, RegularVector2dField2d &reg, std::string &title, std::string &zonename, std::vector< std::string > &varnames, const int zone_loaded=1)
 Read a slip::RegularVector2dField2d from a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void generic_plt_to_RegularVector2dField2d (const std::string &file_path_name, RegularVector2dField2d &reg, const int zone_loaded=1)
 Read a slip::RegularVector2dField2d from a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void RegularVector2dField2d_to_plt (const std::string &file_path_name, RegularVector2dField2d &reg, std::string title, std::string zone, const double SolTime, std::vector< std::string > varnames=std::vector< std::string >(), const int FileType=0)
 Write a slip::RegularVector2dField2d to a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void RegularVector2dField2d_to_plt (const std::string &file_path_name, RegularVector2dField2d &reg, const int FileType=0)
 Write a slip::RegularVector2dField2d to a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void RegularVector2dField2d_to_plt (const std::string &file_path_name, RegularVector2dField2d &reg, const double SolTime, const int FileType=0)
 Write a slip::RegularVector2dField2d to a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void RegularVector2dField2d_to_plt (const std::string &file_path_name, RegularVector2dField2d &reg, std::string title, std::string zone, const int FileType=0)
 Write a slip::RegularVector2dField2d to a binary tecplot file. More...
 
template<typename RegularVector2dField2d >
void RegularVector2dField2d_to_plt (const std::string &file_path_name, RegularVector2dField2d &reg, std::string title, std::string zone, std::vector< std::string > varnames, const int FileType=0)
 Write a slip::RegularVector2dField2d to a binary tecplot file. More...
 
template<typename InputIterator , typename OutputIterator >
void binarize (InputIterator first, InputIterator last, OutputIterator result, const typename std::iterator_traits< InputIterator >::value_type &t_value, const typename std::iterator_traits< OutputIterator >::value_type &false_value, const typename std::iterator_traits< OutputIterator >::value_type &true_value)
 binarize algorithm More...
 
template<typename InputIterator , typename OutputIterator >
void threshold (InputIterator first, InputIterator last, OutputIterator result, const typename std::iterator_traits< InputIterator >::value_type &t_value, const typename std::iterator_traits< OutputIterator >::value_type &false_value)
 threshold algorithm More...
 
template<typename InputIterator , typename OutputIterator >
void db_threshold (InputIterator first, InputIterator last, OutputIterator result, const typename std::iterator_traits< InputIterator >::value_type &min_t_value, const typename std::iterator_traits< InputIterator >::value_type &max_t_value, const typename std::iterator_traits< OutputIterator >::value_type &false_value)
 double-threshold algorithm More...
 
template<typename InputIterator1 , typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename OutputIterator >
void multi_threshold (InputIterator1 first, InputIterator1 last, RandomAccessIterator1 first_th, RandomAccessIterator1 last_th, RandomAccessIterator2 first_level, RandomAccessIterator2 last_level, OutputIterator result_first, OutputIterator result_last)
 multi_threshold algorithm It is equivalent to a quantification J[i] = Level[i] if T[i-1] < I[i] <= T[i] More...
 
template<typename CoordType , std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const Box< CoordType, DIM > &b)
 
template<typename T >
ColorHyperVolume< T > operator+ (const ColorHyperVolume< T > &M1, const ColorHyperVolume< T > &M2)
 pointwise addition of two ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator+ (const ColorHyperVolume< T > &M1, const T &val)
 addition of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator+ (const T &val, const ColorHyperVolume< T > &M1)
 addition of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator+ (const ColorHyperVolume< T > &M1, const slip::Color< T > &val)
 addition of a Color block to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator+ (const slip::Color< T > &val, const ColorHyperVolume< T > &M1)
 addition of a Color block to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator- (const ColorHyperVolume< T > &M1, const ColorHyperVolume< T > &M2)
 pointwise subtraction of two ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator- (const ColorHyperVolume< T > &M1, const T &val)
 subtraction of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator- (const T &val, const ColorHyperVolume< T > &M1)
 subtraction of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator- (const ColorHyperVolume< T > &M1, const slip::Color< T > &val)
 subtraction of a Color block to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator* (const ColorHyperVolume< T > &M1, const ColorHyperVolume< T > &M2)
 pointwise multiplication of two ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator* (const ColorHyperVolume< T > &M1, const T &val)
 multiplication of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator* (const T &val, const ColorHyperVolume< T > &M1)
 multiplication of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator* (const ColorHyperVolume< T > &M1, const slip::Color< T > &val)
 multiplication of a Color block to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator* (const slip::Color< T > &val, const ColorHyperVolume< T > &M1)
 multiplication of a Color block to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator/ (const ColorHyperVolume< T > &M1, const ColorHyperVolume< T > &M2)
 pointwise division of two ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator/ (const ColorHyperVolume< T > &M1, const T &val)
 division of a scalar to each element of a ColorHyperVolume More...
 
template<typename T >
ColorHyperVolume< T > operator/ (const ColorHyperVolume< T > &M1, const slip::Color< T > &val)
 division of each element of a ColorHyperVolume by a Color block More...
 
template<typename T >
ColorImage< T > operator+ (const ColorImage< T > &M1, const ColorImage< T > &M2)
 pointwise addition of two ColorImage More...
 
template<typename T >
ColorImage< T > operator+ (const ColorImage< T > &M1, const T &val)
 addition of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator+ (const T &val, const ColorImage< T > &M1)
 addition of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator- (const ColorImage< T > &M1, const ColorImage< T > &M2)
 pointwise substraction of two ColorImage More...
 
template<typename T >
ColorImage< T > operator- (const ColorImage< T > &M1, const T &val)
 substraction of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator- (const T &val, const ColorImage< T > &M1)
 substraction of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator* (const ColorImage< T > &M1, const ColorImage< T > &M2)
 pointwise multiplication of two ColorImage More...
 
template<typename T >
ColorImage< T > operator* (const ColorImage< T > &M1, const T &val)
 multiplication of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator* (const T &val, const ColorImage< T > &M1)
 multiplication of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator/ (const ColorImage< T > &M1, const ColorImage< T > &M2)
 pointwise division of two ColorImage More...
 
template<typename T >
ColorImage< T > operator/ (const ColorImage< T > &M1, const T &val)
 division of a scalar to each element of a ColorImage More...
 
template<typename T >
ColorImage< T > operator+ (const ColorImage< T > &M1, const slip::Color< T > &val)
 
template<typename T >
ColorImage< T > operator+ (const slip::Color< T > &val, const ColorImage< T > &M1)
 
template<typename T >
ColorImage< T > operator- (const ColorImage< T > &M1, const slip::Color< T > &val)
 
template<typename T >
ColorImage< T > operator- (const slip::Color< T > &val, const ColorImage< T > &M1)
 
template<typename T >
ColorImage< T > operator* (const ColorImage< T > &M1, const slip::Color< T > &val)
 
template<typename T >
ColorImage< T > operator* (const slip::Color< T > &val, const ColorImage< T > &M1)
 
template<typename T >
ColorImage< T > operator/ (const ColorImage< T > &M1, const slip::Color< T > &val)
 
template<typename T >
ColorVolume< T > operator+ (const ColorVolume< T > &M1, const ColorVolume< T > &M2)
 pointwise addition of two ColorVolume More...
 
template<typename T >
ColorVolume< T > operator+ (const ColorVolume< T > &M1, const T &val)
 addition of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator+ (const T &val, const ColorVolume< T > &M1)
 addition of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator+ (const ColorVolume< T > &M1, const slip::Color< T > &val)
 addition of a Color block to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator+ (const slip::Color< T > &val, const ColorVolume< T > &M1)
 addition of a Color block to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator- (const ColorVolume< T > &M1, const ColorVolume< T > &M2)
 pointwise subtraction of two ColorVolume More...
 
template<typename T >
ColorVolume< T > operator- (const ColorVolume< T > &M1, const T &val)
 subtraction of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator- (const T &val, const ColorVolume< T > &M1)
 subtraction of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator- (const ColorVolume< T > &M1, const slip::Color< T > &val)
 subtraction of a Color block to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator* (const ColorVolume< T > &M1, const ColorVolume< T > &M2)
 pointwise multiplication of two ColorVolume More...
 
template<typename T >
ColorVolume< T > operator* (const ColorVolume< T > &M1, const T &val)
 multiplication of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator* (const T &val, const ColorVolume< T > &M1)
 multiplication of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator* (const ColorVolume< T > &M1, const slip::Color< T > &val)
 multiplication of a Color block to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator* (const slip::Color< T > &val, const ColorVolume< T > &M1)
 multiplication of a Color block to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator/ (const ColorVolume< T > &M1, const ColorVolume< T > &M2)
 pointwise division of two ColorVolume More...
 
template<typename T >
ColorVolume< T > operator/ (const ColorVolume< T > &M1, const T &val)
 division of a scalar to each element of a ColorVolume More...
 
template<typename T >
ColorVolume< T > operator/ (const ColorVolume< T > &M1, const slip::Color< T > &val)
 division of each element of a ColorVolume by a Color block More...
 
template<typename Container , typename _II >
void container_cast (Container &cont, _II &first, _II &last)
 Get the default iterators of a SLIP container. More...
 
template<typename Container , typename _II >
void reverse_container_cast (Container &cont, _II &first, _II &last)
 Get the reverse default iterators of a SLIP container. More...
 
template<typename Container , typename _II >
void container_castR (Container &cont, _II &first, _II &last)
 Get the reverse default iterators of a SLIP container. More...
 
template<typename Type >
std::ostream & operator<< (std::ostream &out, const DistortionCamera< Type > &c)
 
template<typename CoordType , std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const DPoint< CoordType, DIM > &p)
 
template<typename Block >
std::ostream & operator<< (std::ostream &out, const slip::GenericMultiComponent2d< Block > &a)
 
template<typename Block >
bool operator== (const slip::GenericMultiComponent2d< Block > &x, const slip::GenericMultiComponent2d< Block > &y)
 
template<typename Block >
bool operator!= (const slip::GenericMultiComponent2d< Block > &x, const slip::GenericMultiComponent2d< Block > &y)
 
template<typename Block >
std::ostream & operator<< (std::ostream &out, const slip::GenericMultiComponent3d< Block > &a)
 
template<typename Block >
bool operator== (const slip::GenericMultiComponent3d< Block > &x, const slip::GenericMultiComponent3d< Block > &y)
 
template<typename Block >
bool operator!= (const slip::GenericMultiComponent3d< Block > &x, const slip::GenericMultiComponent3d< Block > &y)
 
template<typename Block >
std::ostream & operator<< (std::ostream &out, const GenericMultiComponent4d< Block > &a)
 
template<typename Block >
bool operator== (const GenericMultiComponent4d< Block > &x, const GenericMultiComponent4d< Block > &y)
 
template<typename Block >
bool operator!= (const GenericMultiComponent4d< Block > &x, const GenericMultiComponent4d< Block > &y)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::GrayscaleImage< T > &a)
 
template<typename T >
T & min (const GrayscaleImage< T > &M1)
 Returns the min element of a GrayscaleImage. More...
 
template<typename T >
T & max (const GrayscaleImage< T > &M1)
 Returns the max element of a GrayscaleImage. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::HyperVolume< T > &a)
 
template<typename T >
HyperVolume< T > operator+ (const HyperVolume< T > &M1, const HyperVolume< T > &M2)
 pointwise addition of two HyperVolume More...
 
template<typename T >
HyperVolume< T > operator+ (const HyperVolume< T > &M1, const T &val)
 addition of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator+ (const T &val, const HyperVolume< T > &M1)
 addition of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator- (const HyperVolume< T > &M1, const HyperVolume< T > &M2)
 pointwise substraction of two HyperVolume More...
 
template<typename T >
HyperVolume< T > operator- (const HyperVolume< T > &M1, const T &val)
 substraction of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator- (const T &val, const HyperVolume< T > &M1)
 substraction of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator* (const HyperVolume< T > &M1, const HyperVolume< T > &M2)
 pointwise multiplication of two HyperVolume More...
 
template<typename T >
HyperVolume< T > operator* (const HyperVolume< T > &M1, const T &val)
 multiplication of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator* (const T &val, const HyperVolume< T > &M1)
 multiplication of a scalar to each element of a HyperVolume More...
 
template<typename T >
HyperVolume< T > operator/ (const HyperVolume< T > &M1, const HyperVolume< T > &M2)
 pointwise division of two HyperVolume More...
 
template<typename T >
HyperVolume< T > operator/ (const HyperVolume< T > &M1, const T &val)
 division of a scalar to each element of a HyperVolume More...
 
template<typename T >
T & min (const HyperVolume< T > &M1)
 
template<typename T >
T & max (const HyperVolume< T > &M1)
 
template<typename T >
HyperVolume< T > abs (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > sqrt (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > cos (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > acos (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > sin (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > asin (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > tan (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > atan (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > exp (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > log (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > cosh (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > sinh (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > tanh (const HyperVolume< T > &M)
 
template<typename T >
HyperVolume< T > log10 (const HyperVolume< T > &M)
 
template<typename T , std::size_t N>
std::ostream & operator<< (std::ostream &out, const kvector< T, N > &b)
 
template<typename T , std::size_t N>
bool operator== (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
bool operator!= (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
bool operator< (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
bool operator> (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
bool operator<= (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
bool operator>= (const kvector< T, N > &x, const kvector< T, N > &y)
 
template<typename T , std::size_t N>
kvector< T, N > operator+ (const kvector< T, N > &V1, const kvector< T, N > &V2)
 pointwise addition of two kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator+ (const kvector< T, N > &V, const T &val)
 addition of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator+ (const T &val, const kvector< T, N > &V)
 addition of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator- (const kvector< T, N > &V1, const kvector< T, N > &V2)
 pointwise substraction of two kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator- (const kvector< T, N > &V, const T &val)
 substraction of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator- (const T &val, const kvector< T, N > &V)
 substraction of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator* (const kvector< T, N > &V1, const kvector< T, N > &V2)
 pointwise multiplication of two kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator* (const kvector< T, N > &V, const T &val)
 multiplication of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator* (const T &val, const kvector< T, N > &V)
 multiplication of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator/ (const kvector< T, N > &V1, const kvector< T, N > &V2)
 pointwise division of two kvector More...
 
template<typename T , std::size_t N>
kvector< T, N > operator/ (const kvector< T, N > &V, const T &val)
 division of a scalar to each element of a kvector More...
 
template<typename T , std::size_t N>
T & min (kvector< T, N > &V1)
 
template<typename T , std::size_t N>
T & max (kvector< T, N > &V1)
 
template<typename T , std::size_t N>
kvector< typename
slip::lin_alg_traits< T >
::value_type, N > 
abs (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > sqrt (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > cos (const kvector< T, N > &V)
 
template<std::size_t N>
kvector< float, N > acos (const kvector< float, N > &V)
 
template<std::size_t N>
kvector< double, N > acos (const kvector< double, N > &V)
 
template<std::size_t N>
kvector< long double, N > acos (const kvector< long double, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > sin (const kvector< T, N > &V)
 
template<std::size_t N>
kvector< float, N > asin (const kvector< float, N > &V)
 
template<std::size_t N>
kvector< double, N > asin (const kvector< double, N > &V)
 
template<std::size_t N>
kvector< long double, N > asin (const kvector< long double, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > tan (const kvector< T, N > &V)
 
template<std::size_t N>
kvector< float, N > atan (const kvector< float, N > &V)
 
template<std::size_t N>
kvector< double, N > atan (const kvector< double, N > &V)
 
template<std::size_t N>
kvector< long double, N > atan (const kvector< long double, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > exp (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > log (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > cosh (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > sinh (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > tanh (const kvector< T, N > &V)
 
template<typename T , std::size_t N>
kvector< T, N > log10 (const kvector< T, N > &V)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Matrix< T > &a)
 
template<typename T >
T & min (const Matrix< T > &M1)
 
template<typename T >
T & max (const Matrix< T > &M1)
 
template<typename T >
Matrix< typename
slip::lin_alg_traits< T >
::value_type > 
abs (const Matrix< T > &M)
 
template<typename T >
Matrix< T > sqrt (const Matrix< T > &M)
 
template<typename T >
Matrix< T > cos (const Matrix< T > &M)
 
Matrix< float > acos (const Matrix< float > &M)
 
Matrix< double > acos (const Matrix< double > &M)
 
Matrix< long double > acos (const Matrix< long double > &M)
 
template<typename T >
Matrix< T > sin (const Matrix< T > &M)
 
Matrix< float > asin (const Matrix< float > &M)
 
Matrix< double > asin (const Matrix< double > &M)
 
Matrix< long double > asin (const Matrix< long double > &M)
 
template<typename T >
Matrix< T > tan (const Matrix< T > &M)
 
Matrix< float > atan (const Matrix< float > &M)
 
Matrix< double > atan (const Matrix< double > &M)
 
Matrix< long double > atan (const Matrix< long double > &M)
 
template<typename T >
Matrix< T > exp (const Matrix< T > &M)
 
template<typename T >
Matrix< T > log (const Matrix< T > &M)
 
template<typename T >
Matrix< T > cosh (const Matrix< T > &M)
 
template<typename T >
Matrix< T > sinh (const Matrix< T > &M)
 
template<typename T >
Matrix< T > tanh (const Matrix< T > &M)
 
template<typename T >
Matrix< T > log10 (const Matrix< T > &M)
 
template<typename T >
T & min (const Matrix3d< T > &M1)
 
template<typename T >
T & max (const Matrix3d< T > &M1)
 
template<typename T >
Matrix3d< T > abs (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > sqrt (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > cos (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > acos (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > sin (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > asin (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > tan (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > atan (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > exp (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > log (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > cosh (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > sinh (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > tanh (const Matrix3d< T > &M)
 
template<typename T >
Matrix3d< T > log10 (const Matrix3d< T > &M)
 
template<typename T >
T & min (const Matrix4d< T > &M1)
 
template<typename T >
T & max (const Matrix4d< T > &M1)
 
template<typename T >
Matrix4d< T > abs (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > sqrt (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > cos (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > acos (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > sin (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > asin (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > tan (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > atan (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > exp (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > log (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > cosh (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > sinh (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > tanh (const Matrix4d< T > &M)
 
template<typename T >
Matrix4d< T > log10 (const Matrix4d< T > &M)
 
template<std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const Monomial< DIM > &m)
 
template<typename T , std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const MultivariatePolynomial< T, DIM > &v)
 
template<std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const MultivariatePolynomial< std::complex< double >, DIM > &m)
 
template<std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const MultivariatePolynomial< std::complex< float >, DIM > &m)
 
template<std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const MultivariatePolynomial< std::complex< long double >, DIM > &m)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator+ (const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator+ (const MultivariatePolynomial< T, DIM > &P1, const T &val)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator+ (const T &val, const MultivariatePolynomial< T, DIM > &P1)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator- (const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator- (const MultivariatePolynomial< T, DIM > &P1, const T &val)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator- (const T &val, const MultivariatePolynomial< T, DIM > &P1)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator* (const MultivariatePolynomial< T, DIM > &P1, const MultivariatePolynomial< T, DIM > &P2)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator* (const MultivariatePolynomial< T, DIM > &P1, const T &val)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator* (const T &val, const MultivariatePolynomial< T, DIM > &P1)
 
template<typename T , std::size_t DIM>
MultivariatePolynomial< T, DIM > operator/ (const MultivariatePolynomial< T, DIM > &P1, const T &val)
 
template<typename Type >
std::ostream & operator<< (std::ostream &out, const PinholeCamera< Type > &c)
 
template<typename Type >
std::ostream & operator<< (std::ostream &out, const PinholeDLTCamera< Type > &c)
 
template<typename Type >
std::ostream & operator<< (std::ostream &out, const PinholeFaugerasCamera< Type > &c)
 
template<typename CoordType , std::size_t DIM>
std::ostream & operator<< (std::ostream &out, const Point< CoordType, DIM > &p)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Polynomial< T > &v)
 
template<typename Container >
std::ostream & operator<< (std::ostream &out, const slip::Pyramid< Container > &a)
 
template<typename Container >
bool operator== (const Pyramid< Container > &x, const Pyramid< Container > &y)
 
template<typename Container >
bool operator!= (const Pyramid< Container > &x, const Pyramid< Container > &y)
 
template<typename SubType >
std::ostream & operator<< (std::ostream &out, const Range< SubType > &b)
 
template<typename SubType >
bool operator== (const Range< SubType > &b1, const Range< SubType > &b2)
 
template<typename SubType >
bool operator!= (const Range< SubType > &b1, const Range< SubType > &b2)
 
template<typename T , typename GridT >
std::ostream & operator<< (std::ostream &out, const slip::RegularVector2dField2d< T, GridT > &a)
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator+ (const RegularVector2dField2d< T, GridT > &M1, const T &val)
 addition of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator+ (const T &val, const RegularVector2dField2d< T, GridT > &M1)
 addition of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator- (const RegularVector2dField2d< T, GridT > &M1, const T &val)
 substraction of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator- (const T &val, const RegularVector2dField2d< T, GridT > &M1)
 substraction of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator* (const RegularVector2dField2d< T, GridT > &M1, const T &val)
 multiplication of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator* (const T &val, const RegularVector2dField2d< T, GridT > &M1)
 multiplication of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator/ (const RegularVector2dField2d< T, GridT > &M1, const T &val)
 division of a scalar to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator+ (const RegularVector2dField2d< T, GridT > &M1, const RegularVector2dField2d< T, GridT > &M2)
 pointwise addition of two RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator+ (const RegularVector2dField2d< T, GridT > &M1, const slip::Vector2d< T > &val)
 addition of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator+ (const slip::Vector2d< T > &val, const RegularVector2dField2d< T, GridT > &M1)
 addition of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator- (const RegularVector2dField2d< T, GridT > &M1, const RegularVector2dField2d< T, GridT > &M2)
 pointwise substraction of two RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator- (const RegularVector2dField2d< T, GridT > &M1, const slip::Vector2d< T > &val)
 substraction of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator- (const slip::Vector2d< T > &val, const RegularVector2dField2d< T, GridT > &M1)
 substraction of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator* (const RegularVector2dField2d< T, GridT > &M1, const RegularVector2dField2d< T, GridT > &M2)
 pointwise multiplication of two RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator* (const RegularVector2dField2d< T, GridT > &M1, const slip::Vector2d< T > &val)
 multiplication of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator* (const slip::Vector2d< T > &val, const RegularVector2dField2d< T, GridT > &M1)
 multiplication of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator/ (const RegularVector2dField2d< T, GridT > &M1, const RegularVector2dField2d< T, GridT > &M2)
 pointwise division of two RegularVector2dField2d More...
 
template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > operator/ (const RegularVector2dField2d< T, GridT > &M1, const slip::Vector2d< T > &val)
 division of a Vector2d to each element of a RegularVector2dField2d More...
 
template<typename T , typename GridT >
std::ostream & operator<< (std::ostream &out, const slip::RegularVector3dField3d< T, GridT > &a)
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator+ (const RegularVector3dField3d< T, GridT > &M1, const T &val)
 addition of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator+ (const T &val, const RegularVector3dField3d< T, GridT > &M1)
 addition of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator- (const RegularVector3dField3d< T, GridT > &M1, const T &val)
 substraction of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator- (const T &val, const RegularVector3dField3d< T, GridT > &M1)
 substraction of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator* (const RegularVector3dField3d< T, GridT > &M1, const T &val)
 multiplication of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator* (const T &val, const RegularVector3dField3d< T, GridT > &M1)
 multiplication of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator/ (const RegularVector3dField3d< T, GridT > &M1, const T &val)
 division of a scalar to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator+ (const RegularVector3dField3d< T, GridT > &M1, const RegularVector3dField3d< T, GridT > &M2)
 pointwise addition of two RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator+ (const RegularVector3dField3d< T, GridT > &M1, const slip::Vector3d< T > &val)
 addition of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator+ (const slip::Vector3d< T > &val, const RegularVector3dField3d< T, GridT > &M1)
 addition of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator- (const RegularVector3dField3d< T, GridT > &M1, const RegularVector3dField3d< T, GridT > &M2)
 pointwise substraction of two RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator- (const RegularVector3dField3d< T, GridT > &M1, const slip::Vector3d< T > &val)
 substraction of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator- (const slip::Vector3d< T > &val, const RegularVector3dField3d< T, GridT > &M1)
 substraction of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator* (const RegularVector3dField3d< T, GridT > &M1, const RegularVector3dField3d< T, GridT > &M2)
 pointwise multiplication of two RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator* (const RegularVector3dField3d< T, GridT > &M1, const slip::Vector3d< T > &val)
 multiplication of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator* (const slip::Vector3d< T > &val, const RegularVector3dField3d< T, GridT > &M1)
 multiplication of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator/ (const RegularVector3dField3d< T, GridT > &M1, const RegularVector3dField3d< T, GridT > &M2)
 pointwise division of two RegularVector3dField3d More...
 
template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > operator/ (const RegularVector3dField3d< T, GridT > &M1, const slip::Vector3d< T > &val)
 division of a Vector3d to each element of a RegularVector3dField3d More...
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Signal< T > &v)
 
template<typename T >
T & min (const Signal< T > &V1)
 
template<typename T >
T & max (const Signal< T > &V1)
 
template<typename T >
Signal< typename
slip::lin_alg_traits< T >
::value_type > 
abs (const Signal< T > &V)
 
template<typename T >
Signal< T > sqrt (const Signal< T > &V)
 
template<typename T >
Signal< T > cos (const Signal< T > &V)
 
Signal< float > acos (const Signal< float > &V)
 
Signal< double > acos (const Signal< double > &V)
 
Signal< long double > acos (const Signal< long double > &V)
 
template<typename T >
Signal< T > sin (const Signal< T > &V)
 
Signal< float > asin (const Signal< float > &V)
 
Signal< double > asin (const Signal< double > &V)
 
Signal< long double > asin (const Signal< long double > &V)
 
template<typename T >
Signal< T > tan (const Signal< T > &V)
 
Signal< float > atan (const Signal< float > &V)
 
Signal< double > atan (const Signal< double > &V)
 
Signal< long double > atan (const Signal< long double > &V)
 
template<typename T >
Signal< T > exp (const Signal< T > &V)
 
template<typename T >
Signal< T > log (const Signal< T > &V)
 
template<typename T >
Signal< T > cosh (const Signal< T > &V)
 
template<typename T >
Signal< T > sinh (const Signal< T > &V)
 
template<typename T >
Signal< T > tanh (const Signal< T > &V)
 
template<typename T >
Signal< T > log10 (const Signal< T > &V)
 
template<typename Type >
std::ostream & operator<< (std::ostream &out, const slip::SoloffCamera< Type > &c)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Vector< T > &v)
 
template<typename T >
T & min (const Vector< T > &V1)
 
template<typename T >
T & max (const Vector< T > &V1)
 
template<typename T >
Vector< typename
slip::lin_alg_traits< T >
::value_type > 
abs (const Vector< T > &V)
 
template<typename T >
Vector< T > sqrt (const Vector< T > &V)
 
template<typename T >
Vector< T > cos (const Vector< T > &V)
 
Vector< float > acos (const Vector< float > &V)
 
Vector< double > acos (const Vector< double > &V)
 
Vector< long double > acos (const Vector< long double > &V)
 
template<typename T >
Vector< T > sin (const Vector< T > &V)
 
Vector< float > asin (const Vector< float > &V)
 
Vector< double > asin (const Vector< double > &V)
 
Vector< long double > asin (const Vector< long double > &V)
 
template<typename T >
Vector< T > tan (const Vector< T > &V)
 
Vector< float > atan (const Vector< float > &V)
 
Vector< double > atan (const Vector< double > &V)
 
Vector< long double > atan (const Vector< long double > &V)
 
template<typename T >
Vector< T > exp (const Vector< T > &V)
 
template<typename T >
Vector< T > log (const Vector< T > &V)
 
template<typename T >
Vector< T > cosh (const Vector< T > &V)
 
template<typename T >
Vector< T > sinh (const Vector< T > &V)
 
template<typename T >
Vector< T > tanh (const Vector< T > &V)
 
template<typename T >
Vector< T > log10 (const Vector< T > &V)
 
template<typename T >
Vector2d< T > operator+ (const Vector2d< T > &V1, const Vector2d< T > &V2)
 
template<typename T >
Vector2d< T > operator+ (const Vector2d< T > &V1, const T &val)
 
template<typename T >
Vector2d< T > operator+ (const T &val, const Vector2d< T > &V1)
 
template<typename T >
Vector2d< T > operator- (const Vector2d< T > &V1, const Vector2d< T > &V2)
 
template<typename T >
Vector2d< T > operator- (const Vector2d< T > &V1, const T &val)
 
template<typename T >
Vector2d< T > operator- (const T &val, const Vector2d< T > &V1)
 
template<typename T >
Vector2d< T > operator* (const Vector2d< T > &V1, const Vector2d< T > &V2)
 
template<typename T >
Vector2d< T > operator* (const Vector2d< T > &V1, const T &val)
 
template<typename T >
Vector2d< T > operator* (const T &val, const Vector2d< T > &V1)
 
template<typename T >
Vector2d< T > operator/ (const Vector2d< T > &V1, const Vector2d< T > &V2)
 
template<typename T >
Vector2d< T > operator/ (const Vector2d< T > &V1, const T &val)
 
template<typename T >
Vector3d< T > operator+ (const Vector3d< T > &V1, const Vector3d< T > &V2)
 
template<typename T >
Vector3d< T > operator+ (const Vector3d< T > &V1, const T &val)
 
template<typename T >
Vector3d< T > operator+ (const T &val, const Vector3d< T > &V1)
 
template<typename T >
Vector3d< T > operator- (const Vector3d< T > &V1, const Vector3d< T > &V2)
 
template<typename T >
Vector3d< T > operator- (const Vector3d< T > &V1, const T &val)
 
template<typename T >
Vector3d< T > operator- (const T &val, const Vector3d< T > &V1)
 
template<typename T >
Vector3d< T > operator* (const Vector3d< T > &V1, const Vector3d< T > &V2)
 
template<typename T >
Vector3d< T > operator* (const Vector3d< T > &V1, const T &val)
 
template<typename T >
Vector3d< T > operator* (const T &val, const Vector3d< T > &V1)
 
template<typename T >
Vector3d< T > operator/ (const Vector3d< T > &V1, const Vector3d< T > &V2)
 
template<typename T >
Vector3d< T > operator/ (const Vector3d< T > &V1, const T &val)
 
template<typename T >
Vector4d< T > operator+ (const Vector4d< T > &V1, const Vector4d< T > &V2)
 
template<typename T >
Vector4d< T > operator+ (const Vector4d< T > &V1, const T &val)
 
template<typename T >
Vector4d< T > operator+ (const T &val, const Vector4d< T > &V1)
 
template<typename T >
Vector4d< T > operator- (const Vector4d< T > &V1, const Vector4d< T > &V2)
 
template<typename T >
Vector4d< T > operator- (const Vector4d< T > &V1, const T &val)
 
template<typename T >
Vector4d< T > operator- (const T &val, const Vector4d< T > &V1)
 
template<typename T >
Vector4d< T > operator* (const Vector4d< T > &V1, const Vector4d< T > &V2)
 
template<typename T >
Vector4d< T > operator* (const Vector4d< T > &V1, const T &val)
 
template<typename T >
Vector4d< T > operator* (const T &val, const Vector4d< T > &V1)
 
template<typename T >
Vector4d< T > operator/ (const Vector4d< T > &V1, const Vector4d< T > &V2)
 
template<typename T >
Vector4d< T > operator/ (const Vector4d< T > &V1, const T &val)
 
template<typename T >
Volume< T > operator+ (const Volume< T > &M1, const Volume< T > &M2)
 pointwise addition of two Volume More...
 
template<typename T >
Volume< T > operator+ (const Volume< T > &M1, const T &val)
 addition of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator+ (const T &val, const Volume< T > &M1)
 addition of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator- (const Volume< T > &M1, const Volume< T > &M2)
 pointwise substraction of two Volume More...
 
template<typename T >
Volume< T > operator- (const Volume< T > &M1, const T &val)
 substraction of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator- (const T &val, const Volume< T > &M1)
 substraction of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator* (const Volume< T > &M1, const Volume< T > &M2)
 pointwise multiplication of two Volume More...
 
template<typename T >
Volume< T > operator* (const Volume< T > &M1, const T &val)
 multiplication of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator* (const T &val, const Volume< T > &M1)
 multiplication of a scalar to each element of a Volume More...
 
template<typename T >
Volume< T > operator/ (const Volume< T > &M1, const Volume< T > &M2)
 pointwise division of two Volume More...
 
template<typename T >
Volume< T > operator/ (const Volume< T > &M1, const T &val)
 division of a scalar to each element of a Volume More...
 
template<typename T >
T & min (const Volume< T > &M1)
 
template<typename T >
T & max (const Volume< T > &M1)
 
template<typename T >
Volume< T > abs (const Volume< T > &M)
 
template<typename T >
Volume< T > sqrt (const Volume< T > &M)
 
template<typename T >
Volume< T > cos (const Volume< T > &M)
 
template<typename T >
Volume< T > acos (const Volume< T > &M)
 
template<typename T >
Volume< T > sin (const Volume< T > &M)
 
template<typename T >
Volume< T > asin (const Volume< T > &M)
 
template<typename T >
Volume< T > tan (const Volume< T > &M)
 
template<typename T >
Volume< T > atan (const Volume< T > &M)
 
template<typename T >
Volume< T > exp (const Volume< T > &M)
 
template<typename T >
Volume< T > log (const Volume< T > &M)
 
template<typename T >
Volume< T > cosh (const Volume< T > &M)
 
template<typename T >
Volume< T > sinh (const Volume< T > &M)
 
template<typename T >
Volume< T > tanh (const Volume< T > &M)
 
template<typename T >
Volume< T > log10 (const Volume< T > &M)
 
Applies an unary C-function with non const parameter
template<typename InputIterator , typename OutputIterator >
void apply (InputIterator first, InputIterator last, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator >::value_type))
 Applies a C-function to each element of a range. More...
 
template<typename InputIterator , typename OutputIterator , typename MaskIterator >
void apply_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator >::value_type), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Applies a C-function to each element of a range according to a mask range. More...
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
void apply_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator >::value_type))
 Applies a C-function to each element of a range according to a predicate. More...
 
Apply an unary C-function with a const parameter
template<typename InputIterator , typename OutputIterator >
void apply (InputIterator first, InputIterator last, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator >::value_type &))
 Applies a C-function to each element of a range. More...
 
template<typename InputIterator , typename OutputIterator , typename MaskIterator >
void apply_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator >::value_type &), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Applies a C-function to each element of a range according to a mask range. More...
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
void apply_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator >::value_type &))
 Applies a C-function to each element of a range according to a predicate. More...
 
Applies a binary C-function with two non const parameters
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void apply (InputIterator1 first, InputIterator1 last, InputIterator2 first2, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type))
 Applies a two-parameter C-function to each element of two ranges. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename MaskIterator >
void apply_mask (InputIterator1 first, InputIterator1 last, MaskIterator mask_first, InputIterator2 first2, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Applies a C-function to each element of a range according to a mask range. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename Predicate >
void apply_if (InputIterator1 first, InputIterator1 last, InputIterator2 first2, OutputIterator result, Predicate pred, typename std::iterator_traits< OutputIterator >::value_type(*function)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type))
 Applies a C-function to each element of a range according to a predicate. More...
 
Applies a binary C-function with two const parameters
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void apply (InputIterator1 first, InputIterator1 last, InputIterator2 first2, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &))
 Applies a two-const-parameter C-function to each element of two ranges. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename MaskIterator >
void apply_mask (InputIterator1 first, InputIterator1 last, MaskIterator mask_first, InputIterator2 first2, OutputIterator result, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Applies a C-function to each element of a range according to a mask range. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename Predicate >
void apply_if (InputIterator1 first, InputIterator1 last, InputIterator2 first2, OutputIterator result, Predicate pred, typename std::iterator_traits< OutputIterator >::value_type(*function)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &))
 Applies a C-function to each element of a range according to a predicate. More...
 
Operations between two ranges
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void plus (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the addition of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void plus_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the addition of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void plus_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the addition of two ranges according to a Predicate. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void minus (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the difference of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void minus_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the difference of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void minus_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the difference of two ranges according to a Predicate. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void multiplies (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the pointwise product of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void multiplies_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the pointwise product of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void multiplies_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the pointwise product of two ranges according to a Predicate. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void divides (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the pointwise division of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void divides_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the pointwise division of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void divides_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the pointwise division of two ranges. according to a Predicate. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void minimum (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the minimum of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void minimum_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the minimum of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void minimum_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the minimum of two ranges according to a Predicate. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void maximum (InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
 Computes the maximum of two ranges. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void maximum_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, _InputIterator2 __first2, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Computes the maximum of two ranges according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void maximum_if (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _Predicate __pred)
 Computes the maximum of two ranges according to a Predicate. More...
 
Operations between a range and a scalar
template<typename InputIterator1 , typename OutputIterator >
void plus_scalar (InputIterator1 __first1, InputIterator1 __last1, const typename std::iterator_traits< InputIterator1 >::value_type &scalar, OutputIterator __result)
 Adds a scalar to a range. More...
 
template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void plus_scalar_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Adds a scalar to a range according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void plus_scalar_if (_InputIterator1 __first1, _InputIterator1 __last1, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, _Predicate __pred)
 Adds a scalar to a range according to a Predicate. More...
 
template<typename InputIterator1 , typename OutputIterator >
void minus_scalar (InputIterator1 __first1, InputIterator1 __last1, const typename std::iterator_traits< InputIterator1 >::value_type &scalar, OutputIterator __result)
 Substracts a scalar to a range. More...
 
template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void minus_scalar_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Substracts a scalar to a range according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void minus_scalar_if (_InputIterator1 __first1, _InputIterator1 __last1, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, _Predicate __pred)
 Substracts a scalar to a range according to a Predicate. More...
 
template<typename InputIterator1 , typename OutputIterator >
void multiplies_scalar (InputIterator1 __first1, InputIterator1 __last1, const typename std::iterator_traits< InputIterator1 >::value_type &scalar, OutputIterator __result)
 Multiplies a range by a scalar. More...
 
template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void multiplies_scalar_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Multiplies a range by a scalar according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void multiplies_scalar_if (_InputIterator1 __first1, _InputIterator1 __last1, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, _Predicate __pred)
 Multiplies a range by a scalar according to a Predicate. More...
 
template<typename InputIterator1 , typename OutputIterator >
void divides_scalar (InputIterator1 __first1, InputIterator1 __last1, const typename std::iterator_traits< InputIterator1 >::value_type &scalar, OutputIterator __result)
 Divides a range by a scalar. More...
 
template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void divides_scalar_mask (_InputIterator1 __first1, _InputIterator1 __last1, _MaskIterator __mask_first, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Divides a range by a scalar according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void divides_scalar_if (_InputIterator1 __first1, _InputIterator1 __last1, const typename std::iterator_traits< _InputIterator1 >::value_type &scalar, _OutputIterator __result, _Predicate __pred)
 Divides a range by a scalar according to a Predicate. More...
 
Operations on a range
template<typename InputIterator , typename OutputIterator >
void negate (InputIterator __first1, InputIterator __last1, OutputIterator __result)
 Computes the negation of a range. More...
 
template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void negate_mask (InputIterator __first1, InputIterator __last1, MaskIterator __mask_first, OutputIterator __result, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the negation of a range according to a mask range. More...
 
template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void negate_if (_InputIterator1 __first1, _InputIterator1 __last1, _OutputIterator __result, _Predicate __pred)
 Computes the pointwise negate of a ranges according to a Predicate. More...
 
template<class ForwardIterator , class T >
void iota (ForwardIterator first, ForwardIterator last, T value, T step=T(1))
 Iota assigns sequential increasing values based on a predefined step to a range. That is, it assigns value to *first, value + step to *(first + 1) and so on. In general, each iterator i in the range [first,last) is assigned value + step * (i - first). More...
 
template<class ForwardIterator , typename MaskIterator , class T >
void iota_mask (ForwardIterator first, ForwardIterator last, MaskIterator mask_first, T value, T step=T(1), typename std::iterator_traits< MaskIterator >::value_type value_mask=typename std::iterator_traits< MaskIterator >::value_type(1))
 Iota_mask sequential increasing values based on a predefined step to a range according to a mask sequence. More...
 
Generic distance algorithms
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor >
Real distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryFunctor distance)
 Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename MaskIterator >
Real distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, BinaryFunctor distance, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d and the given mask range. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename Predicate >
Real distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryFunctor distance, Predicate pred)
 Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d and the given predicate. More...
 
Generic distance map algorithms
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunctor >
void distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunctor distance)
 Computes the pointwise distances of two ranges: $ d(s_i, b_i)$. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename MaskIterator , typename OutputIterator , typename BinaryFunctor >
void distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, OutputIterator result, BinaryFunctor distance, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the pointwise distances of two ranges: $ d(s_i, b_i)$ according to a given mask range. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation , typename _Predicate >
void distance_if (_InputIterator1 first1, _InputIterator1 last1, _InputIterator2 first2, _OutputIterator result, _BinaryOperation distance, _Predicate pred)
 Computes the pointwise distances of two ranges: $ d(s_i, b_i)$ according to a Predicate. More...
 
Specific distance algorithms
template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T mean_square_diff (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the mean square of the pointwise difference of two ranges of size N: $ \frac{1}{N}\sum_i^N (xi - yi)^2 $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real mean_square_diff_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the mean square of the pointwise difference of two ranges of size N according to a mask sequence : $ \frac{1}{N_{mask}}\sum_{i / mask_i = value} (xi - yi)^2 $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real mean_square_diff_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the mean square of the pointwise difference of two ranges according to a Predicate : $ \frac{1}{N_{pred}}\sum_{i / pred=true} (xi - yi)^2 $. More...
 
template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T mean_abs_diff (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the mean absolute difference of two range of size N: $(1/ N)\sum_i^N |xi - yi|$. More...
 
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Value_T mean_abs_diff_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the mean absolute difference of two ranges of size N according to a mask sequence : $(1/ N_{mask})\sum_{i / mask_i = value} |xi - yi|$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real mean_abs_diff_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the mean absolute difference of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real snr (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the signal to noise ration (snr) of two ranges : $\sum_i \frac{s_i*s_i}{(s_i - b_i)^2}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real snr_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the signal to noise ration (snr) of two ranges according to a mask sequence : $\sum_{i / mask_i = value} \frac{s_i*s_i}{(s_i - b_i)^2}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real snr_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the signal to noise ration (snr) of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real snr_dB (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the decibel signal to noise ration (snr) of two ranges : $ 20.0*\log{\sum_i \frac{s_i*s_i}{(s_i - b_i)^2}}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real snr_dB_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the decibel signal to noise ration (snr) of two ranges according to a mask sequence : $ 20.0*\log{\sum_{i / mask_i = value} \frac{s_i*s_i}{(s_i - b_i)^2}}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real snr_dB_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the decibel signal to noise ration (snr) of two ranges according to a predicate: $ 20.0*\log{\sum_{i / pred = true} \frac{s_i*s_i}{(s_i - b_i)^2}}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real L22_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the square euclidian distance of two ranges: $ \sum_i (s_i - b_i)^2$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real L22_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the square eucludian distance of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} (s_i - b_i)^2$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real L22_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the square eucludian distance of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real L2_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the Euclidian distance of two ranges : $ \sqrt{\sum_i (s_i - b_i)^2}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real L2_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the eucludian distance of two ranges according to a mask sequence : $ \sqrt{\sum_{i / mask_i = value} (s_i - b_i)^2}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real L2_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the eucludian distance of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real L1_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the L1 distance of two ranges : $ \sum_i |s_i - b_i|$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real L1_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the L1 distance of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} |s_i - b_i|$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real L1_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the L1 distance of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real Minkowski_distance (const std::size_t n, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the Minkowski order n distance of two ranges : $ (\sum_i |s_i - b_i|^n)^\frac{1}{n}$ Use L1 and L2 distance for n=1 or 2. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real Minkowski_distance_mask (const std::size_t n, InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Minkowski order n distance of two ranges according to a mask sequence : $ (\sum_{i / mask_i = value} |s_i - b_i|^n)^\frac{1}{n}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real Minkowski_distance_if (const std::size_t n, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the Minkowski order n distance of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real Linf_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the Linfinite distance of two ranges : $ sup \{|s_i - b_i|\}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real Linf_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Linfinite distance of two ranges according to a mask sequence : $ sup_{mask_i = value} \{|s_i - b_i|\}$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real Linf_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the Linfinite distance of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real KullbackLeibler_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the Kullback-Leibler "distance" of two ranges : $ \sum_i (s_i log2(s_i/b_i))$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real KullbackLeibler_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Kullback-Leibler "distance" of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} (s_i log2(s_i/b_i))$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real KullbackLeibler_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the Kullback-Leibler "distance" of two ranges according to a Predicate. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real Chi2_distance (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 Computes the Chi2 "distance" of two ranges : $ \sum_i ((s_i-b_i)*(s_i-b_i)/s_i)$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real Chi2_distance_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the Chi2 "distance" of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} ((s_i-b_i)*(s_i-b_i)/s_i)$. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real Chi2_distance_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the Chi2 "distance" of two ranges according to a Predicate. More...
 
template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T psnr (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Value_T d=static_cast< Value_T >(255))
 
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Value_T psnr_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask1, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1), Value_T d=static_cast< Value_T >(255))
 
template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Value_T psnr_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, Value_T d=static_cast< Value_T >(255))
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real SSIM (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Real d=static_cast< Real >(255))
 Computes the Structural SIMilarity (SSIM) beetween two data ranges

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where. More...

 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real SSIM_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator maskFirst, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1), Real d=static_cast< Real >(255))
 Computes the structural similarity beetween two data ranges according to a mask range

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where. More...

 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real SSIM_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, Real d=255)
 Computes the Sructural SIMilarity (SSIM) beetween two data ranges according to a predicate

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where. More...

 
1d convolutions
template<typename SrcIter , typename KernelIter , typename ResIter >
void valid_convolution (SrcIter first, SrcIter last, KernelIter kernel_first, KernelIter kernel_last, std::size_t ksize_left, std::size_t ksize_right, ResIter result)
 Computes the valid convolution of signal by a 1d-kernel. More...
 
template<typename SrcIter , typename KernelIter , typename ResIter >
void full_convolution (SrcIter first, SrcIter last, KernelIter kernel_first, KernelIter kernel_last, ResIter result)
 Computes the full convolution of signal by a 1d-kernel. More...
 
template<typename SrcIter , typename KernelIter , typename ResIter >
void same_convolution (SrcIter first, SrcIter last, KernelIter kernel_first, KernelIter kernel_last, std::size_t ksize_left, std::size_t ksize_right, ResIter result, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the same convolution of signal by a 1d-kernel. More...
 
template<typename SrcIter , typename KernelIter , typename ResIter >
void same_convolution (SrcIter first, SrcIter last, KernelIter kernel_first, KernelIter kernel_last, ResIter result, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the same convolution of signal by a symmetric 1d-kernel support. More...
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void same_convolution (const Vector1 &Signal, const Vector2 &Kernel, Vector3 &Result, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the same convolution of signal by a symmetric 1d-kernel. More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void fft_circular_convolution (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 first2, RandomAccessIterator2 last2, RandomAccessIterator3 conv_first, RandomAccessIterator3 conv_last)
 Computes the FFT circular convolution. More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void fft_convolution (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 first2, RandomAccessIterator2 last2, RandomAccessIterator3 conv_first, RandomAccessIterator3 conv_last)
 Computes the FFT convolution. More...
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void fft_convolution (const Vector1 &Signal, const Vector2 &Kernel, Vector3 &Result)
 Computes the fft convolution of signal by a symmetric 1d-kernel. More...
 
2d convolutions
template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void separable_convolution2d (RandomAccessIterator2d1 I_up, RandomAccessIterator2d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, std::size_t ksize_left1, std::size_t ksize_right1, slip::BORDER_TREATMENT bt1, KernelIter2 k2_first, KernelIter2 k2_last, std::size_t ksize_left2, std::size_t ksize_right2, slip::BORDER_TREATMENT bt2, RandomAccessIterator2d2 R_up)
 Computes the separable convolution of a 2d signal by two asymmetric 1d-kernels support. More...
 
template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void separable_convolution2d (RandomAccessIterator2d1 I_up, RandomAccessIterator2d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, KernelIter2 k2_first, KernelIter2 k2_last, RandomAccessIterator2d2 R_up, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the separable convolution of a 2d signal by two symmetric 1d-kernels support. More...
 
template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Container2 >
void separable_convolution2d (const Container1 &Signal, const Kernel1 &kernel1, const Kernel2 &kernel2, Container2 &Result, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the separable convolution of 2d signal by 2 symmetric 1d-kernel support. More...
 
template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 >
void separable_convolution2d (RandomAccessIterator2d1 I_up, RandomAccessIterator2d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, std::size_t ksize_left1, std::size_t ksize_right1, slip::BORDER_TREATMENT bt1, KernelIter2 k2_first, KernelIter2 k2_last, std::size_t ksize_left2, std::size_t ksize_right2, slip::BORDER_TREATMENT bt2)
 Computes the in-place separable convolution of a 2d signal by two asymmetric 1d-kernels support. More...
 
template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void separable_fft_convolution2d (RandomAccessIterator2d1 I_up, RandomAccessIterator2d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, KernelIter2 k2_first, KernelIter2 k2_last, RandomAccessIterator2d2 R_up)
 Computes the separable 2d convolution of signal using the fft algorithm. More...
 
template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Container2 >
void separable_fft_convolution2d (const Container1 &Signal, const Kernel1 &kernel1, const Kernel2 &kernel2, Container2 &Result)
 Computes the fft convolution of a 2d signal. More...
 
template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void valid_convolution2d (SrcIter2d S_up, SrcIter2d S_bot, KernelIter2d kernel_up, KernelIter2d kernel_bot, std::size_t ksize_left, std::size_t ksize_right, std::size_t ksize_up, std::size_t ksize_bot, ResIter2d R_up, ResIter2d R_bot)
 Computes the valid convolution of 2d signal by a 2d-kernel. More...
 
template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void same_convolution2d (SrcIter2d S_up, SrcIter2d S_bot, KernelIter2d kernel_up, KernelIter2d kernel_bot, int ksize_left, int ksize_right, int ksize_up, int ksize_bot, ResIter2d R_up, ResIter2d R_bot, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the same convolution of 2d signal by a 2d-kernel. More...
 
template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void same_convolution2d (SrcIter2d S_up, SrcIter2d S_bot, KernelIter2d kernel_up, KernelIter2d kernel_bot, ResIter2d R_up, ResIter2d R_bot, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the same convolution of 2d signal by a symmetric 2d-kernel support. More...
 
template<typename Container2d1 , typename Kernel2d , typename Container2d2 >
void same_convolution2d (const Container2d1 &Signal, const Kernel2d &Kernel, Container2d2 &Result, slip::BORDER_TREATMENT bt)
 Computes the same convolution of 2d signal by a symmetric 2d-kernel. More...
 
template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void full_convolution2d (SrcIter2d S_up, SrcIter2d S_bot, KernelIter2d kernel_up, KernelIter2d kernel_bot, ResIter2d R_up, ResIter2d R_bot)
 Computes the full convolution of 2d signal by a 2d-kernel. More...
 
template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void fft_convolution2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the standard crosscorrelation between two 2D sequences using fft2d. More...
 
template<typename Container2d1 , typename Kernel2d , typename Container2d2 >
void fft_convolution2d (const Container2d1 &Signal, const Kernel2d &Kernel, Container2d2 &Result)
 Computes the convolution of a 2d signal using the fft2d. More...
 
3d convolutions
template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void separable_convolution3d (RandomAccessIterator3d1 I_up, RandomAccessIterator3d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, std::size_t ksize_left1, std::size_t ksize_right1, slip::BORDER_TREATMENT bt1, KernelIter2 k2_first, KernelIter2 k2_last, std::size_t ksize_left2, std::size_t ksize_right2, slip::BORDER_TREATMENT bt2, KernelIter3 k3_first, KernelIter3 k3_last, std::size_t ksize_left3, std::size_t ksize_right3, slip::BORDER_TREATMENT bt3, RandomAccessIterator3d2 R_up)
 Computes the separable convolution of a 3d signal by 3 asymmetric 1d-kernels. More...
 
template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void separable_convolution3d (RandomAccessIterator3d1 I_up, RandomAccessIterator3d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, KernelIter2 k2_first, KernelIter2 k2_last, KernelIter3 k3_first, KernelIter3 k3_last, RandomAccessIterator3d2 R_up, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the separable convolution of a 3d signal by 3 symmetric 1d-kernels. More...
 
template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Kernel3 , typename Container2 >
void separable_convolution3d (const Container1 &Signal, const Kernel1 &kernel1, const Kernel2 &kernel2, const Kernel3 &kernel3, Container2 &Result, slip::BORDER_TREATMENT bt=slip::BORDER_TREATMENT_ZERO_PADDED)
 Computes the separable convolution of 3d signal by a 3 1d-kernel. More...
 
template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 >
void separable_convolution3d (RandomAccessIterator3d1 I_up, RandomAccessIterator3d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, std::size_t ksize_left1, std::size_t ksize_right1, slip::BORDER_TREATMENT bt1, KernelIter2 k2_first, KernelIter2 k2_last, std::size_t ksize_left2, std::size_t ksize_right2, slip::BORDER_TREATMENT bt2, KernelIter3 k3_first, KernelIter3 k3_last, std::size_t ksize_left3, std::size_t ksize_right3, slip::BORDER_TREATMENT bt3)
 Computes the in-place separable convolution of a 3d signal by 3 asymmetric 1d-kernels. More...
 
template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void separable_fft_convolution3d (RandomAccessIterator3d1 I_up, RandomAccessIterator3d1 I_bot, KernelIter1 k1_first, KernelIter1 k1_last, KernelIter2 k2_first, KernelIter2 k2_last, KernelIter3 k3_first, KernelIter3 k3_last, RandomAccessIterator3d2 R_up)
 Computes the separable 3d convolution of signal using the fft algorithm. More...
 
template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Kernel3 , typename Container2 >
void separable_fft_convolution3d (const Container1 &Signal, const Kernel1 &kernel1, const Kernel2 &kernel2, const Kernel3 &kernel3, Container2 &Result)
 Computes the separable fft convolution of 3d signal by 3 1d-kernel. More...
 
template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void fft_convolution3d (InputIterator3d1 in1_front_upper_left, InputIterator3d1 in1_back_bottom_right, InputIterator3d2 in2_front_upper_left, InputIterator3d2 in2_back_bottom_right, OutputIterator3d out_front_upper_left, OutputIterator3d out_back_bottom_right)
 Computes the convolution of two 3D sequences using fft3d. More...
 
template<typename Container3d1 , typename Kernel3d , typename Container3d2 >
void fft_convolution3d (const Container3d1 &Signal, const Kernel3d &Kernel, Container3d2 &Result)
 Computes the convolution of a 3d signal using the fft3d. More...
 
template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void fft_convolution3d_same (InputIterator3d1 in1_front_upper_left, InputIterator3d1 in1_back_bottom_right, InputIterator3d2 in2_front_upper_left, InputIterator3d2 in2_back_bottom_right, OutputIterator3d out_front_upper_left, OutputIterator3d out_back_bottom_right)
 Computes the convolution between two 3D sequences using fft3d. More...
 
template<typename SrcIter3d , typename KernelIter3d , typename ResIter3d >
void valid_convolution3d (SrcIter3d S_up, SrcIter3d S_bot, KernelIter3d kernel_up, KernelIter3d kernel_bot, std::size_t ksize_front, std::size_t ksize_back, std::size_t ksize_left, std::size_t ksize_right, std::size_t ksize_up, std::size_t ksize_bot, ResIter3d R_up, ResIter3d R_bot)
 Computes the valid convolution of 3d signal by a 3d-kernel. More...
 
crosscorrelations between two ranges
template<typename T , typename InputIterator1 , typename InputIterator2 >
std_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2)
 Computes the standard crosscorrelation between two sequences: $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order. More...
 
template<typename T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
std_crosscorrelation_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the standard crosscorrelation between two sequences according to a mask sequence $ \sum_i x_i y_i $. Multiplies successive elements accordind to a mask sequence from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order. More...
 
template<typename T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
std_crosscorrelation_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the standard crosscorrelation between two sequences according to a Predicate. $ \sum_i x_i y_i $. More...
 
template<typename T , typename InputIterator1 , typename InputIterator2 >
cc (InputIterator1 first, InputIterator1 last, InputIterator2 first2)
 Computes the standard crosscorrelation between two sequences: $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order. More...
 
template<typename T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
cc_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the standard crosscorrelation between two sequences according to a mask sequence $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges accordind to a mask sequence and adds each product according to the mask range into the accumulated value using operator+(). The values in the ranges are processed in order. More...
 
template<typename T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
cc_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred)
 Computes the standard crosscorrelation between two sequences according to a Predicate. $ \sum_i x_i y_i $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real centered_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the centered crosscorrelation between two sequences: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real centered_crosscorrelation_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the centered crosscorrelation between two sequences according to a mask sequence $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real centered_crosscorrelation_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard crosscorrelation between two sequences according to a Predicate: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real ccc (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the centered crosscorrelation between two sequences: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real ccc_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the centered crosscorrelation between two sequences according to a mask sequence $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real ccc_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard crosscorrelation between two sequences according to a Predicate: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real pseudo_normalized_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the pseudo normalized crosscorrelation between two sequences: $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real pseudo_normalized_crosscorrelation_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the pseudo normalized crosscorrelation between two sequences according to a mask sequence : $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real pseudo_normalized_crosscorrelation_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard pseudo normalized crosscorrelation between two sequences according to a Predicate. $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real pncc (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the pseudo normalized crosscorrelation between two sequences: $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real pncc_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the pseudo normalized crosscorrelation between two sequences according to a mask sequence : $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real pncc_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard pseudo normalized crosscorrelation between two sequences according to a Predicate. $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real normalized_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard normalized crosscorrelation between two sequences: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real normalized_crosscorrelation_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the standard normalized crosscorrelation between two sequences according to a mask sequence $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real normalized_crosscorrelation_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard normalized crosscorrelation between two sequences according to a Predicate: ** $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real ncc (InputIterator1 first, InputIterator1 last, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard normalized crosscorrelation between two sequences: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real ncc_mask (InputIterator1 first1, InputIterator1 last1, MaskIterator mask_first, InputIterator2 first2, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type(), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Computes the standard normalized crosscorrelation between two sequences according to a mask sequence $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i x_i^2 \sum_i y_i^2}} $. More...
 
template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real ncc_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Predicate pred, typename std::iterator_traits< InputIterator1 >::value_type mean1=typename std::iterator_traits< InputIterator1 >::value_type(), typename std::iterator_traits< InputIterator1 >::value_type mean2=typename std::iterator_traits< InputIterator2 >::value_type())
 Computes the standard normalized crosscorrelation between two sequences according to a Predicate: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i x_i^2 \sum_i y_i^2}} $. More...
 
autocorrelations and autocovariance algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void autocorrelation_full (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void autocorrelation (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void biased_autocorrelation (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the biased autocorrelations from lag -(last-first) to (last-first) of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unbiased_autocorrelation (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the unbiased autocorrelations from lag -(last-first) to (last-first) of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void autocovariance (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the autocovariance from lag -(last-first) to 0 of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void biased_autocovariance (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the biased autocovariance from lag -(last-first) to 0 of a range [first,last). More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unbiased_autocovariance (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 auto_first, RandomAccessIterator2 auto_last)
 Computes the unbiased autocovariance from lag -(last-first) to 0 of a range [first,last). More...
 
template<typename RandomAccessIterator , typename Matrix >
void biased_autocorrelation_matrix (RandomAccessIterator first, RandomAccessIterator last, Matrix &A)
 Constructs the biased autocorrelation matrix from given a range. More...
 
template<typename RandomAccessIterator , typename Matrix >
void biased_autocovariance_matrix (RandomAccessIterator first, RandomAccessIterator last, Matrix &A)
 Constructs the biased autocorrelation matrix from given a range. More...
 
crosscorrelation map algorithms
template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right, CROSSCORRELATION_TYPE t)
 Computes the crosscorrelation between two Images. More...
 
template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void std_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the standard crosscorrelation between two Images. More...
 
template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void centered_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the centered crosscorrelation between two Images. More...
 
template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void pseudo_normalized_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the pseudo normalized crosscorrelation between two Images. More...
 
template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void normalized_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the normalized crosscorrelation between two Images. More...
 
fft crosscorrelation algorithms
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void fft_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2, InputIterator2 last2, OutputIterator result_first, OutputIterator result_last)
 Computes the standard crosscorrelation between two sequences using fft. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void fft_crosscorrelation_same (InputIterator1 first, InputIterator1 last, InputIterator2 first2, InputIterator2 last2, OutputIterator result_first, OutputIterator result_last)
 Computes the FFT central part of the crosscorrelation. More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void fft_circular_crosscorrelation (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 first2, RandomAccessIterator2 last2, RandomAccessIterator3 result_first, RandomAccessIterator3 result_last)
 Computes the FFT circular crosscorrelation. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void complex_fft_crosscorrelation (InputIterator1 first, InputIterator1 last, InputIterator2 first2, InputIterator2 last2, OutputIterator result_first, OutputIterator result_last)
 Computes the standard complex crosscorrelation between two sequences using fft. More...
 
template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void fft_circular_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the circular crosscorrelation between two 2D sequences using fft2d. More...
 
template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void fft_crosscorrelation2d (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the standard crosscorrelation between two 2D sequences using fft2d. More...
 
template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void fft_crosscorrelation2d_same (InputIterator2d1 in1_upper_left, InputIterator2d1 in1_bottom_right, InputIterator2d2 in2_upper_left, InputIterator2d2 in2_bottom_right, OutputIterator2d out_upper_left, OutputIterator2d out_bottom_right)
 Computes the standard crosscorrelation between two 2D sequences using fft2d. More...
 
template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void fft_circular_crosscorrelation3d (InputIterator3d1 in1_front_upper_left, InputIterator3d1 in1_back_bottom_right, InputIterator3d2 in2_front_upper_left, InputIterator3d2 in2_back_bottom_right, OutputIterator3d out_front_upper_left, OutputIterator3d out_back_bottom_right)
 Computes the standard crosscorrelation between two 3D sequences using fft3d. More...
 
template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void fft_crosscorrelation3d (InputIterator3d1 in1_front_upper_left, InputIterator3d1 in1_back_bottom_right, InputIterator3d2 in2_front_upper_left, InputIterator3d2 in2_back_bottom_right, OutputIterator3d out_front_upper_left, OutputIterator3d out_back_bottom_right)
 Computes the standard crosscorrelation between two 3D sequences using fft3d. More...
 
template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void fft_crosscorrelation3d_same (InputIterator3d1 in1_front_upper_left, InputIterator3d1 in1_back_bottom_right, InputIterator3d2 in2_front_upper_left, InputIterator3d2 in2_back_bottom_right, OutputIterator3d out_front_upper_left, OutputIterator3d out_back_bottom_right)
 Computes the standard crosscorrelation between two 3D sequences using fft3d. More...
 
Differential operator algorithms
template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename Operator >
void differential_operator (RandomAccessIteratorNd1 in_first, RandomAccessIteratorNd1 in_last, RandomAccessIteratorNd2 out_first, Operator &op)
 Applies a differential operator on a range. More...
 
template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename RandomAccessIteratorNd3 , typename Operator1 , typename Operator2 >
void differential_operator_2 (RandomAccessIteratorNd1 in_first, RandomAccessIteratorNd1 in_last, RandomAccessIteratorNd2 out_first1, RandomAccessIteratorNd3 out_first2, Operator1 &op1, Operator2 &op2)
 Applies 2 differential operators on a range. More...
 
template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename RandomAccessIteratorNd3 , typename RandomAccessIteratorNd4 , typename Operator1 , typename Operator2 , typename Operator3 >
void differential_operator_3 (RandomAccessIteratorNd1 in_first, RandomAccessIteratorNd1 in_last, RandomAccessIteratorNd2 out_first1, RandomAccessIteratorNd3 out_first2, RandomAccessIteratorNd4 out_first3, Operator1 &op1, Operator2 &op2, Operator3 &op3)
 Applies 3 differential operators on a range. More...
 
FFT Tools Functions
unsigned int bitReverse (unsigned int x, const int log2n)
 bitReverse function used in the Cooley-Tukey FFT algorithm More...
 
unsigned int log2 (unsigned int x)
 Calculates the log2 of an integer. More...
 
template<class ForwardIterator >
void fftshift (ForwardIterator first, ForwardIterator last)
 Performs a shift of a container, for use with the fft and ifft functions, in order to move the frequency 0 to the center of the container. More...
 
template<class ForwardIterator2D >
void fftshift2d (ForwardIterator2D upper_left, ForwardIterator2D bottom_right)
 Performs a shift of a 2d container, for use with the fft2d and ifft2d functions, in order to move the frequency 0 to the center of the container. More...
 
template<class ForwardIterator3D >
void fftshift3d (ForwardIterator3D front_upper_left, ForwardIterator3D back_bottom_right)
 Performs a shift of a 2d container, for use with the fft2d and ifft2d functions, in order to move the frequency 0 to the center of the container. More...
 
template<class ForwardIterator4D >
void fftshift4d (ForwardIterator4D first_front_upper_left, ForwardIterator4D last_back_bottom_right)
 Performs a shift of a 4d container, for use with the fft4d and ifft4d functions, in order to move the frequency 0 to the center of the container. More...
 
FFT Radix2 (Cooley-Tukey) algorithms.
template<class InputIter_T , class Iter_T >
void radix2_fft (InputIter_T a, Iter_T b, const int log2n)
 Computes the Cooley-Tukey (radix2) fft of a container. More...
 
template<class InputIter_T , class Iter_T >
void radix2_ifft (InputIter_T a, Iter_T b, const int log2n)
 Computes the inverse Cooley-Tukey (radix2) fft of a container. More...
 
template<class InputIter_T , class Iter_T >
void real_radix2_fft (InputIter_T a, Iter_T b, const int log2n)
 Computes the Cooley-Tukey (radix2) real_fft of a container. More...
 
template<typename InputIterator1d , typename OuputIterator1d >
void radix2_fft1d2d (InputIterator1d begin1, OuputIterator1d begin2, std::size_t nb_lig, std::size_t nb_col)
 Computes the radix 2 fft2d of a container with 1d iterator (compatible with simple pointers). More...
 
template<typename InputIterator1d , typename OuputIterator1d >
void radix2_ifft1d2d (InputIterator1d begin1, OuputIterator1d begin2, std::size_t nb_lig, std::size_t nb_col)
 Computes the inverse radix 2 fft2d of a container with 1d iterators (compatible with simple pointers). More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void radix2_fft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the radix2 (Cooley-Tukey) fft2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void radix2_ifft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the radix2 ifft2d of a container with 2d iterators. More...
 
template<typename Matrix1 , typename Matrix2 >
void radix2_fft2d (Matrix1 &datain, Matrix2 &dataout)
 Computes the radix2 fft2d of a container. More...
 
template<typename Matrix1 , typename Matrix2 >
void radix2_ifft2d (Matrix1 &datain, Matrix2 &dataout)
 Computes the radix2 fft2d of a container. More...
 
FFT Split-Radix algorithms (from FFTPACK.hpp).
template<class InputIter , class OutputIter >
void real_split_radix_fft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the real split radix fft of a container (from FFTPACK.hpp). More...
 
template<class InputIter , class OutputIter >
void complex_split_radix_fft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the complex split radix fft of a container (from FFTPACK.hpp). More...
 
template<class InputIter , class OutputIter >
void split_radix_ifft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the split radix fft backward of a container (from FFTPACK.hpp). More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void real_split_radix_fft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the real split-radix fft2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void complex_split_radix_fft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the complex split-radix fft2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void split_radix_ifft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the split-radix ifft2d of a container with 2d iterators. More...
 
template<typename InputMatrix , typename OutputMatrix >
void real_split_radix_fft2d (InputMatrix &datain, OutputMatrix &dataout)
 Computes the real split-radix fft2d of a container. More...
 
template<typename InputMatrix , typename OutputMatrix >
void split_radix_ifft2d (InputMatrix &datain, OutputMatrix &dataout)
 Computes the split-radix ifft2d of a container. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void real_split_radix_fft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the real split-radix fft3d of a container with 3d iterators. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void split_radix_ifft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the split-radix ifft3d of a container with 3d iterators. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void complex_split_radix_fft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the complex split-radix fft3d of a container with 3d iterators. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void complex_split_radix_fft3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the complex split-radix fft3d of a container 3d. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void real_split_radix_fft3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the real split-radix fft3d of a container 3d. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void split_radix_ifft3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the split-radix ifft3d of a container 3d. More...
 
template<class InputIter , class OutputIter >
void split_radix_idct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the split radix Discrete Cosinus Transform III (i.e. idct) of a container (from FFTPACK.hpp). More...
 
template<class InputIter , class OutputIter >
void split_radix_dct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the split radix Discrete Cosinus Transform II of a container (from FFTPACK.hpp). More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void real_split_radix_fft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the real split-radix fft4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void complex_split_radix_fft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the complex split-radix fft4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void split_radix_ifft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the split-radix ifft4d of a container with 4d iterators. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void real_split_radix_fft4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the real split-radix fft4d of a container 4d. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void complex_split_radix_fft4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the complex split-radix fft4d of a container 4d. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void split_radix_ifft4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the split-radix ifft4d of a container 4d. More...
 
fftw algorithms (from fftw3.h).
template<class ForwardIterator1 , class ForwardIterator2 >
void fftduplicate (ForwardIterator1 begin1, ForwardIterator2 begin2, ForwardIterator2 end2)
 Calculates the conjugates of the begin std::complex elements of a first container. Writes them at the end of a second container. This function is used to calculate the negative frequencies after a real fftw. More...
 
template<class ForwardIterator2D >
void fftduplicate2d (ForwardIterator2D upper_left, ForwardIterator2D bottom_right)
 Performs a duplicate of a 2D container, for use with the fft2d and ifft2d functions, in order to calculate the negative frequencies with the real fftw2d. More...
 
template<class InputIter , class OutputIter >
void real_fftw (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the real fftw of a container (from fftw3.h). More...
 
template<class InputIter , class OutputIter >
void complex_fftw (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 complex fftw of a container (from fftw3.h). More...
 
template<class InputIter , class OutputIter >
void ifftw (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the fftw backward of a container (from fftw3.h). More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void real_fftw2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the real fftw2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void complex_fftw2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the complex fftw2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void ifftw2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the ifftw2d of a container with 2d iterators. More...
 
template<typename InputMatrix , typename OutputMatrix >
void real_fftw2d (InputMatrix &datain, OutputMatrix &dataout)
 Computes the real fftw2d of a container. More...
 
template<typename InputMatrix , typename OutputMatrix >
void ifftw2d (InputMatrix &datain, OutputMatrix &dataout)
 Computes the ifftw2d of a container. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void real_fftw3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the real fftw3d of a container with 3d iterators. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void complex_fftw3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the complex fftw3d of a container with 3d iterators. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void complex_fft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the complex fft3d of a container with 3d iterators. More...
 
template<typename Volume1 , typename Volume2 >
void complex_fft3d (Volume1 &datain, Volume2 &dataout)
 Computes the complex fft3d of a container. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void ifftw3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the ifftw3d of a container with 3d iterators. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void real_fftw3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the real fftw3d of a container 3d. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void complex_fftw3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the complex fftw3d of a container 3d. More...
 
template<typename InputMatrix3d , typename OutputMatrix3d >
void ifftw3d (InputMatrix3d &datain, OutputMatrix3d &dataout)
 Computes the ifftw3d of a container 3d. More...
 
template<class InputIter , class OutputIter >
void fftw_dct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the Discrete Cosinus Transform II (forward) of a container (from fftw). More...
 
template<class InputIter , class OutputIter >
void fftw_idct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the Discrete Cosinus Transform III (backward) of a container (from fftw). More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void real_fftw4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the real fftw4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void complex_fftw4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the complex fftw4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void ifftw4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the ifftw4d of a container with 4d iterators. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void real_fftw4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the real fftw4d of a container 4d. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void complex_fftw4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the complex fftw4d of a container 4d. More...
 
template<typename InputMatrix4d , typename OutputMatrix4d >
void ifftw4d (const InputMatrix4d &datain, OutputMatrix4d &dataout)
 Computes the ifftw4d of a container 4d. More...
 
FFT Generic Algorithms
template<class InputIter , class OutputIter >
void real_fft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the real fft of a container. More...
 
template<class InputIter , class OutputIter >
void complex_fft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the complex fft of a container. More...
 
template<class InputIter , class OutputIter >
void ifft (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the inverse fft of a container. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void real_fft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the real fft2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void complex_fft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the complex fft2d of a container with 2d iterators. More...
 
template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void ifft2d (InputBidirectionalIterator2d in_upper_left, InputBidirectionalIterator2d in_bottom_right, OutputBidirectionalIterator2d out_upper_left)
 Computes the ifft2d of a container with 2d iterators. More...
 
template<typename Matrix1 , typename Matrix2 >
void real_fft2d (Matrix1 &datain, Matrix2 &dataout)
 Computes the real fft2d of a container. More...
 
template<typename Matrix1 , typename Matrix2 >
void complex_fft2d (Matrix1 &datain, Matrix2 &dataout)
 Computes the complex fft2d of a container. More...
 
template<typename Matrix1 , typename Matrix2 >
void ifft2d (Matrix1 &datain, Matrix2 &dataout)
 Computes the fft2d of a container. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void real_fft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the real fft3d of a container with 3d iterators. More...
 
template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void ifft3d (InputBidirectionalIterator3d in_front_upper_left, InputBidirectionalIterator3d in_back_bottom_right, OutputBidirectionalIterator3d out_front_upper_left)
 Computes the ifft3d of a container with 3d iterators. More...
 
template<typename Volume1 , typename Volume2 >
void real_fft3d (Volume1 &datain, Volume2 &dataout)
 Computes the real fft3d of a container. More...
 
template<typename Volume1 , typename Volume2 >
void ifft3d (Volume1 &datain, Volume2 &dataout)
 Computes the fft3d of a container. More...
 
template<class InputIter , class OutputIter >
void dct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the Discrete Cosinus Transform II (forward) of a container. More...
 
template<class InputIter , class OutputIter >
void idct (InputIter in_begin, InputIter in_end, OutputIter out_begin)
 Computes the Discrete Cosinus Transform III (backward) of a container. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void real_fft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the real fft4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void complex_fft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the complex fft4d of a container with 4d iterators. More...
 
template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void ifft4d (InputBidirectionalIterator4d in_first_front_upper_left, InputBidirectionalIterator4d in_last_back_bottom_right, OutputBidirectionalIterator4d out_first_front_upper_left)
 Computes the ifft4d of a container with 4d iterators. More...
 
template<typename HyperVolume1 , typename HyperVolume2 >
void real_fft4d (const HyperVolume1 &datain, HyperVolume2 &dataout)
 Computes the real fft4d of a container. More...
 
template<typename HyperVolume1 , typename HyperVolume2 >
void complex_fft4d (const HyperVolume1 &datain, HyperVolume2 &dataout)
 Computes the complex fft4d of a container. More...
 
template<typename HyperVolume1 , typename HyperVolume2 >
void ifft4d (const HyperVolume1 &datain, HyperVolume2 &dataout)
 Computes the fft4d of a container. More...
 
Miscellaneous algorithms
std::size_t split_extension (const std::string &file_path_name, std::string &file_path_name_cut, std::string &ext)
 Split a file_name in two substrings: the file_path_name string without the extension and the extension string. More...
 
std::string compose_file_name (const std::string &file_path_name, const std::size_t img)
 Compose a file_name from the file name format basenamend*.ext. More...
 
template<typename Container >
void print (const Container &C, const std::string &name="")
 Print the name of the container follow by the values of the container in a terminal. More...
 
Raw input/output algorithms
template<typename InputIterator >
void write_raw (InputIterator first, InputIterator last, const std::string &file_path_name)
 Write a Container to an raw file. More...
 
template<typename InputIterator >
void read_raw (const std::string &file_path_name, InputIterator first, InputIterator last)
 Write a Container to an raw file. More...
 
2d containers input/output
template<typename RandomAccessIterator2d , typename WriteType >
void write_ascii_2d (RandomAccessIterator2d upper_left, RandomAccessIterator2d bottom_right, const std::string &file_path_name)
 Write a Container2d to an ASCII file. More...
 
template<typename Container2d , typename WriteType >
void write_ascii_2d (const Container2d &cont, const std::string &file_path_name)
 Write a Container2d to an ASCII file. More...
 
template<typename Container2d >
void read_ascii_2d (Container2d &container, const std::string &file_path_name)
 Read a Container2d from an ASCII file. More...
 
template<typename RandomAccessIterator2d , typename WriteType >
void write_tecplot_2d (RandomAccessIterator2d upper_left, RandomAccessIterator2d bottom_right, const std::string &file_path_name, const std::string &title, const std::string &zone, const int precision=6)
 Write a Container2d to an ASCII file. More...
 
2d vector fields input/output
template<typename MultiContainer2d >
void write_gnuplot_vect2d (const MultiContainer2d &field, const std::string &file_path_name, const int precision=6)
 Write a DenseVector2dField2D to a gnuplot file. More...
 
template<typename MultiContainer2d , typename T >
void write_gnuplot_vect2d (const MultiContainer2d &field, const slip::Point2d< T > &init_point, const slip::Point2d< T > &step, const std::string &file_path_name, const int precision=6)
 Write a DenseVector2dField2D to a gnuplot file handle real regular grid 2d. More...
 
template<typename MultiContainer2d >
void write_tecplot_vect2d (const MultiContainer2d &field, const std::string &file_path_name, const std::string &title, const std::string &zone, const int precision=6)
 Write a DenseVector2dField2D to a tecplot file. More...
 
template<typename MultiContainer2d , typename T >
void write_tecplot_vect2d (const MultiContainer2d &field, const slip::Point2d< T > &init_point, const slip::Point2d< T > &step, const std::string &file_path_name, const std::string &title, const std::string &zone, const int precision=6)
 Write a DenseVector2dField2D to a tecplot file handle real regular grid 2d. More...
 
template<class MultiContainer2d >
void read_tecplot_vect2d (const std::string &file_path_name, MultiContainer2d &field)
 Create a DenseVector2dField2D from a tecplot file. More...
 
template<class MultiContainer2d , typename T >
void read_tecplot_vect2d (const std::string &file_path_name, MultiContainer2d &field, slip::Point2d< T > &init_point, slip::Point2d< T > &step)
 Create a DenseVector2dField2D from a tecplot file handle 2d real regular grid. More...
 
template<typename MultiContainer2d >
void read_tecplot_XY (const std::string &file_path_name, MultiContainer2d &XY)
 Create a XY DenseVector2dField2D from a tecplot file. More...
 
template<typename Vector1 , typename Vector2 >
void read_tecplot_XY (const std::string &file_path_name, Vector1 &X, Vector2 &Y)
 Reads X and Y column of an ASCII 2d tecplot file. More...
 
template<class MultiContainer2d >
void read_gnuplot_vect2d (const std::string &file_path_name, MultiContainer2d &field)
 Create a DenseVector2dField2D from a gnuplot file. More...
 
template<class MultiContainer2d , typename T >
void read_gnuplot_vect2d (const std::string &file_path_name, MultiContainer2d &field, slip::Point2d< T > &init_point, slip::Point2d< T > &step)
 Create a DenseVector2dField2D from a gnuplot file handle 2d real regular grid. More...
 
template<typename MultiContainer2d >
void read_gnuplot_XY (const std::string &file_path_name, MultiContainer2d &XY)
 Create a XY DenseVector2dField2D from a gnuplot file. More...
 
template<typename Vector1 , typename Vector2 >
void read_gnuplot_XY (const std::string &file_path_name, Vector1 &X, Vector2 &Y)
 Read X and Y column of a 2d gnuplot ASCII file. More...
 
3d vector fields input/output
template<typename DenseVector3dField3d >
void write_tecplot_vect3d (const DenseVector3dField3d &field, const std::string &file_path_name, const std::string &title, const std::string &zone, const int precision=6)
 Write a DenseVector3dField3D to a tecplot file. More...
 
template<typename DenseVector3dField3d , typename T >
void write_tecplot_vect3d (const DenseVector3dField3d &field, const slip::Point3d< T > &init_point, const slip::Point3d< T > &step, const std::string &file_path_name, const std::string &title, const std::string &zone, const int precision=6)
 Write a DenseVector3dField3D to a tecplot file handle 3d real regular grid. More...
 
template<class MultiContainer3d >
void read_tecplot_vect3d (const std::string &file_path_name, MultiContainer3d &field)
 Create a DenseVector3dField3D from a tecplot file. More...
 
template<class MultiContainer3d , typename T >
void read_tecplot_vect3d (const std::string &file_path_name, MultiContainer3d &field, slip::Point3d< T > &init_point, slip::Point3d< T > &step)
 Create a DenseVector3dField3D from a tecplot file handle 3d real regular grid. More...
 
template<class MultiContainer3d >
void read_tecplot_XYZ (const std::string &file_path_name, MultiContainer3d &XYZ)
 Create a XYZ DenseVector3dField3D from a tecplot file. More...
 
template<class Vector1 , class Vector2 , class Vector3 >
void read_tecplot_XYZ (const std::string &file_path_name, Vector1 &X, Vector2 &Y, Vector3 &Z)
 Create a XYZ DenseVector3dField3D from a tecplot file. More...
 
template<class MultiContainer3d >
void read_gnuplot_XYZ (const std::string &file_path_name, MultiContainer3d &XYZ)
 Create a XYZ DenseVector3dField3D from a gnuplot file. More...
 
1d ASCII containers input/output
template<typename InputIterator , typename WriteType >
void write_ascii_1d (InputIterator first, InputIterator last, const std::string &file_path_name)
 Write a Container1d to an ASCII file. More...
 
template<typename Container1d >
void read_ascii_1d (const std::string &file_path_name, Container1d &container)
 Read a Container1d from an ASCII file. More...
 
container3d (volume) input/output
template<typename Container3d >
void write_tecplot_vol (const Container3d &container, const std::string &file_path_name, const std::string &title)
 Write a Container3D to a tecplot file. More...
 
template<typename Container3d >
void write_to_images_tecplot (Container3d &container, const std::string &file_path_name, const std::string &title, const std::size_t from, const std::size_t to)
 Write slices of a Container3D to a tecplot file. More...
 
Matrix vector algorithms
template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void matrix_vector_multiplies (RandomAccessIterator2d M_upper_left, RandomAccessIterator2d M_bottom_right, RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 result_first, RandomAccessIterator2 result_last)
 Computes the multiplication of a Matrix and a Vector: Result=MV. More...
 
template<typename AT , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void aXpY (const AT &a, RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2)
 Computes the saxpy ("scalar a x plus b") for each element of two ranges x and y. More...
 
template<typename RandomAccessIterator1 , typename T , typename RandomAccessIterator2 >
void vector_scalar_multiplies (RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, const T &scal, RandomAccessIterator2 result_first)
 Computes the multiplication of a vector V by a scalar scal. More...
 
template<typename Vector1 , typename T , typename Vector2 >
void vector_scalar_multiplies (const Vector1 &V, const T &scal, Vector2 &Result)
 Computes the multiplication of a vector V by a scalar scal. More...
 
template<typename RandomAccessIterator1 , typename T , typename RandomAccessIterator2 >
void conj_vector_scalar_multiplies (RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, const T &scal, RandomAccessIterator2 result_first)
 Computes the multiplication of a vector $\overline{V}$ by a scalar scal. More...
 
template<typename Vector1 , typename T , typename Vector2 >
void conj_vector_scalar_multiplies (const Vector1 &V, const T &scal, Vector2 &Result)
 Computes the multiplication of a vector $\overline{V}$ by a scalar scal. More...
 
template<class RandomAccessIterator2d1 , class T , class RandomAccessIterator2d2 >
void matrix_scalar_multiplies (RandomAccessIterator2d1 M_upper_left, RandomAccessIterator2d1 M_bottom_right, const T &scal, RandomAccessIterator2d2 R_upper_left, RandomAccessIterator2d2 R_bottom_right)
 Computes the multiplication of a Matrix by a scalar R = M*scal. More...
 
template<class Matrix1 , class T , class Matrix2 >
void matrix_scalar_multiplies (const Matrix1 &M, const T &scal, Matrix2 &R)
 Computes the multiplication of a Matrix by a scalar R = M*scal. More...
 
template<class Matrix , class Vector1 , class Vector2 >
void matrix_vector_multiplies (const Matrix &M, const Vector1 &V, Vector2 &Result)
 Computes the multiplication of a Matrix and a Vector: Result=MV. More...
 
template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void hvector_matrix_multiplies (RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, RandomAccessIterator2d M_up, RandomAccessIterator2d M_bot, RandomAccessIterator2 result_first, RandomAccessIterator2 result_last)
 Computes the hermitian left multiplication:

\[R = V^H M\]

. More...

 
template<class Vector1 , class Matrix , class Vector2 >
void hvector_matrix_multiplies (const Vector1 &V, const Matrix &M, Vector2 &R)
 Computes the hermitian left multiplication:

\[R = V^H M\]

. More...

 
template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void tvector_matrix_multiplies (RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, RandomAccessIterator2d M_up, RandomAccessIterator2d M_bot, RandomAccessIterator2 result_first, RandomAccessIterator2 result_last)
 Computes the transpose left multiplication:

\[R = V^T M\]

. More...

 
template<class Vector1 , class Matrix , class Vector2 >
void tvector_matrix_multiplies (const Vector1 &V, const Matrix &M, Vector2 &R)
 Computes the transpose left multiplication:

\[R = V^T M\]

. More...

 
template<class RandomAccessIterator2d1 , class RandomAccessIterator2d2 , class RandomAccessIterator2d3 >
void hmatrix_matrix_multiplies (RandomAccessIterator2d1 M1_up, RandomAccessIterator2d1 M1_bot, RandomAccessIterator2d2 M2_up, RandomAccessIterator2d2 M2_bot, RandomAccessIterator2d3 result_up, RandomAccessIterator2d3 result_bot)
 Computes the hermitian left multiplication of a matrix:

\[R = M1^H M2\]

. More...

 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void hmatrix_matrix_multiplies (const Matrix1 &M1, const Matrix2 &M2, Matrix3 &Result)
 Computes the hermitian left multiplication of a matrix:

\[R = M1^H M2\]

. More...

 
template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void hmatrix_vector_multiplies (RandomAccessIterator2d M_up, RandomAccessIterator2d M_bot, RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, RandomAccessIterator2 R_first, RandomAccessIterator2 R_last)
 Computes the hermitian matrix left multiplication of a vector:

\[R = M^H V\]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void hmatrix_vector_multiplies (const Matrix &M, const Vector1 &V, Vector2 &R)
 Computes the hermitian matrix left multiplication of a vector:

\[R = M^H V\]

. More...

 
template<typename RandomAccessIterator2d , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void gen_matrix_vector_multiplies (RandomAccessIterator2d M_up, RandomAccessIterator2d M_bot, RandomAccessIterator1 V_first, RandomAccessIterator1 V_last, RandomAccessIterator2 Y_first, RandomAccessIterator2 Y_last)
 Computes the generalised multiplication of a Matrix and a Vector: computes the update

\[Y = MV + Y \]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void gen_matrix_vector_multiplies (const Matrix &M, const Vector1 &V, Vector2 &Y)
 Computes the generalised multiplication of a Matrix and a Vector: computes the update

\[Y = MV + Y\]

. More...

 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void matrix_matrix_multiplies (MatrixIterator1 M1_up, MatrixIterator1 M1_bot, MatrixIterator2 M2_up, MatrixIterator2 M2_bot, MatrixIterator3 R_up, MatrixIterator3 R_bot)
 Computes the matrix matrix multiplication of 2 2d ranges. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void matrix_matrix_multiplies (const Matrix1 &M1, const Matrix2 &M2, Matrix3 &Result)
 Computes the multiplication of a two Matrix. More...
 
template<typename RandomAccessIterator2d1 , typename RandomAccessIterator2d2 , typename RandomAccessIterator2d3 >
void gen_matrix_matrix_multiplies (RandomAccessIterator2d1 A_up, RandomAccessIterator2d1 A_bot, RandomAccessIterator2d2 B_up, RandomAccessIterator2d2 B_bot, RandomAccessIterator2d3 C_up, RandomAccessIterator2d3 C_bot)
 Computes the generalized multiplication of a two Matrix:

\[C = AB + C\]

. More...

 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void gen_matrix_matrix_multiplies (const Matrix1 &A, const Matrix2 &B, Matrix3 &C)
 Computes the generalized multiplication of a two Matrix:

\[C = AB + C\]

. More...

 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void multiplies (const Matrix1 &M1, const std::size_t nr1, const std::size_t nc1, const Matrix2 &M2, const std::size_t nr2, const std::size_t nc2, Matrix3 &Result, const std::size_t nr3, const std::size_t nc3)
 Computes the multiplication of two Matrix. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void multiplies (const Matrix1 &M, const std::size_t nrm, const std::size_t ncm, const Matrix2 &V, const std::size_t nrv, Matrix3 &Result, const std::size_t nrr)
 Computes the multiplication of a Matrix with a Vector. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void multiplies (const Matrix1 &M1, const Matrix2 &M2, Matrix3 &Result)
 Computes the multiplication of two Matrix. More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void multiplies (MatrixIterator1 A1_up, MatrixIterator1 A1_bot, MatrixIterator2 A2_up, MatrixIterator2 A2_bot, MatrixIterator3 Res_up, MatrixIterator3 Res_bot)
 Computes the multiplication of two matrices $ Res = A_1 \times A_2 $. More...
 
template<class RandomAccessIterator2d1 , class RandomAccessIterator2d2 >
void matrix_matrixt_multiplies (RandomAccessIterator2d1 M1_up, RandomAccessIterator2d1 M1_bot, RandomAccessIterator2d2 Res_up, RandomAccessIterator2d2 Res_bot)
 Computes the multiplication of a matrix with its transposate A^T $ Res = A \times A^T $. More...
 
template<class Matrix1 , class Matrix2 >
void matrix_matrixt_multiplies (const Matrix1 &M1, Matrix2 &result)
 Computes the multiplication of A and its transposate AT $ Res = A \times A^T $. More...
 
template<class RandomAccessIterator2d1 , class T , class RandomAccessIterator2d2 >
void matrix_shift (RandomAccessIterator2d1 M_upper_left, RandomAccessIterator2d1 M_bottom_right, const T &lambda, RandomAccessIterator2d2 R_upper_left, RandomAccessIterator2d2 R_bottom_right)
 Computes

\[ R = A - \lambda I_n\]

with In the identity matrix. More...

 
template<class RandomAccessIterator2d1 , class T >
void matrix_shift (RandomAccessIterator2d1 M_upper_left, RandomAccessIterator2d1 M_bottom_right, const T &lambda)
 Computes

\[ A = A - \lambda I_n\]

with In the identity matrix. More...

 
template<class Matrix1 , class T , class Matrix2 >
void matrix_shift (const Matrix1 &A, const T &lambda, Matrix2 &R)
 Computes

\[ R = A - \lambda I_n\]

with In the identity matrix. More...

 
template<class Matrix , class T >
void matrix_shift (Matrix &A, const T &lambda)
 Computes

\[ A = A - \lambda I_n\]

with In the identity matrix. More...

 
template<typename RandomAccessIterator2d1 , typename T , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void rank1_update (RandomAccessIterator2d1 A_up, RandomAccessIterator2d1 A_bot, const T &alpha, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 Y_first, RandomAccessIterator2 Y_last)
 Computes

\[ A = A + \alpha X Y^H\]

. More...

 
template<typename Matrix , typename T , typename Vector1 , typename Vector2 >
void rank1_update (Matrix &A, const T &alpha, const Vector1 &X, const Vector2 &Y)
 Computes

\[ A = A + \alpha X Y^H\]

. More...

 
template<typename Iterator1 , typename Iterator2 , typename U >
void reduction (Iterator1 seq1_beg, Iterator1 seq1_end, Iterator2 seq2_beg, U u)
 Add u times the second sequence to the first one: seq1 = seq1 + u * seq2. More...
 
template<class Matrix1 , class Matrix2 >
void hermitian_transpose (const Matrix1 &M, Matrix2 &TM)
 Computes the hermitian transpose of a matrix $ \overline{M}^{T} $ which is the transpose of the conjugate. More...
 
template<class Matrix1 , class Matrix2 >
void transpose (const Matrix1 &M, const std::size_t nr1, const std::size_t nc1, Matrix2 &TM, const std::size_t nr2, const std::size_t nc2)
 Computes the transpose of a matrix $M^T$. More...
 
template<class Matrix1 , class Matrix2 >
void transpose (const Matrix1 &M, Matrix2 &TM)
 Computes the transpose of a matrix $M^T$. More...
 
template<class Matrix1 , class Matrix2 >
void conj (const Matrix1 &M, Matrix2 &CM)
 Computes the conjugate of a matrix $ CM = \overline{M} $. More...
 
template<class Matrix1 , class Matrix2 >
void real (const Matrix1 &C, Matrix2 &R)
 Extract the real Matrix of a complex Matrix. $ R_{ij} = \mathcal{R}(C_{ij}) $. More...
 
template<class Matrix1 , class Matrix2 >
void imag (const Matrix1 &C, Matrix2 &I)
 Extract the imaginary Matrix of a complex Matrix. $ I_{ij} = \mathcal{I}(C_{ij}) $. More...
 
template<typename VectorIterator1 , typename VectorIterator2 , typename MatrixIterator >
void outer_product (VectorIterator1 V_begin, VectorIterator1 V_end, VectorIterator2 W_begin, VectorIterator2 W_end, MatrixIterator R_up, MatrixIterator R_bot)
 Computes the hermitian outer product of the vector V and the transpose of the conjugate of the vector W:

\[ R = V \times W^{H} \]

. More...

 
template<class RandomAccessIterator1 , class RandomAccessIterator2 , class RandomAccessIterator2d >
void rank1_tensorial_product (RandomAccessIterator1 base1_first, RandomAccessIterator1 base1_end, RandomAccessIterator2 base2_first, RandomAccessIterator2 base2_end, RandomAccessIterator2d matrix_upper_left, RandomAccessIterator2d matrix_bottom_right)
 Computes the tensorial product of two rank one tensors $ R = V \times W^{T} $ it provides a rank2 tensor (Container2d) of size (MxN) if M and N are respectivly the size of V and W. More...
 
template<class RandomAccessIterator1 , class RandomAccessIterator2 , class RandomAccessIterator3 , class RandomAccessIterator3d >
void rank1_tensorial_product (RandomAccessIterator1 base1_first, RandomAccessIterator1 base1_end, RandomAccessIterator2 base2_first, RandomAccessIterator2 base2_end, RandomAccessIterator3 base3_first, RandomAccessIterator3 base3_end, RandomAccessIterator3d base_front_upper_left, RandomAccessIterator3d base_back_bottom_right)
 Computes the tensorial product of three rank one tensors it provides a rank3 tensor (Container3d) of size (PxMxN) if P, M and N are respectivly the size of V, W and X. More...
 
Inner-poduct algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
std::iterator_traits
< RandomAccessIterator1 >
::value_type 
hermitian_inner_product (RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, typename std::iterator_traits< RandomAccessIterator1 >::value_type init)
 Computes the hermitian inner-product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
std::iterator_traits
< RandomAccessIterator1 >
::value_type 
inner_product (RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, typename std::iterator_traits< RandomAccessIterator1 >::value_type init=typename std::iterator_traits< RandomAccessIterator1 >::value_type())
 Computes the inner_product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

. More...

 
template<typename Vector1 , typename Vector2 >
Vector1::value_type inner_product (const Vector1 &V1, const Vector2 &V2)
 Computes the inner_product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d , typename RandomAccessIterator2 >
std::iterator_traits
< RandomAccessIterator2 >
::value_type 
gen_inner_product (RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2d A_upper_left, RandomAccessIterator2d A_bottom_right, RandomAccessIterator2 first2, RandomAccessIterator2 last2, typename std::iterator_traits< RandomAccessIterator2 >::value_type init=typename std::iterator_traits< RandomAccessIterator2 >::value_type())
 Computes the generalized inner_product of two ranges:

\[ (x,y)_A = \overline{x}^T A y = x^H A y \]

. More...

 
template<typename Vector1 , typename Matrix , typename Vector2 >
Vector2::value_type gen_inner_product (const Vector1 &X, const Matrix &M, const Vector2 &Y)
 Computes the generalized inner_product of two ranges:

\[ (x,y)_A = \overline{x}^T A y = x^H A y \]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
std::iterator_traits
< RandomAccessIterator1 >
::value_type 
rayleigh (RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2d A_upper_left, RandomAccessIterator2d A_bottom_right)
 Computes the rayleigh coefficient of a vector x:

\[ r(x) = \frac{x^H A x}{x^Hx} \]

. More...

 
template<typename Vector , typename Matrix >
Vector::value_type rayleigh (const Vector &X, const Matrix &A)
 Computes the rayleigh coefficient o f a vector x:

\[ r(x) = \frac{x^H A x}{x^Hx} \]

. More...

 
Marix norms
template<typename InputIterator >
slip::lin_alg_traits< typename
std::iterator_traits
< InputIterator >::value_type >
::value_type 
L22_norm_cplx (InputIterator first, InputIterator last)
 Computes the L22 norm $ \sum_i \bar{z_i}z_i$ of a complex container. More...
 
template<typename RandomAccessIterator2d >
slip::lin_alg_traits< typename
std::iterator_traits
< RandomAccessIterator2d >
::value_type >::value_type 
row_norm (RandomAccessIterator2d upper_left, RandomAccessIterator2d bottom_right)
 Computes the row norm ( $\max_i\sum_j |a_{ij}|$) of a 2d range. More...
 
template<typename Container2d >
slip::lin_alg_traits< typename
Container2d::value_type >
::value_type 
row_norm (const Container2d &container)
 Computes the row norm ( $\max_i\sum_j |a_{ij}|$) of a Container2d. More...
 
template<typename RandomAccessIterator2d >
slip::lin_alg_traits< typename
std::iterator_traits
< RandomAccessIterator2d >
::value_type >::value_type 
col_norm (RandomAccessIterator2d upper_left, RandomAccessIterator2d bottom_right)
 Computes the column norm ( $\max_i\sum_j |a_{ij}|$) of a 2d range. More...
 
template<typename Container2d >
slip::lin_alg_traits< typename
Container2d::value_type >
::value_type 
col_norm (const Container2d &container)
 Computes the column norm ( $\max_i\sum_j |a_{ij}|$) of a Container2d. More...
 
template<typename RandomAccessIterator2d >
slip::lin_alg_traits< typename
std::iterator_traits
< RandomAccessIterator2d >
::value_type >::value_type 
frobenius_norm (RandomAccessIterator2d upper_left, RandomAccessIterator2d bottom_right)
 Computes the Frobenius norm ( $\sum_{i,j} \bar{a_{ij}}a_{i,j}$) of a 2d range. More...
 
template<typename Container2d >
slip::lin_alg_traits< typename
Container2d::value_type >
::value_type 
frobenius_norm (const Container2d &container)
 Computes the Frobenius norm ( $\sum_{i,j} \bar{a_{ij}}a_{i,j}$) of a Container2d. More...
 
Diagonal algorithms
template<typename Container2d , typename RandomAccessIterator1 >
void get_diagonal (const Container2d &container, RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, const int diag_number=0)
 Get the diagonal diag_number of a 2d container. More...
 
template<typename Container2d , typename RandomAccessIterator1 >
void set_diagonal (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, Container2d &container, const int diag_number=0)
 Set the diagonal [diag_first,diag_last) in the diagonal diag_number of a 2d container. More...
 
template<typename Container2d >
void fill_diagonal (Container2d &container, const typename Container2d::value_type &val, const int diag_number=0)
 Fill the diagonal diag_number of a 2d container with the value val. More...
 
template<typename MatrixIterator >
void fill_diagonal (MatrixIterator M_up, MatrixIterator M_bot, const typename MatrixIterator::value_type &val, const int diag_number=0)
 Fill the diagonal diag_number of a 2d range with the value val. More...
 
Matrix generators
template<typename Matrix >
Matrix identity (const std::size_t nr, const std::size_t nc)
 Returns an identity matrix which dimensions are nr*nc. More...
 
template<typename MatrixIterator >
void identity (MatrixIterator A_up, MatrixIterator A_bot)
 Set a 2d range to the identity matrix. More...
 
template<typename Matrix >
void identity (Matrix &A)
 Replaces A with the identity matrix. More...
 
template<typename Matrix >
void hilbert (Matrix &A)
 Replaces A with the Hilbert matrix:

\[h_{ij} = \frac{1}{i+j+1}\]

. More...

 
template<typename RandomAccessIterator , typename Matrix >
void toeplitz (RandomAccessIterator first, RandomAccessIterator last, Matrix &A)
 Constructs the Toeplitz matrix from given a range. More...
 
Matrix tests
template<typename Matrix >
bool is_squared (const Matrix &A)
 Test if a matrix is squared. More...
 
template<typename MatrixIterator1 >
bool is_squared (MatrixIterator1 A_up, MatrixIterator1 A_bot)
 Test if a matrix is squared. More...
 
template<typename Matrix >
bool is_identity (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is identity. More...
 
template<typename MatrixIterator1 >
bool is_diagonal (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is diagonal. More...
 
template<typename Matrix >
bool is_diagonal (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is diagonal. More...
 
template<typename MatrixIterator1 >
bool is_hermitian (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is hermitian. More...
 
template<typename Matrix >
bool is_hermitian (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is hermitian. More...
 
template<typename MatrixIterator1 >
bool is_skew_hermitian (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is skew hermitian. More...
 
template<typename Matrix >
bool is_skew_hermitian (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is skew hermitian. More...
 
template<typename MatrixIterator1 >
bool is_symmetric (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is symmetric. More...
 
template<typename Matrix >
bool is_symmetric (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is symmetric. More...
 
template<typename MatrixIterator1 >
bool is_band_matrix (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename MatrixIterator1::size_type lower_band_width, const typename MatrixIterator1::size_type upper_band_width, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is a band matrix. More...
 
template<typename Matrix >
bool is_band_matrix (const Matrix &A, const typename Matrix::size_type lower_band_width, const typename Matrix::size_type upper_band_width, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is symmetric. More...
 
template<typename MatrixIterator1 >
bool is_tridiagonal (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is tridiagonal. More...
 
template<typename Matrix >
bool is_tridiagonal (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is tridiagonal. More...
 
template<typename MatrixIterator1 >
bool is_upper_bidiagonal (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is upper_bidiagonal. More...
 
template<typename Matrix >
bool is_upper_bidiagonal (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is upper bidiagonal. More...
 
template<typename MatrixIterator1 >
bool is_lower_bidiagonal (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is lower_bidiagonal. More...
 
template<typename Matrix >
bool is_lower_bidiagonal (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is lower bidiagonal. More...
 
template<typename MatrixIterator1 >
bool is_upper_hessenberg (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is upper_hessenberg. More...
 
template<typename Matrix >
bool is_upper_hessenberg (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is upper hessenber. More...
 
template<typename MatrixIterator1 >
bool is_lower_hessenberg (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is lower_hessenberg. More...
 
template<typename Matrix >
bool is_lower_hessenberg (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is lower hessenber. More...
 
template<typename MatrixIterator1 >
bool is_upper_triangular (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is upper_triangular. More...
 
template<typename Matrix >
bool is_upper_triangular (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is upper triangular. More...
 
template<typename MatrixIterator1 >
bool is_lower_triangular (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix is lower_triangular. More...
 
template<typename Matrix >
bool is_lower_triangular (const Matrix &A, const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type tol=slip::epsilon< typename Matrix::value_type >())
 Test if a matrix is lower triangular. More...
 
template<typename MatrixIterator1 >
bool is_null_diagonal (MatrixIterator1 A_up, MatrixIterator1 A_bot, int diag_number, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Test if a matrix has a nul diagonal. More...
 
template<typename MatrixIterator1 >
slip::DENSE_MATRIX_TYPE analyse_matrix (MatrixIterator1 A_up, MatrixIterator1 A_bot, const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type tol=slip::epsilon< typename std::iterator_traits< MatrixIterator1 >::value_type >())
 Analyse the type of a matrix. More...
 
Pivot algorithms
template<typename MatrixIterator >
int pivot_max (MatrixIterator M_up, MatrixIterator M_bot)
 Returns the row position of the maximum partial pivot of a 2d range. More...
 
template<typename MatrixIterator >
int partial_pivot (MatrixIterator M_up, MatrixIterator M_bot)
 Returns the partial pivot of a 2d range. More...
 
General inverse algorithm
template<class Matrix1 , class Matrix2 >
void inverse (const Matrix1 &M, const std::size_t nr1, const std::size_t nc1, Matrix2 &IM, const std::size_t nr2, const std::size_t nc2)
 Computes the inverse of a matrix using gaussian elimination. More...
 
template<class Matrix1 , class Matrix2 >
void inverse (const Matrix1 &M, Matrix2 &IM)
 Computes the inverse of a matrix using gaussian elimination. More...
 
LU algorithms
template<class Matrix1 , class Matrix2 , class Vector >
int lu (const Matrix1 &M, Matrix2 &LU, Vector &Indx)
 Computes the LU decomposition according to rows permutations of a matrix using Crout method

\[ \left( \begin{array}{cccc} m_{1,1} & \cdots&\cdots&m_{1,n}\\ \vdots&&&\vdots\\ \vdots&&&\vdots\\ m_{n,1}&\cdots&\cdots&m_{n,n}\\ \end{array}\right) = \left( \begin{array}{cccc} 1&0&\cdots&0\\ l_{2,1}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ 0&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \]

LU is composed of L and U as following:

\[ LU = \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ l_{2,1}&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ l_{n,1}&\cdots&l_{n,n-1}&u_{n,n}\\ \end{array}\right) \]

Indx is a vector that records the row permutations effected by the partial pivoting. More...

 
template<class Matrix1 , class Matrix2 >
int lu (const Matrix1 &M, Matrix2 &L, Matrix2 &U, Matrix2 &P)
 
template<class Matrix , class Vector1 , class Vector2 , class Vector3 >
void lu_solve (const Matrix LU, const std::size_t nr, const std::size_t nc, const Vector1 &Indx, const std::size_t nv1, const Vector2 &B, const std::size_t nv2, Vector3 &X, const std::size_t nv3)
 Solve Linear Equation using LU decomposition. More...
 
template<class Matrix , class Vector1 , class Vector2 >
void lu_solve (const Matrix &A, Vector1 &X, const Vector2 &B)
 Solve Linear Equation AX = B using LU decomposition. More...
 
template<class Matrix1 , class Matrix2 >
void lu_inv (const Matrix1 &M, Matrix2 &IM)
 Computes the inverse of a matrix using LU decomposition. More...
 
template<class Matrix1 >
Matrix1::value_type lu_det (const Matrix1 &M)
 Computes the determinant of a matrix using LU decomposition. More...
 
Triangular matrix algorithms
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void upper_triangular_solve (MatrixIterator U_up, MatrixIterator U_bot, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision)
 Solve the linear system U*X=B when U is upper triangular

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void upper_triangular_solve (const Matrix &U, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Matrix::value_type >::value_type precision)
 Solve the linear system U*X=B when U is upper triangular

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator1 , typename MatrixIterator2 >
void upper_triangular_inv (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Ainv_up, MatrixIterator2 Ainv_bot, typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type precision=typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type(1.0E-6))
 Invert an upper triangular Matrix

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename Matrix1 , typename Matrix2 >
void upper_triangular_inv (Matrix1 A, Matrix2 Ainv, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type(1.0E-6))
 Invert an upper triangular Matrix

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void lower_triangular_solve (MatrixIterator L_up, MatrixIterator L_bot, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision)
 Solve the linear system L*X=B when L is lower triangular

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void lower_triangular_solve (const Matrix &L, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Matrix::value_type >::value_type precision)
 Solve the linear system L*X=B when L is lower triangular

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator1 , typename MatrixIterator2 >
void lower_triangular_inv (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Ainv_up, MatrixIterator2 Ainv_bot, typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type precision=typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type(1.0E-6))
 Invert a lower triangular Matrix

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename Matrix1 , typename Matrix2 >
void lower_triangular_inv (const Matrix1 &A, Matrix2 &Ainv, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type(1.0E-6))
 Invert a lower triangular Matrix

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unit_upper_triangular_solve (MatrixIterator U_up, MatrixIterator U_bot, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last)
 Solve the linear system U*X=B when U is unit upper triangular

\[ \left( \begin{array}{cccc} 1 & u_{1,2}&\cdots&u_{1,n}\\ 0 & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void unit_upper_triangular_solve (const Matrix &U, Vector1 &X, const Vector2 &B)
 Solve the linear system U*X=B when U is unit upper triangular

\[ \left( \begin{array}{cccc} 1 & u_{1,2}&\cdots&u_{1,n}\\ 0 & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unit_lower_triangular_solve (MatrixIterator L_up, MatrixIterator L_bot, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last)
 Solve the linear system L*X=B when L is unit lower triangular

\[ \left( \begin{array}{cccc} 1 & 0&\cdots&0\\ l_{2,1} & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<class Matrix , class Vector1 , class Vector2 >
void unit_lower_triangular_solve (const Matrix &L, Vector1 &X, const Vector2 &B)
 Solve the linear system L*X=B when L is unit lower triangular

\[ \left( \begin{array}{cccc} 1 & 0&\cdots&0\\ l_{2,1} & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
Diagonal matrix algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void diagonal_solve (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision)
 Solve the linear system D*X=B when D a diagonal matrix

\[ \left( \begin{array}{cccc} d_{1,1} & 0&\cdots&0\\ 0 & d_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&d_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
Band matrix algorithms
template<typename MatrixIterator1 , typename RandomAccessIterator >
int band_lu (MatrixIterator1 A_up, MatrixIterator1 A_bot, const int p, const int q, RandomAccessIterator Ind_first, RandomAccessIterator Ind_last, typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type precision)
 in place Band LU decomposition a square band Matrix A $ A = LU$ with L a p lower band matrix and U a q upper band matrix More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 , class Matrix4 >
int band_lu (const Matrix1 &M, const int p, const int q, Matrix2 &L, Matrix3 &U, Matrix4 &P, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision)
 in place Band LU decomposition a square band Matrix A $ A = PLU$ with L a p lower band matrix and U a q upper band matrix and P the permutation matrix. More...
 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void upper_band_solve (MatrixIterator U_up, MatrixIterator U_bot, int q, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision)
 Solve the linear system U*X=B when U is q width upper banded

\[ \left( \begin{array}{cccccc} u_{1,1} & \cdots&u_{1,q+1}&0&\cdots&0\\ 0 & u_{2,2} &\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\ddots&u_{n-q,n}\\ \vdots&&&\ddots&\ddots&\vdots\\ 0&\cdots&\cdots&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unit_upper_band_solve (MatrixIterator U_up, MatrixIterator U_bot, int q, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision)
 Solve the linear system U*X=B when U is unit q width upper banded

\[ \left( \begin{array}{cccccc} 1 & \cdots&u_{1,q+1}&0&\cdots&0\\ 0 & 1 &\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\ddots&u_{n-q,n}\\ \vdots&&&\ddots&\ddots&\vdots\\ 0&\cdots&\cdots&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void lower_band_solve (MatrixIterator L_up, MatrixIterator L_bot, int p, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision)
 Solve the linear system L*X=B when L is p lower banded

\[ \left( \begin{array}{ccccccc} l_{1,1} & 0&\cdots&\cdots&\cdots&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&&&&\vdots\\ \vdots&&\ddots&\ddots&&&\vdots\\ l_{p+1,1}&&&\ddots&\ddots&&\vdots\\ 0&\ddots&&&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&&&l_{n-1,n-1}&0\\ 0&\cdots&0&l_{n,n-q}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void unit_lower_band_solve (MatrixIterator L_up, MatrixIterator L_bot, int p, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last)
 Solve the linear system L*X=B when L is unit p lower banded

\[ \left( \begin{array}{ccccccc} 1 & 0&\cdots&\cdots&\cdots&\cdots&0\\ l_{2,1} & 1 & \ddots&&&&\vdots\\ \vdots&\ddots&\ddots&\ddots&&&\vdots\\ l_{p+1,1}&&\ddots&\ddots&\ddots&&\vdots\\ 0&\ddots&&\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&&\ddots&1&0\\ 0&\cdots&0&l_{n,n-q}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
Gauss system solve algorithms
template<class Matrix , class Vector1 , class Vector2 >
bool gauss_solve (const Matrix &M, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Matrix::value_type >::value_type precision)
 Solve the linear system M*X=B using the Gauss elemination partial pivoting. More...
 
template<class Matrix , class Vector1 , class Vector2 >
bool gauss_solve_with_filling (const Matrix &M, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Matrix::value_type >::value_type precision)
 Solve the linear system M*X=B with the Gauss pivot method, the null pivot are replaced by precision. More...
 
Tridiagonal matrix algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void tridiagonal_lu (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2 L_low_first, RandomAccessIterator2 L_low_last, RandomAccessIterator3 U_up_first, RandomAccessIterator3 U_up_last, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 Computes the LU decomposition for a tridiagonal matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) = \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ ll_1 & 1 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&1\\ \end{array}\right) \left( \begin{array}{ccccc} du_{1} & uu_{1}&0&\cdots&0\\ 0 & du_{2} & uu_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&du_{n}\\ \end{array}\right) \]

. More...

 
Bidiagonal matrix algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void unit_lower_bidiagonal_solve (RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last)
 solve Ax = B with A unit lower bidiagonal

\[ \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ ll_1 & 1 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void unit_lower_bidiagonal_inv (RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot)
 Invert a lower unit bidiagonal matrix:

\[ \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ l_{1} & 1 & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&1\\ \end{array}\right)^{-1} \]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void lower_bidiagonal_solve (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 solve Ax = B with A lower bidiagonal

\[ \left( \begin{array}{ccccc} dl_1 & 0&\cdots&\cdots&0\\ ll_1 & dl_2 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&dl_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void lower_bidiagonal_inv (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 Invert a lower bidiagonal matrix:

\[ \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ l_{1} & d_{2} & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename Container2d1 , typename Container2d2 >
void lower_bidiagonal_inv (const Container2d1 &A, Container2d2 &Ainv, typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type(1.0E-6))
 Invert a lower bidiagonal matrix:

\[ \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ l_{1} & d_{2} & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void upper_bidiagonal_solve (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 solve Ax = B with A upper bidiagonal

\[ \left( \begin{array}{ccccc} du_1 & uu_1&0&\cdots&0\\ 0 & \ddots & \ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&du_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void upper_bidiagonal_inv (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 Invert an upper bidiagonal squared matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ 0 & d_{2} & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename Container2d1 , typename Container2d2 >
void upper_bidiagonal_inv (const Container2d1 &A, Container2d2 &Ainv, typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type(1.0E-6))
 Invert an upper bidiagonal squared matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ 0 & d_{2} & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void unit_upper_bidiagonal_solve (RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last)
 solve Ax = B with A unit upper bidiagonal

\[ \left( \begin{array}{ccccc} 1 & uu_1&0&\cdots&0\\ 0 & \ddots & \ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void unit_upper_bidiagonal_inv (RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot)
 Invert an unit upper bidiagonal matrix:

\[ \left( \begin{array}{ccccc} 1 & u_{1}&0&\cdots&0\\ 0 & 1 & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&1\\ \end{array}\right)^{-1} \]

. More...

 
Tridiagonal system solve algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void thomas_solve (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 Solve the tridiagonal system A*X=B with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename Container2d , typename Vector1 , typename Vector2 >
void thomas_solve (const Container2d &A, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Container2d::value_type >::value_type precision=typename slip::lin_alg_traits< typename Container2d::value_type >::value_type(1.0E-6))
 Solve the tridiagonal system Tx=B

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void thomas_inv (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator1 low_diag_first, RandomAccessIterator1 low_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot, typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type precision=typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type(1.0E-6))
 Invert a tridiagonal squared matrix A with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
template<typename Container2d1 , typename Container2d2 >
void thomas_inv (const Container2d1 &A, Container2d2 &Ainv, typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type(1.0E-6))
 Invert a tridiagonal squared matrix A with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

. More...

 
Tridiagonal symmetric positive matrix algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void tridiagonal_cholesky (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2 R_diag_first, RandomAccessIterator2 R_diag_last, RandomAccessIterator3 R_low_first, RandomAccessIterator3 R_low_last)
 Tridiagonal symmetric positive decomposition

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) = \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ r_1 & d_{2} & \ddots&&\vdots\\ 0&r_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&r_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{ccccc} d_{1} & \bar{r}_{1}&0&\cdots&0\\ 0 & d_{2} & \bar{r}_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\bar{r}_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void tridiagonal_cholesky_solve (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2 X_first, RandomAccessIterator2 X_last, RandomAccessIterator3 B_first, RandomAccessIterator3 B_last)
 Solve the tridiagonal symmetric positive definite system T*X=B with the Cholesky method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$. More...

 
template<typename Container2d , typename Vector1 , typename Vector2 >
void tridiagonal_cholesky_solve (const Container2d &A, Vector1 &X, const Vector2 &B)
 Solve the tridiagonal symmetric positive definite system T*X=B with the Cholesky method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$. More...

 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void tridiagonal_cholesky_inv (RandomAccessIterator1 diag_first, RandomAccessIterator1 diag_last, RandomAccessIterator1 up_diag_first, RandomAccessIterator1 up_diag_last, RandomAccessIterator2d Ainv_up, RandomAccessIterator2d Ainv_bot)
 Invert the tridiagonal symmetric positive definite system T:

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$. More...

 
template<typename Container2d1 , typename Container2d2 >
void tridiagonal_cholesky_inv (const Container2d1 &A, Container2d2 &Ainv)
 Invert the tridiagonal symmetric positive definite system T:

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$. More...

 
LDLT algorithms
template<typename Container2d >
void LDLT_decomposition (Container2d &A)
 in place LU decomposition for symmetric matrix

\[A = LDL^T\]

More...
 
template<typename Matrix1 , typename Matrix2 , typename Vector1 , typename Matrix3 >
void LDLT_decomposition (const Matrix1 &A, Matrix2 &L, Vector1 &D, Matrix3 &LT)
 in place LU decomposition for symmetric matrix

\[A = LDL^T\]

More...
 
template<typename Matrix1 , typename Vector1 , typename Vector2 >
void LDLT_solve (const Matrix1 &A, Vector1 &X, const Vector2 &B)
 LDLT solve of system AX = B with A a square symmetric Matrix. $ A = LDL^T$ with L a lower triangular matrix. More...
 
Square hermitian or symmetric matrix algorithms
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void cholesky_cplx (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 L_up, MatrixIterator2 L_bot, MatrixIterator3 LH_up, MatrixIterator3 LH_bot)
 cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix More...
 
template<typename MatrixIterator1 >
void cholesky_cplx (MatrixIterator1 A_up, MatrixIterator1 A_bot)
 cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^H$ is stored in the upper triangular part of A. More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void cholesky_real (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 L_up, MatrixIterator2 L_bot, MatrixIterator3 LH_up, MatrixIterator3 LH_bot)
 cholesky decomposition of a square real symmetric and positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix. More...
 
template<typename MatrixIterator1 >
void cholesky_real (MatrixIterator1 A_up, MatrixIterator1 A_bot)
 cholesky decomposition of a square real symmetric and positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^T$ is stored in the upper triangular part of A. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void cholesky_real (const Matrix1 &A, Matrix2 &L, Matrix3 &LT)
 cholesky decomposition of a square real symmetric positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void cholesky_cplx (const Matrix1 &A, Matrix2 &L, Matrix3 &LT)
 cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 >
void cholesky (const Matrix1 &A, Matrix2 &L, Matrix3 &LT)
 cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix More...
 
template<class Matrix1 >
void cholesky (Matrix1 &A)
 cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^H$ is stored in the upper triangular part of A. More...
 
template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void cholesky_solve (MatrixIterator A_up, MatrixIterator A_bot, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type precision=typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type(1.0E-6))
 cholesky solve of system AX = B with A a square hermitian positive definite Matrix. More...
 
template<class Matrix1 , class Vector1 , class Vector2 >
void cholesky_solve (const Matrix1 &A, Vector1 &X, const Vector2 &B, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type(1.0E-6))
 cholesky solve of system AX = B with A a square hermitian positive definite Matrix. More...
 
template<typename MatrixIterator1 , typename MatrixIterator2 >
void cholesky_inv (MatrixIterator1 A_up, MatrixIterator1 A_bot, MatrixIterator2 Ainv_up, MatrixIterator2 Ainv_bot, typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type precision=typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type(1.0E-6))
 cholesky inverse of a square hermitian positive definite Matrix A. More...
 
template<typename Matrix1 , typename Matrix2 >
void cholesky_inv (Matrix1 A, Matrix2 Ainv, typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type precision=typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type(1.0E-6))
 cholesky inverse of a square hermitian positive definite Matrix A. More...
 
Givens rotations algorithms
template<typename Real >
void rotgen (Real &a, Real &b, Real &cos, Real &sin)
 Computes the Givens sinus and cosinus. More...
 
template<typename Real >
void givens_sin_cos (const Real &xi, const Real &xk, Real &sin, Real &cos)
 Computes the Givens sinus and cosinus.

\[ R = \left( \begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta\\ \end{array}\right) \]

\[ \cos \theta = \frac{xi}{\sqrt{xi^2+xk^2}} \]

\[ \sin \theta = \frac{-xk}{\sqrt{xi^2+xk^2}} \]

. More...

 
template<typename Complex >
void complex_givens_sin_cos (const Complex &xi, const Complex &xk, Complex &sin, typename Complex::value_type &cos)
 Computes the complex Givens sinus and cosinus.

\[ R = \left( \begin{array}{cc} \cos \theta & -\overline{\sin \theta} \\ \sin \theta & \cos \theta\\ \end{array}\right) \]

\[ \cos \theta = \frac{|xi|}{\epsilon\sqrt{xi\overline{xi}+xk\overline{xk}}} \]

\[ \sin \theta = \frac{-xk}{\epsilon sign(xi)\sqrt{xi\overline{xi}+xk\overline{xk}}} \]

with

\[ \epsilon = sign{\mathcal{R}(xi)} \]

. More...

 
template<typename Matrix , typename SizeType , typename Real >
void left_givens (Matrix &M, const SizeType &row1, const SizeType &row2, const Real &sinus, const Real &cosinus, const SizeType &col1, const SizeType &col2)
 Apply left Givens rotation multiplication. More...
 
template<typename Matrix , typename SizeType , typename Real >
void right_givens (Matrix &M, const SizeType &col1, const SizeType &col2, const Real &sinus, const Real &cosinus, const SizeType &row1, const SizeType &row2)
 Apply right Givens rotation multiplication. More...
 
template<typename Matrix , typename SizeType , typename Complex >
void complex_left_givens (Matrix &M, const SizeType &row1, const SizeType &row2, const Complex &sinus, const typename Complex::value_type &cosinus, const SizeType &col1, const SizeType &col2)
 Apply complex left Givens rotation multiplication. More...
 
template<typename Matrix , typename SizeType , typename Complex >
void complex_right_givens (Matrix &M, const SizeType &col1, const SizeType &col2, const Complex &sinus, const typename Complex::value_type &cosinus, const SizeType &row1, const SizeType &row2)
 Apply complex right Givens rotation multiplication. More...
 
Householder algorithms
template<typename VectorIterator1 , typename VectorIterator2 >
void housegen (VectorIterator1 a_begin, VectorIterator1 a_end, VectorIterator2 u_begin, VectorIterator2 u_end, typename std::iterator_traits< VectorIterator1 >::value_type &nu)
 Compute the Householder vector u of a vector a. More...
 
template<typename RandomAccessIterator , typename MatrixIterator1 >
void right_householder_update (RandomAccessIterator V_first, RandomAccessIterator V_last, MatrixIterator1 M_up, MatrixIterator1 M_bot)
 right multiplies the matrix M with the Householder matrix P:

\[ M = M(I - vv^H) \]

More...
 
template<typename RandomAccessIterator , typename MatrixIterator1 >
void left_householder_update (RandomAccessIterator V_first, RandomAccessIterator V_last, MatrixIterator1 M_up, MatrixIterator1 M_bot)
 Left multiplies the Householder matrix P with the matrix M:

\[ M = (I - vv^H)M \]

. More...

 
template<typename Matrix1 , typename Vector1 , typename Matrix2 >
void left_householder_accumulate (const Matrix1 &M, const Vector1 &V0, Matrix2 &Q)
 Computes Q = Q1Q2...Qn from the inplace Householder QR decomposition. More...
 
Hessenberg reduction
template<typename Matrix1 >
void householder_hessenberg (Matrix1 &M)
 Householder Hessenberg reduction of the square matrix M. The result is overwritten in M. The Hessenberg decomposition is $Q * H * Q^H = M$. More...
 
template<typename Matrix1 , typename Matrix2 >
void householder_hessenberg (const Matrix1 &M, Matrix2 &H)
 Householder Hessenberg reduction of the square matrix M. The Hessenberg decomposition is $Q * H * Q^H = M$. More...
 
template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void householder_hessenberg (const Matrix1 &M, Matrix2 &H, Matrix3 &Q)
 Householder Hessenberg reduction of the square matrix M. The Hessenberg decomposition is $Q * H * Q^H = M$. More...
 
SVD internal algorithms
template<typename Matrix1 , typename Vector , typename Matrix2 , typename Matrix3 >
void BiReduce (Matrix1 &X, Vector &d, Vector &e, Matrix2 &U, Matrix3 &V)
 BiReduce. Given an n*p matrix X with n>=p Bireduce reduce X to an upper bidiagola form The tranformations from the left are accumulmated in the n*p matrix U and the transformations from the right in the matrix V. on return X contains the genrators of the householder transformation used in the reduction X=U[d,e]V. More...
 
template<typename Matrix , typename Vector >
void Bi_complex_to_real (Vector &d, Vector &e, Matrix &U, Matrix &V)
 BiQR Given an upper bidiagonal matrix B, Bi_complex_to_real transforms the complex bidiagonal form into a real form. The tranformations from the left are accumulmated in the matrix U and the transformations from the right in the matrix V. More...
 
template<typename Matrix , typename Vector , typename Real , typename SizeType >
void BiQR (Vector &d, Vector &e, Real &sigma, const SizeType &row1, const SizeType &row2, Matrix &U, Matrix &V)
 BiQR Given an upper bidiagonal matrix B and a shift sigma, BiQR performs a QR step between rows row1 ans row2. The tranformations from the left are accumulmated in the matrix U and the transformations from the right in the matrix V. More...
 
template<typename Real >
void shift (Real &p, Real &r, Real &q, Real &sigma)
 Given a matrix

\[ M = \left( \begin{array}{cc} p&r\\ 0&q\\ \end{array} \right) \]

compute the smallest singular value of this matrix. More...

 
template<typename Vector , typename SizeType >
void BdBacksearch (Vector &d, Vector &e, const typename slip::lin_alg_traits< typename Vector::value_type >::value_type tol, SizeType &l, SizeType &i1, SizeType &i2)
 Back searching a bidiagonal Matrix this algorithm takes a bidiagobal matrix B, a tolerance tol and an index l(0<=l<=p-1) and determines indices i1,i2<=l such one of the following condictions holds 1) 0<=i1<i2<=l, in which case the matrix deflates as rows i1 and i2. 2) 0=i1=i2, in which case all the superdiagonal elements of B in rows 0 through l-1 are zero. More...
 
SVD Decomposition algorithms
template<typename Matrix1 , typename Matrix2 , typename RandomAccessIterator , typename Matrix3 >
void svd (const Matrix1 &M, Matrix2 &U, RandomAccessIterator S_first, RandomAccessIterator S_last, Matrix3 &V, const int max_it=75)
 (thin) Singular Value Decomposition Given a matrix M, this function computes its singular value decomposition, Any n*p matrix M whose number of rows n is greater than or equal to its number of columns p, can be written as the product of an n*p column-orthogonal matrix Up, an p*p diagonal matrix S with positive or zero elements (the singular values), and the hermitian transpose of an p*p orthogonal matrix V

\[ M = \left( \begin{array}{ccc} u_{1,1}&\cdots&u_{1,p}\\ \vdots&&\vdots\\ u_{n,1}&\cdots&u_{n,p}\\ \end{array} \right) \left( \begin{array}{cccc} s_{1,1}&0&\cdots&0\\ 0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&s_{p,p}\\ \end{array} \right) \left( \begin{array}{ccc} v_{1,1}&\cdots&v_{1,p}\\ \vdots&&\vdots\\ v_{p,1}&\cdots&v_{p,p}\\ \end{array} \right)^H \]

More...
 
template<typename Matrix , typename Matrix2 >
void svd (const Matrix &X, Matrix &U, Matrix2 &S, Matrix &V, const int max_it=75)
 (thin) Singular Value Decomposition Given a matrix M, this function computes its singular value decomposition, Any n*p matrix M whose number of rows n is greater than or equal to its number of columns p, can be written as the product of an n*p column-orthogonal matrix Up, an p*p diagonal matrix S with positive or zero elements (the singular values), and the transpose of an p*p orthogonal matrix V

\[ M = \left( \begin{array}{ccc} u_{1,1}&\cdots&u_{1,p}\\ \vdots&&\vdots\\ u_{n,1}&\cdots&u_{n,p}\\ \end{array} \right) \left( \begin{array}{cccc} s_{1,1}&0&\cdots&0\\ 0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&s_{p,p}\\ \end{array} \right) \left( \begin{array}{ccc} v_{1,1}&\cdots&v_{1,p}\\ \vdots&&\vdots\\ v_{p,1}&\cdots&v_{p,p}\\ \end{array} \right)^H \]

More...
 
SVD approximation algorithms
template<typename Matrix1 , typename RandomAccessIterator , typename Matrix2 , typename Matrix3 >
void svd_approx (const Matrix1 &U, RandomAccessIterator S_first, RandomAccessIterator S_last, const Matrix2 &V, const std::size_t K, Matrix3 &X)
 Singular Value Approximation of a matrix from its Singular Value Decomposition given by U, W and V: $ X_K = \sum_k^K w_k U_kV_k^H $. More...
 
template<class Matrix1 , class Matrix2 , class Matrix3 , class Matrix4 >
void svd_approx (const Matrix1 &U, const Matrix2 &W, const Matrix3 &V, const std::size_t K, Matrix4 &M)
 Singular Value Approximation of a matrix from its Singular Value Decomposition given by U, W and V: $ M_K = \sum_k^K w_k U_kV_k^H $. More...
 
SVD system solve algorithms
template<class Matrix1 , typename RandomAccessIterator1 , class Matrix2 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void svd_solve (const Matrix1 &U, RandomAccessIterator1 W_first, RandomAccessIterator1 W_last, const Matrix2 &V, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last, RandomAccessIterator3 X_first, RandomAccessIterator3 X_last)
 Solve Linear (USV^H).X = B where U, S and V are provided by a svd decomposition. More...
 
template<class Matrix1 , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void svd_solve (const Matrix1 &A, RandomAccessIterator1 X_first, RandomAccessIterator1 X_last, RandomAccessIterator2 B_first, RandomAccessIterator2 B_last)
 Solve Linear Equation A.X = B using SVD decomposition. More...
 
template<class Matrix1 , class Vector1 , class Vector2 >
void svd_solve (const Matrix1 &A, Vector1 &X, const Vector2 &B)
 Solve Linear Equation A.X = B using SVD decomposition. More...
 
SVD inverse algorithms
template<class Matrix1 , typename RandomAccessIterator1 , class Matrix2 , class Matrix3 >
void svd_inv (const Matrix1 &U, RandomAccessIterator1 W_first, RandomAccessIterator1 W_last, const Matrix2 &V, Matrix3 &Ainv)
 Singular Value inverse of a matrix from its Singular Value Decomposition given by U, W and V. More...
 
template<class Matrix1 , class Matrix2 >
void svd_inv (const Matrix1 &A, Matrix2 &Ainv)
 Singular Value inverse of a matrix. More...
 
template<class Matrix1 , class Matrix2 >
void pinv (const Matrix1 &A, Matrix2 &Ainv)
 Pseudo inverse of a matrix. More...
 
1d linear least square algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 , typename RandomAccessIterator4 >
double svd_least_square (RandomAccessIterator1 x_first, RandomAccessIterator1 x_last, RandomAccessIterator2 y_first, RandomAccessIterator3 s_first, RandomAccessIterator4 p_first, RandomAccessIterator4 p_last, slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &basis_fun)
 Linear Least Square fitting using SVD. More...
 
template<typename Vector1 , typename Vector2 , typename Vector3 , typename Vector4 >
double svd_least_square (Vector1 &X, Vector2 &Y, Vector3 &S, Vector4 &P, slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &basis_fun)
 Linear Least Square fitting using SVD. More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
double svd_least_square (RandomAccessIterator1 x_first, RandomAccessIterator1 x_last, RandomAccessIterator2 y_first, RandomAccessIterator3 p_first, RandomAccessIterator3 p_last, slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &basis_fun)
 Linear Least Square fitting using SVD. More...
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
double svd_least_square (Vector1 &X, Vector2 &Y, Vector3 &P, slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &basis_fun)
 Linear Least Square fitting using SVD. More...
 
Multidimensional linear least square algorithms
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 , typename RandomAccessIterator4 >
double svd_least_square_nd (RandomAccessIterator1 x_first, RandomAccessIterator1 x_last, RandomAccessIterator2 y_first, RandomAccessIterator3 s_first, RandomAccessIterator4 p_first, RandomAccessIterator4 p_last, const std::size_t order, slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &basis_fun)
 nd Linear Least Square fitting using SVD. More...
 
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
double svd_least_square_nd (RandomAccessIterator1 x_first, RandomAccessIterator1 x_last, RandomAccessIterator2 y_first, RandomAccessIterator3 p_first, RandomAccessIterator3 p_last, const std::size_t order, slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &basis_fun)
 nd Linear Least Square fitting using SVD. More...
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
double svd_least_square_nd (Vector1 &X, Vector2 &Y, Vector3 &P, const std::size_t order, slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &basis_fun)
 nd Linear Least Square fitting using SVD. More...
 
Gaussian noise algorithms
template<typename InputIterator , typename OutputIterator , typename Real >
void add_gaussian_noise (InputIterator first, InputIterator last, OutputIterator result, const Real mean=Real(0.0), const Real var=Real(0.01))
 Add a gaussian noise to a container. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void add_gaussian_noise_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, const Real mean=Real(0.0), const Real var=Real(0.01), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Add a gaussian noise to a container according to a mask sequence. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void add_gaussian_noise_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const Real mean=Real(0.0), const Real var=Real(0.01))
 Add a gaussian noise to a container according to a predicate. More...
 
Speckle noise algorithms
template<typename InputIterator , typename OutputIterator , typename Real >
void add_speckle_noise (InputIterator first, InputIterator last, OutputIterator result, const Real var=0.04)
 Add a speckle noise to a container. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void add_speckle_noise_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, const Real var=0.04, typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Add a speckle noise to a container according to a mask sequence. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void add_speckle_noise_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const Real var=0.04)
 Add a speckle noise to a container according to a predicate. More...
 
Uniform noise algorithms
template<typename InputIterator , typename OutputIterator , typename Real >
void add_uniform_noise (InputIterator first, InputIterator last, OutputIterator result, const Real min=Real(0.0), const Real max=Real(1.0))
 Add a uniform noise to a container. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void add_uniform_noise_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, const Real min=Real(0.0), const Real max=Real(1.0), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Add a uniform noise to a container according to mask sequence. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void add_uniform_noise_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const Real min=Real(0.0), const Real max=Real(1.0))
 Add a uniform noise to a container according to a predicate. More...
 
Salt and pepper noise algorithms
template<typename InputIterator , typename OutputIterator , typename Real >
void add_salt_and_pepper_noise (InputIterator first, InputIterator last, OutputIterator result, const Real density=Real(0.05), const typename std::iterator_traits< OutputIterator >::value_type salt_value=typename std::iterator_traits< OutputIterator >::value_type(1.0), const typename std::iterator_traits< OutputIterator >::value_type pepper_value=typename std::iterator_traits< OutputIterator >::value_type(0.0))
 Add a salt and pepper noise to a container. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void add_salt_and_pepper_noise_mask (InputIterator first, InputIterator last, MaskIterator mask_first, OutputIterator result, const Real density=Real(0.05), const Real salt_value=Real(1.0), const Real pepper_value=Real(0.0), typename std::iterator_traits< MaskIterator >::value_type value=typename std::iterator_traits< MaskIterator >::value_type(1))
 Add a salt and pepper noise to a container according to a mask sequence. More...
 
template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void add_salt_and_pepper_noise_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const Real density=Real(0.05), const Real salt_value=Real(1.0), const Real pepper_value=Real(0.0))
 Add a salt and pepper noise to a container according to a predicate. More...
 
Legendre polynomial algorithms
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly legendre_nd_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Legendre multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Legendre Polynomials of both the first and second kinds:

\[ \frac{(2k+1)xPk(x)-kP_{k-1}}{k+1}\]

. More...

 
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly legendre_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Legendre polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Legendre Polynomials of both the first and second kinds:

\[ \frac{(2k+1)xPk(x)-kP_{k-1}}{k+1}\]

. More...

 
Chebyshev polynomial algorithms
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly chebyshev_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Chebyshev polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Chebyshev Polynomials of both the first and second kinds:

\[ P_{k+1}(x) = 2xP_k(x)-P_{k-1}(x)\]

. More...

 
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly chebyshev_nd_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Chebyshev multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Chebychev Polynomials of both the first and second kinds:

\[ 2xPk(x)-P_{k-1}\]

. More...

 
template<typename T , typename RandomAccessIterator >
void eval_chebyshevII_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the ChebyshevII scheme. The order of the resulting values is the following (1,2x,4x^2-1,8x^3-4x,...). More...
 
template<typename T , typename RandomAccessIterator >
void eval_discrete_chebyshev_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the Discrete Chebyshev scheme. The order of the resulting values is the following (1,2x-N+1,...). More...
 
Hermite polynomial algorithms
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly hermite_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Hermite polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Hermite Polynomials:

\[ P_{k+1}(x) = 2xP_k(x)-2kP_{k-1}(x)\]

. More...

 
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly hermite_nd_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Hermite multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Hermite Polynomials:

\[ P_{k+1}(x) = 2xP_k(x)-2kP_{k-1}(x)\]

. More...

 
template<typename T , typename RandomAccessIterator >
void eval_hermite_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the Hermite scheme. The order of the resulting values is the following (1,2x,4x^2-2,8x^3-12x,...). More...
 
Laguerre polynomial algorithms
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly laguerre_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Laguerre polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Laguerre Polynomials:

\[ P_{k+1}(x) = \frac{(2k+1 - x)P_k(x)-kP_{k-1}(x)}{k+1}\]

. More...

 
template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly laguerre_nd_next (std::size_t k, Poly1 x, Poly2 Pk, Poly3 Pkm1)
 Implements the three term recurrence relation for the Laguerre multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Laguere Polynomials:

\[ P_{k+1}(x) = \frac{(2k+1 - x)P_k(x)-kP_{k-1}(x)}{k+1}\]

. More...

 
template<typename T , typename RandomAccessIterator >
void eval_laguerre_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the Laguerre scheme. The order of the resulting values is the following (1,-x+1,0.5x^2-2x+1,-(1/6)x^3-(3/2)x^2-3x+1,...). More...
 
Polynome evaluation algorithms
template<typename T , typename RandomAccessIterator >
eval_horner (RandomAccessIterator first, RandomAccessIterator last, const T &x)
 Returns the evaluation of the polynomial given throw the range [first,last) at x using the horner scheme. The coefficients of the polynomial a0 + a1x + a2x^2 +... anx^n are supposed ordered as follows : (a0,a1,...,an). More...
 
template<typename T , typename RandomAccessIterator >
void eval_power_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluation of the power of x until order n to the range [first,last) using the horner scheme. More...
 
template<typename T , typename RandomAccessIterator >
void eval_legendre_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the legendre scheme. More...
 
template<typename T , typename RandomAccessIterator >
void eval_chebyshev_basis (const T &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluations of x until order n to the range [first,last) using the Chebyshev scheme. More...
 
template<class Vector , typename RandomAccessIterator >
void eval_power_2d_basis (const Vector &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluation of the powers of X = (x1,x2) such that $i_1 + i_2 \le n$ with $i_1$ and $i_2$ the power of x1 and x2. the range [first,last) using the horner scheme. More...
 
template<class Vector , typename RandomAccessIterator >
void eval_power_nd_basis (const Vector &x, const std::size_t order, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluation of the powers of $X = (x_1,...,x_{dim})$ such that $ sum_{k=1}^{dim} i_k \le order$ with $i_k$ the power of the xk to the range [first,last) using the horner scheme. More...
 
template<typename MultivariatePolynomial , typename RandomAccessIterator >
void eval_multi_poly_power_basis (const MultivariatePolynomial &x, const std::size_t n, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluation of the power of a slip::MultivariatePolynomial<T,DIM> P until order n to the range [first,last) using the horner scheme. More...
 
template<class Vector , typename RandomAccessIterator >
void eval_multi_poly_power_nd_basis (const Vector &x, const std::size_t order, RandomAccessIterator first, RandomAccessIterator last)
 Returns the evaluation of the powers of slip::MultivariatePolynomial<T,DIM> $Q = (P_1,...,P_{dim})$ such that $ sum_{k=1}^{dim} i_k \le order$ with $i_k$ the power of the qk to the range [first,last) using the horner scheme. More...
 
recursive statistics algorithms
template<typename DataT , typename MeanT >
MeanT mean_next (const int n, const MeanT &prev_mean, const DataT &xnp1)
 Recursive mean algorithm. More...
 
template<typename DataT , typename VarT >
void var_next (const int n, const VarT &prev_mean, const VarT &prev_var, const DataT &xnp1, VarT &next_mean, VarT &next_var)
 Recursive variance algorithm. More...
 
Transform algorithms
template<typename _InputIterator , typename _MaskIterator , typename _OutputIterator , typename _UnaryOperation >
_OutputIterator transform_mask_un (_InputIterator first, _InputIterator last, _MaskIterator mask_first, _OutputIterator result, _UnaryOperation unary_op, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Perform an operation on a sequence according to a mask sequence. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator , typename _BinaryOperation >
_OutputIterator transform_mask_bin (_InputIterator1 first1, _InputIterator1 last1, _MaskIterator mask_first, _InputIterator2 first2, _OutputIterator result, _BinaryOperation binary_op, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Perform an operation on corresponding elements of two sequences according to a mask sequence. More...
 
template<typename _InputIterator , typename _OutputIterator , typename _UnaryOperation , typename _Predicate >
_OutputIterator transform_if (_InputIterator first, _InputIterator last, _OutputIterator result, _UnaryOperation unary_op, _Predicate pred)
 Perform an operation on a sequence according to a Predicate. More...
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation , typename _Predicate >
_OutputIterator transform_if (_InputIterator1 first1, _InputIterator1 last1, _InputIterator2 first2, _OutputIterator result, _BinaryOperation binary_op, _Predicate pred)
 Perform an operation on corresponding elements of two sequences according to a Predicate. More...
 
max_element algorithms
template<typename _ForwardIterator , typename _MaskIterator >
_ForwardIterator max_element_mask (_ForwardIterator first, _ForwardIterator last, _MaskIterator mask_first, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Return the maximum element in a range according to a mask sequence or return last if no value verify the mask. More...
 
template<typename _ForwardIterator , typename Predicate >
_ForwardIterator max_element_if (_ForwardIterator first, _ForwardIterator last, Predicate pred)
 Return the maximum element in a range according to a predicate or last if the predicate is never verified. More...
 
template<typename _ForwardIterator , typename _MaskIterator , typename _Compare >
_ForwardIterator max_element_mask_compare (_ForwardIterator first, _ForwardIterator last, _MaskIterator mask_first, _Compare comp, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Return the maximum element in a range using comparison functor according to a mask sequence or return last if no value verify the mask. More...
 
template<typename _ForwardIterator , typename _Compare , typename Predicate >
_ForwardIterator max_element_if_compare (_ForwardIterator first, _ForwardIterator last, Predicate pred, _Compare comp)
 Return the maximum element in a range using comparison functor according to a predicate or return last if the predicate is never verified. More...
 
min_element algorithms
template<typename _ForwardIterator , typename _MaskIterator >
_ForwardIterator min_element_mask (_ForwardIterator first, _ForwardIterator last, _MaskIterator mask_first, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Return the minimum element in a range according to a mask sequence or return last if no value verify the mask. More...
 
template<typename _ForwardIterator , typename _MaskIterator , typename _Compare >
_ForwardIterator min_element_mask_compare (_ForwardIterator first, _ForwardIterator last, _MaskIterator mask_first, _Compare comp, typename std::iterator_traits< _MaskIterator >::value_type value=typename std::iterator_traits< _MaskIterator >::value_type(1))
 Return the minimum element in a range using comparison functor according to a mask sequence or return last if no value verify the mask. More...
 
template<typename _ForwardIterator , typename Predicate >
_ForwardIterator min_element_if (_ForwardIterator first, _ForwardIterator last, Predicate pred)
 Return the minimum element in a range according to a predicate or return last if the predicate is never verified. More...
 
template<typename _ForwardIterator , typename _Compare , typename Predicate >
_ForwardIterator min_element_if_compare (_ForwardIterator first, _ForwardIterator last, Predicate pred, _Compare comp)
 Return the minimum element in a range using comparison functor according to a predicate or return last if the predicate is never verified. More...
 
input/output operators
template<typename T >
std::ostream & operator<< (std::ostream &out, const Array< T > &a)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Array2d< T > &a)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Array3d< T > &a)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Array4d< T > &a)
 
template<typename T , std::size_t N>
std::ostream & operator<< (std::ostream &out, const block< T, N > &b)
 
template<typename T , std::size_t NR, std::size_t NC>
std::ostream & operator<< (std::ostream &out, const slip::block2d< T, NR, NC > &b)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
std::ostream & operator<< (std::ostream &out, const slip::block3d< T, NP, NR, NC > &b)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
std::ostream & operator<< (std::ostream &out, const slip::block4d< T, NS, NP, NR, NC > &b)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Color< T > &b)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const Colormap< T > &a)
 
EqualityComparable functions
template<typename T >
bool operator== (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator!= (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator== (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator!= (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator== (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator!= (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator== (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T >
bool operator!= (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T , std::size_t N>
bool operator== (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t N>
bool operator!= (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator== (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator!= (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator== (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator!= (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator== (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator!= (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T >
bool operator== (const Colormap< T > &x, const Colormap< T > &y)
 
template<typename T >
bool operator!= (const Colormap< T > &x, const Colormap< T > &y)
 
template<typename T >
bool operator== (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator!= (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator== (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator!= (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator== (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<typename T >
bool operator!= (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<std::size_t DIM>
bool operator== (const Monomial< DIM > &x, const Monomial< DIM > &y)
 
template<std::size_t DIM>
bool operator!= (const Monomial< DIM > &x, const Monomial< DIM > &y)
 
template<typename T >
bool operator== (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator!= (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator== (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator!= (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator== (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator!= (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator== (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
template<typename T >
bool operator!= (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
LessThanComparable functions
template<typename T >
bool operator< (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator> (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator<= (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator>= (const Array< T > &x, const Array< T > &y)
 
template<typename T >
bool operator< (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator> (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator<= (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator>= (const slip::Array2d< T > &x, const slip::Array2d< T > &y)
 
template<typename T >
bool operator< (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator> (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator<= (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator>= (const slip::Array3d< T > &x, const slip::Array3d< T > &y)
 
template<typename T >
bool operator< (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T >
bool operator> (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T >
bool operator<= (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T >
bool operator>= (const slip::Array4d< T > &x, const slip::Array4d< T > &y)
 
template<typename T , std::size_t N>
bool operator< (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t N>
bool operator> (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t N>
bool operator<= (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t N>
bool operator>= (const block< T, N > &x, const block< T, N > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator< (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator> (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator<= (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NR, std::size_t NC>
bool operator>= (const slip::block2d< T, NR, NC > &x, const slip::block2d< T, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator< (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator> (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator<= (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool operator>= (const slip::block3d< T, NP, NR, NC > &x, const slip::block3d< T, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator< (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator> (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator<= (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool operator>= (const slip::block4d< T, NS, NP, NR, NC > &x, const slip::block4d< T, NS, NP, NR, NC > &y)
 
template<typename T >
bool operator< (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator> (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator<= (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator>= (const slip::GrayscaleImage< T > &x, const slip::GrayscaleImage< T > &y)
 
template<typename T >
bool operator< (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator> (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator<= (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator>= (const slip::HyperVolume< T > &x, const slip::HyperVolume< T > &y)
 
template<typename T >
bool operator< (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<typename T >
bool operator> (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<typename T >
bool operator<= (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<typename T >
bool operator>= (const slip::Matrix< T > &x, const slip::Matrix< T > &y)
 
template<typename T >
bool operator< (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator> (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator<= (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator>= (const Polynomial< T > &x, const Polynomial< T > &y)
 
template<typename T >
bool operator< (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator> (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator<= (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator>= (const Signal< T > &x, const Signal< T > &y)
 
template<typename T >
bool operator< (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator> (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator<= (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator>= (const Vector< T > &x, const Vector< T > &y)
 
template<typename T >
bool operator< (const Vector2d< T > &x, const Vector2d< T > &y)
 
template<typename T >
bool operator> (const Vector2d< T > &x, const Vector2d< T > &y)
 
template<typename T >
bool operator<= (const Vector2d< T > &x, const Vector2d< T > &y)
 
template<typename T >
bool operator>= (const Vector2d< T > &x, const Vector2d< T > &y)
 
template<typename T >
bool operator< (const Vector3d< T > &x, const Vector3d< T > &y)
 
template<typename T >
bool operator> (const Vector3d< T > &x, const Vector3d< T > &y)
 
template<typename T >
bool operator<= (const Vector3d< T > &x, const Vector3d< T > &y)
 
template<typename T >
bool operator>= (const Vector3d< T > &x, const Vector3d< T > &y)
 
template<typename T >
bool operator< (const Vector4d< T > &x, const Vector4d< T > &y)
 
template<typename T >
bool operator> (const Vector4d< T > &x, const Vector4d< T > &y)
 
template<typename T >
bool operator<= (const Vector4d< T > &x, const Vector4d< T > &y)
 
template<typename T >
bool operator>= (const Vector4d< T > &x, const Vector4d< T > &y)
 
template<typename T >
bool operator< (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
template<typename T >
bool operator> (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
template<typename T >
bool operator<= (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
template<typename T >
bool operator>= (const slip::Volume< T > &x, const slip::Volume< T > &y)
 
EqualityComparable Color functions
template<typename T >
bool operator== (const Color< T > &x, const Color< T > &y)
 
template<typename T >
bool operator!= (const Color< T > &x, const Color< T > &y)
 
Color arithmetic operations
template<typename T >
Color< T > operator+ (const Color< T > &V1, const Color< T > &V2)
 
template<typename T >
Color< T > operator+ (const Color< T > &V1, const T &val)
 
template<typename T >
Color< T > operator+ (const T &val, const Color< T > &V1)
 
template<typename T >
Color< T > operator- (const Color< T > &V1, const Color< T > &V2)
 
template<typename T >
Color< T > operator- (const Color< T > &V1, const T &val)
 
template<typename T >
Color< T > operator- (const T &val, const Color< T > &V1)
 
template<typename T >
Color< T > operator* (const Color< T > &V1, const Color< T > &V2)
 
template<typename T >
Color< T > operator* (const Color< T > &V1, const T &val)
 
template<typename T >
Color< T > operator* (const T &val, const Color< T > &V1)
 
template<typename T >
Color< T > operator/ (const Color< T > &V1, const Color< T > &V2)
 
template<typename T >
Color< T > operator/ (const Color< T > &V1, const T &val)
 
Arithmetical DenseVector2dField2d operators
template<typename T >
DenseVector2dField2d< T > operator+ (const DenseVector2dField2d< T > &M1, const T &val)
 addition of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator+ (const T &val, const DenseVector2dField2d< T > &M1)
 addition of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator- (const DenseVector2dField2d< T > &M1, const T &val)
 substraction of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator- (const T &val, const DenseVector2dField2d< T > &M1)
 substraction of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator* (const DenseVector2dField2d< T > &M1, const T &val)
 multiplication of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator* (const T &val, const DenseVector2dField2d< T > &M1)
 multiplication of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator/ (const DenseVector2dField2d< T > &M1, const T &val)
 division of a scalar to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator+ (const DenseVector2dField2d< T > &M1, const DenseVector2dField2d< T > &M2)
 pointwise addition of two DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator+ (const DenseVector2dField2d< T > &M1, const slip::Vector2d< T > &val)
 addition of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator+ (const slip::Vector2d< T > &val, const DenseVector2dField2d< T > &M1)
 addition of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator- (const DenseVector2dField2d< T > &M1, const DenseVector2dField2d< T > &M2)
 pointwise substraction of two DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator- (const DenseVector2dField2d< T > &M1, const slip::Vector2d< T > &val)
 substraction of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator- (const slip::Vector2d< T > &val, const DenseVector2dField2d< T > &M1)
 substraction of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator* (const DenseVector2dField2d< T > &M1, const DenseVector2dField2d< T > &M2)
 pointwise multiplication of two DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator* (const DenseVector2dField2d< T > &M1, const slip::Vector2d< T > &val)
 multiplication of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator* (const slip::Vector2d< T > &val, const DenseVector2dField2d< T > &M1)
 multiplication of a Vector2d to each element of a DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator/ (const DenseVector2dField2d< T > &M1, const DenseVector2dField2d< T > &M2)
 pointwise division of two DenseVector2dField2d More...
 
template<typename T >
DenseVector2dField2d< T > operator/ (const DenseVector2dField2d< T > &M1, const slip::Vector2d< T > &val)
 division of a Vector2d to each element of a DenseVector2dField2d More...
 
Arithmetical DenseVector3dField2d operators
template<typename T >
DenseVector3dField2d< T > operator+ (const DenseVector3dField2d< T > &M1, const T &val)
 addition of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator+ (const T &val, const DenseVector3dField2d< T > &M1)
 addition of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator- (const DenseVector3dField2d< T > &M1, const T &val)
 substraction of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator- (const T &val, const DenseVector3dField2d< T > &M1)
 substraction of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator* (const DenseVector3dField2d< T > &M1, const T &val)
 multiplication of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator* (const T &val, const DenseVector3dField2d< T > &M1)
 multiplication of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator/ (const DenseVector3dField2d< T > &M1, const T &val)
 division of a scalar to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator+ (const DenseVector3dField2d< T > &M1, const DenseVector3dField2d< T > &M2)
 pointwise addition of two DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator+ (const DenseVector3dField2d< T > &M1, const slip::Vector3d< T > &val)
 addition of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator+ (const slip::Vector3d< T > &val, const DenseVector3dField2d< T > &M1)
 addition of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator- (const DenseVector3dField2d< T > &M1, const DenseVector3dField2d< T > &M2)
 pointwise substraction of two DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator- (const DenseVector3dField2d< T > &M1, const slip::Vector3d< T > &val)
 substraction of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator- (const slip::Vector3d< T > &val, const DenseVector3dField2d< T > &M1)
 substraction of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator* (const DenseVector3dField2d< T > &M1, const DenseVector3dField2d< T > &M2)
 pointwise multiplication of two DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator* (const DenseVector3dField2d< T > &M1, const slip::Vector3d< T > &val)
 multiplication of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator* (const slip::Vector3d< T > &val, const DenseVector3dField2d< T > &M1)
 multiplication of a Vector3d to each element of a DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator/ (const DenseVector3dField2d< T > &M1, const DenseVector3dField2d< T > &M2)
 pointwise division of two DenseVector3dField2d More...
 
template<typename T >
DenseVector3dField2d< T > operator/ (const DenseVector3dField2d< T > &M1, const slip::Vector3d< T > &val)
 division of a Vector3d to each element of a DenseVector3dField2d More...
 
Arithmetical DenseVector3dField3d operators
template<typename T >
DenseVector3dField3d< T > operator+ (const DenseVector3dField3d< T > &M1, const T &val)
 addition of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator+ (const T &val, const DenseVector3dField3d< T > &M1)
 addition of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator- (const DenseVector3dField3d< T > &M1, const T &val)
 substraction of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator- (const T &val, const DenseVector3dField3d< T > &M1)
 substraction of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator* (const DenseVector3dField3d< T > &M1, const T &val)
 multiplication of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator* (const T &val, const DenseVector3dField3d< T > &M1)
 multiplication of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator/ (const DenseVector3dField3d< T > &M1, const T &val)
 division of a scalar to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator+ (const DenseVector3dField3d< T > &M1, const DenseVector3dField3d< T > &M2)
 pointwise addition of two DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator+ (const DenseVector3dField3d< T > &M1, const slip::Vector3d< T > &val)
 addition of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator+ (const slip::Vector3d< T > &val, const DenseVector3dField3d< T > &M1)
 addition of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator- (const DenseVector3dField3d< T > &M1, const DenseVector3dField3d< T > &M2)
 pointwise substraction of two DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator- (const DenseVector3dField3d< T > &M1, const slip::Vector3d< T > &val)
 substraction of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator- (const slip::Vector3d< T > &val, const DenseVector3dField3d< T > &M1)
 substraction of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator* (const DenseVector3dField3d< T > &M1, const DenseVector3dField3d< T > &M2)
 pointwise multiplication of two DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator* (const DenseVector3dField3d< T > &M1, const slip::Vector3d< T > &val)
 multiplication of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator* (const slip::Vector3d< T > &val, const DenseVector3dField3d< T > &M1)
 multiplication of a Vector3d to each element of a DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator/ (const DenseVector3dField3d< T > &M1, const DenseVector3dField3d< T > &M2)
 pointwise division of two DenseVector3dField3d More...
 
template<typename T >
DenseVector3dField3d< T > operator/ (const DenseVector3dField3d< T > &M1, const slip::Vector3d< T > &val)
 division of a Vector3d to each element of a DenseVector3dField3d More...
 
Arithmetical operators
template<typename T >
GrayscaleImage< T > operator+ (const GrayscaleImage< T > &M1, const GrayscaleImage< T > &M2)
 pointwise addition of two GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator+ (const GrayscaleImage< T > &M1, const T &val)
 addition of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator+ (const T &val, const GrayscaleImage< T > &M1)
 addition of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator- (const GrayscaleImage< T > &M1, const GrayscaleImage< T > &M2)
 pointwise substraction of two GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator- (const GrayscaleImage< T > &M1, const T &val)
 substraction of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator- (const T &val, const GrayscaleImage< T > &M1)
 substraction of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator* (const GrayscaleImage< T > &M1, const GrayscaleImage< T > &M2)
 pointwise multiplication of two GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator* (const GrayscaleImage< T > &M1, const T &val)
 multiplication of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator* (const T &val, const GrayscaleImage< T > &M1)
 multiplication of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator/ (const GrayscaleImage< T > &M1, const GrayscaleImage< T > &M2)
 pointwise division of two GrayscaleImage More...
 
template<typename T >
GrayscaleImage< T > operator/ (const GrayscaleImage< T > &M1, const T &val)
 division of a scalar to each element of a GrayscaleImage More...
 
template<typename T >
Matrix< T > operator+ (const Matrix< T > &M1, const Matrix< T > &M2)
 pointwise addition of two Matrix More...
 
template<typename T >
Matrix< T > operator+ (const Matrix< T > &M1, const T &val)
 addition of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator+ (const T &val, const Matrix< T > &M1)
 addition of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator- (const Matrix< T > &M1, const Matrix< T > &M2)
 pointwise substraction of two Matrix More...
 
template<typename T >
Matrix< T > operator- (const Matrix< T > &M1, const T &val)
 substraction of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator- (const T &val, const Matrix< T > &M1)
 substraction of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator* (const Matrix< T > &M1, const Matrix< T > &M2)
 pointwise multiplication of two Matrix More...
 
template<typename T >
Matrix< T > operator* (const Matrix< T > &M1, const T &val)
 multiplication of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator* (const T &val, const Matrix< T > &M1)
 multiplication of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix< T > operator/ (const Matrix< T > &M1, const Matrix< T > &M2)
 pointwise division of two Matrix More...
 
template<typename T >
Matrix< T > operator/ (const Matrix< T > &M1, const T &val)
 division of a scalar to each element of a Matrix More...
 
template<typename T >
Matrix3d< T > operator+ (const Matrix3d< T > &M1, const Matrix3d< T > &M2)
 pointwise addition of two Matrix3d More...
 
template<typename T >
Matrix3d< T > operator+ (const Matrix3d< T > &M1, const T &val)
 addition of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator+ (const T &val, const Matrix3d< T > &M1)
 addition of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator- (const Matrix3d< T > &M1, const Matrix3d< T > &M2)
 pointwise substraction of two Matrix3d More...
 
template<typename T >
Matrix3d< T > operator- (const Matrix3d< T > &M1, const T &val)
 substraction of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator- (const T &val, const Matrix3d< T > &M1)
 substraction of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator* (const Matrix3d< T > &M1, const Matrix3d< T > &M2)
 pointwise multiplication of two Matrix3d More...
 
template<typename T >
Matrix3d< T > operator* (const Matrix3d< T > &M1, const T &val)
 multiplication of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator* (const T &val, const Matrix3d< T > &M1)
 multiplication of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix3d< T > operator/ (const Matrix3d< T > &M1, const Matrix3d< T > &M2)
 pointwise division of two Matrix3d More...
 
template<typename T >
Matrix3d< T > operator/ (const Matrix3d< T > &M1, const T &val)
 division of a scalar to each element of a Matrix3d More...
 
template<typename T >
Matrix4d< T > operator+ (const Matrix4d< T > &M1, const Matrix4d< T > &M2)
 pointwise addition of two Matrix4d More...
 
template<typename T >
Matrix4d< T > operator+ (const Matrix4d< T > &M1, const T &val)
 addition of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator+ (const T &val, const Matrix4d< T > &M1)
 addition of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator- (const Matrix4d< T > &M1, const Matrix4d< T > &M2)
 pointwise substraction of two Matrix4d More...
 
template<typename T >
Matrix4d< T > operator- (const Matrix4d< T > &M1, const T &val)
 substraction of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator- (const T &val, const Matrix4d< T > &M1)
 substraction of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator* (const Matrix4d< T > &M1, const Matrix4d< T > &M2)
 pointwise multiplication of two Matrix4d More...
 
template<typename T >
Matrix4d< T > operator* (const Matrix4d< T > &M1, const T &val)
 multiplication of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator* (const T &val, const Matrix4d< T > &M1)
 multiplication of a scalar to each element of a Matrix4d More...
 
template<typename T >
Matrix4d< T > operator/ (const Matrix4d< T > &M1, const Matrix4d< T > &M2)
 pointwise division of two Matrix4d More...
 
template<typename T >
Matrix4d< T > operator/ (const Matrix4d< T > &M1, const T &val)
 division of a scalar to each element of a Matrix4d More...
 
i/o operators
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Matrix3d< T > &a)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Matrix4d< T > &a)
 
EqualityComparable operators
template<typename T >
bool operator== (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator!= (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator== (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
template<typename T >
bool operator!= (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
LessThanComparable operators
template<typename T >
bool operator< (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator> (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator<= (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator>= (const slip::Matrix3d< T > &x, const slip::Matrix3d< T > &y)
 
template<typename T >
bool operator< (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
template<typename T >
bool operator> (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
template<typename T >
bool operator<= (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
template<typename T >
bool operator>= (const slip::Matrix4d< T > &x, const slip::Matrix4d< T > &y)
 
LessThan functions
template<std::size_t DIM>
bool operator< (const Monomial< DIM > &x, const Monomial< DIM > &y)
 
template<std::size_t DIM>
bool operator> (const Monomial< DIM > &x, const Monomial< DIM > &y)
 
Arithmetic operators
template<std::size_t DIM>
Monomial< DIM > operator* (const Monomial< DIM > &monomial1, const Monomial< DIM > &monomial2)
 Monomial multiplication. More...
 
Arithemtical operators
Arithmetical functions
template<typename T >
Signal< T > operator+ (const Signal< T > &V1, const Signal< T > &V2)
 pointwise addition of two Signal More...
 
template<typename T >
Signal< T > operator+ (const Signal< T > &V, const T &val)
 addition of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator+ (const T &val, const Signal< T > &V)
 addition of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator- (const Signal< T > &V1, const Signal< T > &V2)
 pointwise substraction of two Signal More...
 
template<typename T >
Signal< T > operator- (const Signal< T > &V, const T &val)
 substraction of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator- (const T &val, const Signal< T > &V)
 substraction of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator* (const Signal< T > &V1, const Signal< T > &V2)
 pointwise multiplication of two Signal More...
 
template<typename T >
Signal< T > operator* (const Signal< T > &V, const T &val)
 multiplication of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator* (const T &val, const Signal< T > &V)
 multiplication of a scalar to each element of a Signal More...
 
template<typename T >
Signal< T > operator/ (const Signal< T > &V1, const Signal< T > &V2)
 pointwise division of two Signal More...
 
template<typename T >
Signal< T > operator/ (const Signal< T > &V, const T &val)
 division of a scalar to each element of a Signal More...
 
template<typename T >
Vector< T > operator+ (const Vector< T > &V1, const Vector< T > &V2)
 pointwise addition of two Vector More...
 
template<typename T >
Vector< T > operator+ (const Vector< T > &V, const T &val)
 addition of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator+ (const T &val, const Vector< T > &V)
 addition of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator- (const Vector< T > &V1, const Vector< T > &V2)
 pointwise substraction of two Vector More...
 
template<typename T >
Vector< T > operator- (const Vector< T > &V, const T &val)
 substraction of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator- (const T &val, const Vector< T > &V)
 substraction of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator* (const Vector< T > &V1, const Vector< T > &V2)
 pointwise multiplication of two Vector More...
 
template<typename T >
Vector< T > operator* (const Vector< T > &V, const T &val)
 multiplication of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator* (const T &val, const Vector< T > &V)
 multiplication of a scalar to each element of a Vector More...
 
template<typename T >
Vector< T > operator/ (const Vector< T > &V1, const Vector< T > &V2)
 pointwise division of two Vector More...
 
template<typename T >
Vector< T > operator/ (const Vector< T > &V, const T &val)
 division of a scalar to each element of a Vector More...
 
input/output functions
template<typename T >
std::ostream & operator<< (std::ostream &out, const slip::Volume< T > &a)
 

Variables

const std::string FILE_OPEN_ERROR = "Fail to open file: "
 
const std::string CROSSCORRELATION_BAD_ALGO = "Bad crosscorrelation algorithm selection: standard algorithm by default"
 
const std::string SINGULAR_MATRIX_ERROR = "This matrix is singular"
 
const std::string POSITIVE_DEFINITE_MATRIX_ERROR = "This matrix is not positive definite"
 
const std::string GRID_INIT_POINT_ERROR = "The init points of the grid are different"
 
const std::string GRID_STEP_ERROR = "The grid steps of the grid are different"
 
const std::string FILE_READ_ERROR = "Unable to read the file "
 
const std::string FILE_WRITE_ERROR = "Unable to write into the file "
 
const std::string BAD_DIMENSION = "Bad dimension parameter."
 
const std::string BAD_PARAMETER = "Bad parameter."
 
Some useful 1d-neighborhood configurations
Some useful 2d-neighborhood configurations
Some useful 3d-neighborhood configurations
Some useful 4d-neighborhood configurations

Derivatives algorithms

enum  FOUR_DIM_DIRECTION { T_DIRECTION, S_DIRECTION, R_DIRECTION, C_DIRECTION }
 Choose between different directions in a 4D space. More...
 
template<class Container2D >
void finite_diff_coef (const std::size_t sch_ord, const std::size_t sch_shift, Container2D &Dinv)
 return finite differences coefficients for derivation based on Taylor series (sch_ord-sch_shift steps upwind). More...
 
template<class Container2D >
void finite_diff_coef (const std::size_t sch_ord, const std::size_t sch_shift, const typename Container2D::value_type &h, Container2D &Dinv)
 return finite differences coefficients for derivation based on Taylor series (sch_ord-sch_shift steps upwind) More...
 
template<typename KernelsIterator >
void finite_diff_kernels (const std::size_t der_ord, const std::size_t sch_ord, const std::size_t sch_shift, std::vector< KernelsIterator > &kernels_first)
 Computes finite differences kernels for derivation based on Taylor series (sch_ord-sch_shift steps upwind) More...
 
template<typename KernelsIterator >
void finite_diff_kernels (const std::size_t der_ord, const std::size_t sch_ord, const std::size_t sch_shift, const typename std::iterator_traits< KernelsIterator >::value_type &h, std::vector< KernelsIterator > &kernels_first)
 Computes finite differences kernels for derivation based on Taylor series (sch_ord-sch_shift steps upwind) More...
 
template<typename SrcIter , typename Container2D , typename ResIter >
void derivative (SrcIter first, SrcIter last, const std::size_t der_ord, const std::size_t sch_ord, const std::size_t sch_shift, const Container2D &M, ResIter result)
 Computes 1d finite differences derivatives of an iterator range. More...
 
template<typename SrcIter , typename KernelsIterator , typename ResIter >
void derivative (SrcIter first, SrcIter last, const std::size_t der_ord, const std::size_t sch_ord, const std::size_t sch_shift, const std::vector< KernelsIterator > &kernels_first, ResIter result)
 Computes 1d finite differences derivatives of an iterator range. More...
 
template<typename Iterator2d1 , typename Iterator2d2 , typename T >
void derivative_2d (Iterator2d1 I_up, Iterator2d1 I_bot, const slip::Point2d< T > &grid_step, slip::SPATIAL_DIRECTION der_dir, const std::size_t der_order, const std::size_t sch_order, Iterator2d2 R_up, Iterator2d2 R_bot)
 Computes finite differences derivatives of a 2d range. More...
 
template<typename RandomAccessIterator3d1 , typename RandomAccessIterator3d2 , typename T >
void derivative_3d (RandomAccessIterator3d1 I_fup, RandomAccessIterator3d1 I_back_bot, const slip::Point3d< T > &grid_step, slip::SPATIAL_DIRECTION der_dir, const std::size_t der_order, const std::size_t sch_order, RandomAccessIterator3d2 R_fup, RandomAccessIterator3d2 R_back_bot)
 Computes finite differences derivatives of a 3d range. More...
 
template<typename RandomAccessIterator4d1 , typename RandomAccessIterator4d2 , typename T >
void derivative_4d (RandomAccessIterator4d1 I_ffup, RandomAccessIterator4d1 I_last_back_bot, const slip::Point4d< T > &grid_step, slip::FOUR_DIM_DIRECTION der_dir, const std::size_t der_order, const std::size_t sch_order, RandomAccessIterator4d2 R_ffup, RandomAccessIterator4d2 R_last_back_bot)
 Computes finite differences derivatives of a 4d range. More...
 

Detailed Description

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.

namespace slip

Typedef Documentation

char alias

Definition at line 2242 of file Array2d.hpp.

typedef slip::Array2d<double> slip::Array2d_d

double alias

Definition at line 2226 of file Array2d.hpp.

float alias

Definition at line 2228 of file Array2d.hpp.

int alias

Definition at line 2238 of file Array2d.hpp.

long alias

Definition at line 2230 of file Array2d.hpp.

short alias

Definition at line 2234 of file Array2d.hpp.

typedef slip::Array2d<unsigned char> slip::Array2d_uc

unsigned char alias

Definition at line 2244 of file Array2d.hpp.

typedef slip::Array2d<unsigned int> slip::Array2d_ui

unsigned int alias

Definition at line 2240 of file Array2d.hpp.

typedef slip::Array2d<unsigned long> slip::Array2d_ul

unsigned long alias

Definition at line 2232 of file Array2d.hpp.

typedef slip::Array2d<unsigned short> slip::Array2d_us

unsigned long alias

Definition at line 2236 of file Array2d.hpp.

char alias

Definition at line 3495 of file Array3d.hpp.

typedef slip::Array3d<double> slip::Array3d_d

double alias

Definition at line 3479 of file Array3d.hpp.

float alias

Definition at line 3481 of file Array3d.hpp.

int alias

Definition at line 3491 of file Array3d.hpp.

long alias

Definition at line 3483 of file Array3d.hpp.

short alias

Definition at line 3487 of file Array3d.hpp.

typedef slip::Array3d<unsigned char> slip::Array3d_uc

unsigned char alias

Definition at line 3497 of file Array3d.hpp.

typedef slip::Array3d<unsigned int> slip::Array3d_ui

unsigned int alias

Definition at line 3493 of file Array3d.hpp.

typedef slip::Array3d<unsigned long> slip::Array3d_ul

unsigned long alias

Definition at line 3485 of file Array3d.hpp.

typedef slip::Array3d<unsigned short> slip::Array3d_us

unsigned long alias

Definition at line 3489 of file Array3d.hpp.

char alias

Definition at line 3237 of file Array4d.hpp.

typedef slip::Array4d<double> slip::Array4d_d

double alias

Definition at line 3221 of file Array4d.hpp.

float alias

Definition at line 3223 of file Array4d.hpp.

int alias

Definition at line 3233 of file Array4d.hpp.

long alias

Definition at line 3225 of file Array4d.hpp.

short alias

Definition at line 3229 of file Array4d.hpp.

typedef slip::Array4d<unsigned char> slip::Array4d_uc

unsigned char alias

Definition at line 3239 of file Array4d.hpp.

typedef slip::Array4d<unsigned int> slip::Array4d_ui

unsigned int alias

Definition at line 3235 of file Array4d.hpp.

typedef slip::Array4d<unsigned long> slip::Array4d_ul

unsigned long alias

Definition at line 3227 of file Array4d.hpp.

typedef slip::Array4d<unsigned short> slip::Array4d_us

unsigned long alias

Definition at line 3231 of file Array4d.hpp.

typedef slip::Array<char> slip::Array_c

char alias

Definition at line 975 of file Array.hpp.

typedef slip::Array<double> slip::Array_d

double alias

Definition at line 959 of file Array.hpp.

typedef slip::Array<float> slip::Array_f

float alias

Definition at line 961 of file Array.hpp.

typedef slip::Array<int> slip::Array_i

int alias

Definition at line 971 of file Array.hpp.

typedef slip::Array<long> slip::Array_l

long alias

Definition at line 963 of file Array.hpp.

typedef slip::Array<short> slip::Array_s

short alias

Definition at line 967 of file Array.hpp.

typedef slip::Array<unsigned char> slip::Array_uc

unsigned char alias

Definition at line 977 of file Array.hpp.

typedef slip::Array<unsigned int> slip::Array_ui

unsigned int alias

Definition at line 973 of file Array.hpp.

typedef slip::Array<unsigned long> slip::Array_ul

unsigned long alias

Definition at line 965 of file Array.hpp.

typedef slip::Array<unsigned short> slip::Array_us

unsigned long alias

Definition at line 969 of file Array.hpp.

typedef slip::Color<char> slip::Color_c

char alias

Definition at line 505 of file Color.hpp.

typedef slip::Color<double> slip::Color_d

double alias

Definition at line 489 of file Color.hpp.

typedef slip::Color<float> slip::Color_f

float alias

Definition at line 491 of file Color.hpp.

typedef slip::Color<int> slip::Color_i

int alias

Definition at line 501 of file Color.hpp.

typedef slip::Color<long> slip::Color_l

long alias

Definition at line 493 of file Color.hpp.

typedef slip::Color<short> slip::Color_s

short alias

Definition at line 497 of file Color.hpp.

typedef slip::Color<unsigned char> slip::Color_uc

unsigned char alias

Definition at line 507 of file Color.hpp.

typedef slip::Color<unsigned int> slip::Color_ui

unsigned int alias

Definition at line 503 of file Color.hpp.

typedef slip::Color<unsigned long> slip::Color_ul

unsigned long alias

Definition at line 495 of file Color.hpp.

typedef slip::Color<unsigned short> slip::Color_us

unsigned long alias

Definition at line 499 of file Color.hpp.

char alias

Definition at line 368 of file ColorHyperVolume.hpp.

double alias

Definition at line 352 of file ColorHyperVolume.hpp.

float alias

Definition at line 354 of file ColorHyperVolume.hpp.

int alias

Definition at line 364 of file ColorHyperVolume.hpp.

long alias

Definition at line 356 of file ColorHyperVolume.hpp.

short alias

Definition at line 360 of file ColorHyperVolume.hpp.

unsigned char alias

Definition at line 370 of file ColorHyperVolume.hpp.

unsigned int alias

Definition at line 366 of file ColorHyperVolume.hpp.

unsigned long alias

Definition at line 358 of file ColorHyperVolume.hpp.

unsigned long alias

Definition at line 362 of file ColorHyperVolume.hpp.

char alias

Definition at line 487 of file ColorImage.hpp.

double alias

Definition at line 471 of file ColorImage.hpp.

float alias

Definition at line 473 of file ColorImage.hpp.

int alias

Definition at line 483 of file ColorImage.hpp.

long alias

Definition at line 475 of file ColorImage.hpp.

short alias

Definition at line 479 of file ColorImage.hpp.

typedef slip::ColorImage<unsigned char> slip::ColorImage_uc

unsigned char alias

Definition at line 489 of file ColorImage.hpp.

typedef slip::ColorImage<unsigned int> slip::ColorImage_ui

unsigned int alias

Definition at line 485 of file ColorImage.hpp.

typedef slip::ColorImage<unsigned long> slip::ColorImage_ul

unsigned long alias

Definition at line 477 of file ColorImage.hpp.

typedef slip::ColorImage<unsigned short> slip::ColorImage_us

unsigned long alias

Definition at line 481 of file ColorImage.hpp.

char alias

Definition at line 721 of file Colormap.hpp.

double alias

Definition at line 705 of file Colormap.hpp.

float alias

Definition at line 707 of file Colormap.hpp.

int alias

Definition at line 717 of file Colormap.hpp.

long alias

Definition at line 709 of file Colormap.hpp.

short alias

Definition at line 713 of file Colormap.hpp.

typedef slip::Colormap<unsigned char> slip::Colormap_uc

unsigned char alias

Definition at line 723 of file Colormap.hpp.

typedef slip::Colormap<unsigned int> slip::Colormap_ui

unsigned int alias

Definition at line 719 of file Colormap.hpp.

typedef slip::Colormap<unsigned long> slip::Colormap_ul

unsigned long alias

Definition at line 711 of file Colormap.hpp.

typedef slip::Colormap<unsigned short> slip::Colormap_us

unsigned long alias

Definition at line 715 of file Colormap.hpp.

char alias

Definition at line 734 of file DenseVector2dField2d.hpp.

double alias

Definition at line 718 of file DenseVector2dField2d.hpp.

float alias

Definition at line 720 of file DenseVector2dField2d.hpp.

int alias

Definition at line 730 of file DenseVector2dField2d.hpp.

long alias

Definition at line 722 of file DenseVector2dField2d.hpp.

short alias

Definition at line 726 of file DenseVector2dField2d.hpp.

unsigned char alias

Definition at line 736 of file DenseVector2dField2d.hpp.

unsigned int alias

Definition at line 732 of file DenseVector2dField2d.hpp.

unsigned long alias

Definition at line 724 of file DenseVector2dField2d.hpp.

unsigned long alias

Definition at line 728 of file DenseVector2dField2d.hpp.

char alias

Definition at line 573 of file DenseVector3dField2d.hpp.

double alias

Definition at line 557 of file DenseVector3dField2d.hpp.

float alias

Definition at line 559 of file DenseVector3dField2d.hpp.

int alias

Definition at line 569 of file DenseVector3dField2d.hpp.

long alias

Definition at line 561 of file DenseVector3dField2d.hpp.

short alias

Definition at line 565 of file DenseVector3dField2d.hpp.

unsigned char alias

Definition at line 575 of file DenseVector3dField2d.hpp.

unsigned int alias

Definition at line 571 of file DenseVector3dField2d.hpp.

unsigned long alias

Definition at line 563 of file DenseVector3dField2d.hpp.

unsigned long alias

Definition at line 567 of file DenseVector3dField2d.hpp.

char alias

Definition at line 794 of file DenseVector3dField3d.hpp.

double alias

Definition at line 778 of file DenseVector3dField3d.hpp.

float alias

Definition at line 780 of file DenseVector3dField3d.hpp.

int alias

Definition at line 790 of file DenseVector3dField3d.hpp.

long alias

Definition at line 782 of file DenseVector3dField3d.hpp.

short alias

Definition at line 786 of file DenseVector3dField3d.hpp.

unsigned char alias

Definition at line 796 of file DenseVector3dField3d.hpp.

unsigned int alias

Definition at line 792 of file DenseVector3dField3d.hpp.

unsigned long alias

Definition at line 784 of file DenseVector3dField3d.hpp.

unsigned long alias

Definition at line 788 of file DenseVector3dField3d.hpp.

char alias

Definition at line 2354 of file GrayscaleImage.hpp.

double alias

Definition at line 2338 of file GrayscaleImage.hpp.

float alias

Definition at line 2340 of file GrayscaleImage.hpp.

int alias

Definition at line 2350 of file GrayscaleImage.hpp.

long alias

Definition at line 2342 of file GrayscaleImage.hpp.

short alias

Definition at line 2346 of file GrayscaleImage.hpp.

unsigned char alias

Definition at line 2356 of file GrayscaleImage.hpp.

unsigned int alias

Definition at line 2352 of file GrayscaleImage.hpp.

unsigned long alias

Definition at line 2344 of file GrayscaleImage.hpp.

unsigned long alias

Definition at line 2348 of file GrayscaleImage.hpp.

char alias

Definition at line 3268 of file HyperVolume.hpp.

double alias

Definition at line 3252 of file HyperVolume.hpp.

float alias

Definition at line 3254 of file HyperVolume.hpp.

int alias

Definition at line 3264 of file HyperVolume.hpp.

long alias

Definition at line 3256 of file HyperVolume.hpp.

short alias

Definition at line 3260 of file HyperVolume.hpp.

typedef slip::HyperVolume<unsigned char> slip::HyperVolume_uc

unsigned char alias

Definition at line 3270 of file HyperVolume.hpp.

typedef slip::HyperVolume<unsigned int> slip::HyperVolume_ui

unsigned int alias

Definition at line 3266 of file HyperVolume.hpp.

typedef slip::HyperVolume<unsigned long> slip::HyperVolume_ul

unsigned long alias

Definition at line 3258 of file HyperVolume.hpp.

typedef slip::HyperVolume<unsigned short> slip::HyperVolume_us

unsigned long alias

Definition at line 3262 of file HyperVolume.hpp.

char alias

Definition at line 3558 of file Matrix3d.hpp.

double alias

Definition at line 3542 of file Matrix3d.hpp.

float alias

Definition at line 3544 of file Matrix3d.hpp.

int alias

Definition at line 3554 of file Matrix3d.hpp.

long alias

Definition at line 3546 of file Matrix3d.hpp.

short alias

Definition at line 3550 of file Matrix3d.hpp.

typedef slip::Matrix3d<unsigned char> slip::Matrix3d_uc

unsigned char alias

Definition at line 3560 of file Matrix3d.hpp.

typedef slip::Matrix3d<unsigned int> slip::Matrix3d_ui

unsigned int alias

Definition at line 3556 of file Matrix3d.hpp.

typedef slip::Matrix3d<unsigned long> slip::Matrix3d_ul

unsigned long alias

Definition at line 3548 of file Matrix3d.hpp.

typedef slip::Matrix3d<unsigned short> slip::Matrix3d_us

unsigned long alias

Definition at line 3552 of file Matrix3d.hpp.

char alias

Definition at line 3276 of file Matrix4d.hpp.

double alias

Definition at line 3260 of file Matrix4d.hpp.

float alias

Definition at line 3262 of file Matrix4d.hpp.

int alias

Definition at line 3272 of file Matrix4d.hpp.

long alias

Definition at line 3264 of file Matrix4d.hpp.

short alias

Definition at line 3268 of file Matrix4d.hpp.

typedef slip::Matrix4d<unsigned char> slip::Matrix4d_uc

unsigned char alias

Definition at line 3278 of file Matrix4d.hpp.

typedef slip::Matrix4d<unsigned int> slip::Matrix4d_ui

unsigned int alias

Definition at line 3274 of file Matrix4d.hpp.

typedef slip::Matrix4d<unsigned long> slip::Matrix4d_ul

unsigned long alias

Definition at line 3266 of file Matrix4d.hpp.

typedef slip::Matrix4d<unsigned short> slip::Matrix4d_us

unsigned long alias

Definition at line 3270 of file Matrix4d.hpp.

char alias

Definition at line 2393 of file Matrix.hpp.

typedef slip::Matrix<double> slip::Matrix_d

double alias

Definition at line 2377 of file Matrix.hpp.

typedef slip::Matrix<float> slip::Matrix_f

float alias

Definition at line 2379 of file Matrix.hpp.

int alias

Definition at line 2389 of file Matrix.hpp.

long alias

Definition at line 2381 of file Matrix.hpp.

typedef slip::Matrix<short> slip::Matrix_s

short alias

Definition at line 2385 of file Matrix.hpp.

typedef slip::Matrix<unsigned char> slip::Matrix_uc

unsigned char alias

Definition at line 2395 of file Matrix.hpp.

typedef slip::Matrix<unsigned int> slip::Matrix_ui

unsigned int alias

Definition at line 2391 of file Matrix.hpp.

typedef slip::Matrix<unsigned long> slip::Matrix_ul

unsigned long alias

Definition at line 2383 of file Matrix.hpp.

typedef slip::Matrix<unsigned short> slip::Matrix_us

unsigned long alias

Definition at line 2387 of file Matrix.hpp.

char alias

Definition at line 186 of file Point1d.hpp.

typedef slip::Point1d<double> slip::Point1d_d

double alias

Definition at line 170 of file Point1d.hpp.

float alias

Definition at line 172 of file Point1d.hpp.

int alias

Definition at line 182 of file Point1d.hpp.

long alias

Definition at line 174 of file Point1d.hpp.

short alias

Definition at line 178 of file Point1d.hpp.

typedef slip::Point1d<unsigned char> slip::Point1d_uc

unsigned char alias

Definition at line 188 of file Point1d.hpp.

typedef slip::Point1d<unsigned int> slip::Point1d_ui

unsigned int alias

Definition at line 184 of file Point1d.hpp.

typedef slip::Point1d<unsigned long> slip::Point1d_ul

unsigned long alias

Definition at line 176 of file Point1d.hpp.

typedef slip::Point1d<unsigned short> slip::Point1d_us

unsigned long alias

Definition at line 180 of file Point1d.hpp.

char alias

Definition at line 218 of file Point2d.hpp.

typedef slip::Point2d<double> slip::Point2d_d

double alias

Definition at line 202 of file Point2d.hpp.

float alias

Definition at line 204 of file Point2d.hpp.

int alias

Definition at line 214 of file Point2d.hpp.

long alias

Definition at line 206 of file Point2d.hpp.

short alias

Definition at line 210 of file Point2d.hpp.

typedef slip::Point2d<unsigned char> slip::Point2d_uc

unsigned char alias

Definition at line 220 of file Point2d.hpp.

typedef slip::Point2d<unsigned int> slip::Point2d_ui

unsigned int alias

Definition at line 216 of file Point2d.hpp.

typedef slip::Point2d<unsigned long> slip::Point2d_ul

unsigned long alias

Definition at line 208 of file Point2d.hpp.

typedef slip::Point2d<unsigned short> slip::Point2d_us

unsigned long alias

Definition at line 212 of file Point2d.hpp.

char alias

Definition at line 224 of file Point3d.hpp.

typedef slip::Point3d<double> slip::Point3d_d

double alias

Definition at line 208 of file Point3d.hpp.

float alias

Definition at line 210 of file Point3d.hpp.

int alias

Definition at line 220 of file Point3d.hpp.

long alias

Definition at line 212 of file Point3d.hpp.

short alias

Definition at line 216 of file Point3d.hpp.

typedef slip::Point3d<unsigned char> slip::Point3d_uc

unsigned char alias

Definition at line 226 of file Point3d.hpp.

typedef slip::Point3d<unsigned int> slip::Point3d_ui

unsigned int alias

Definition at line 222 of file Point3d.hpp.

typedef slip::Point3d<unsigned long> slip::Point3d_ul

unsigned long alias

Definition at line 214 of file Point3d.hpp.

typedef slip::Point3d<unsigned short> slip::Point3d_us

unsigned long alias

Definition at line 218 of file Point3d.hpp.

char alias

Definition at line 269 of file Point4d.hpp.

typedef slip::Point4d<double> slip::Point4d_d

double alias

Definition at line 253 of file Point4d.hpp.

float alias

Definition at line 255 of file Point4d.hpp.

int alias

Definition at line 265 of file Point4d.hpp.

long alias

Definition at line 257 of file Point4d.hpp.

short alias

Definition at line 261 of file Point4d.hpp.

typedef slip::Point4d<unsigned char> slip::Point4d_uc

unsigned char alias

Definition at line 271 of file Point4d.hpp.

typedef slip::Point4d<unsigned int> slip::Point4d_ui

unsigned int alias

Definition at line 267 of file Point4d.hpp.

typedef slip::Point4d<unsigned long> slip::Point4d_ul

unsigned long alias

Definition at line 259 of file Point4d.hpp.

typedef slip::Point4d<unsigned short> slip::Point4d_us

unsigned long alias

Definition at line 263 of file Point4d.hpp.

double alias

Definition at line 1309 of file RegularVector2dField2d.hpp.

float alias

Definition at line 1311 of file RegularVector2dField2d.hpp.

double alias

Definition at line 1305 of file RegularVector2dField2d.hpp.

float alias

Definition at line 1307 of file RegularVector2dField2d.hpp.

double alias

Definition at line 1847 of file RegularVector3dField3d.hpp.

float alias

Definition at line 1849 of file RegularVector3dField3d.hpp.

double alias

Definition at line 1843 of file RegularVector3dField3d.hpp.

float alias

Definition at line 1845 of file RegularVector3dField3d.hpp.

char alias

Definition at line 1330 of file RegularVector2dField2d.hpp.

double alias

Definition at line 1314 of file RegularVector2dField2d.hpp.

float alias

Definition at line 1316 of file RegularVector2dField2d.hpp.

int alias

Definition at line 1326 of file RegularVector2dField2d.hpp.

long alias

Definition at line 1318 of file RegularVector2dField2d.hpp.

short alias

Definition at line 1322 of file RegularVector2dField2d.hpp.

unsigned char alias

Definition at line 1332 of file RegularVector2dField2d.hpp.

unsigned int alias

Definition at line 1328 of file RegularVector2dField2d.hpp.

unsigned long alias

Definition at line 1320 of file RegularVector2dField2d.hpp.

unsigned long alias

Definition at line 1324 of file RegularVector2dField2d.hpp.

char alias

Definition at line 1868 of file RegularVector3dField3d.hpp.

double alias

Definition at line 1852 of file RegularVector3dField3d.hpp.

float alias

Definition at line 1854 of file RegularVector3dField3d.hpp.

int alias

Definition at line 1864 of file RegularVector3dField3d.hpp.

long alias

Definition at line 1856 of file RegularVector3dField3d.hpp.

short alias

Definition at line 1860 of file RegularVector3dField3d.hpp.

unsigned char alias

Definition at line 1870 of file RegularVector3dField3d.hpp.

unsigned int alias

Definition at line 1866 of file RegularVector3dField3d.hpp.

unsigned long alias

Definition at line 1858 of file RegularVector3dField3d.hpp.

unsigned long alias

Definition at line 1862 of file RegularVector3dField3d.hpp.

char alias

Definition at line 1107 of file Signal.hpp.

typedef slip::Signal<double> slip::Signal_d

double alias

Definition at line 1091 of file Signal.hpp.

typedef slip::Signal<float> slip::Signal_f

float alias

Definition at line 1093 of file Signal.hpp.

int alias

Definition at line 1103 of file Signal.hpp.

long alias

Definition at line 1095 of file Signal.hpp.

typedef slip::Signal<short> slip::Signal_s

short alias

Definition at line 1099 of file Signal.hpp.

typedef slip::Signal<unsigned char> slip::Signal_uc

unsigned char alias

Definition at line 1109 of file Signal.hpp.

typedef slip::Signal<unsigned int> slip::Signal_ui

unsigned int alias

Definition at line 1105 of file Signal.hpp.

typedef slip::Signal<unsigned long> slip::Signal_ul

unsigned long alias

Definition at line 1097 of file Signal.hpp.

typedef slip::Signal<unsigned short> slip::Signal_us

unsigned long alias

Definition at line 1101 of file Signal.hpp.

char alias

Definition at line 397 of file Vector2d.hpp.

double alias

Definition at line 381 of file Vector2d.hpp.

float alias

Definition at line 383 of file Vector2d.hpp.

int alias

Definition at line 393 of file Vector2d.hpp.

long alias

Definition at line 385 of file Vector2d.hpp.

short alias

Definition at line 389 of file Vector2d.hpp.

typedef slip::Vector2d<unsigned char> slip::Vector2d_uc

unsigned char alias

Definition at line 399 of file Vector2d.hpp.

typedef slip::Vector2d<unsigned int> slip::Vector2d_ui

unsigned int alias

Definition at line 395 of file Vector2d.hpp.

typedef slip::Vector2d<unsigned long> slip::Vector2d_ul

unsigned long alias

Definition at line 387 of file Vector2d.hpp.

typedef slip::Vector2d<unsigned short> slip::Vector2d_us

unsigned long alias

Definition at line 391 of file Vector2d.hpp.

char alias

Definition at line 414 of file Vector3d.hpp.

double alias

Definition at line 398 of file Vector3d.hpp.

float alias

Definition at line 400 of file Vector3d.hpp.

int alias

Definition at line 410 of file Vector3d.hpp.

long alias

Definition at line 402 of file Vector3d.hpp.

short alias

Definition at line 406 of file Vector3d.hpp.

typedef slip::Vector3d<unsigned char> slip::Vector3d_uc

unsigned char alias

Definition at line 416 of file Vector3d.hpp.

typedef slip::Vector3d<unsigned int> slip::Vector3d_ui

unsigned int alias

Definition at line 412 of file Vector3d.hpp.

typedef slip::Vector3d<unsigned long> slip::Vector3d_ul

unsigned long alias

Definition at line 404 of file Vector3d.hpp.

typedef slip::Vector3d<unsigned short> slip::Vector3d_us

unsigned long alias

Definition at line 408 of file Vector3d.hpp.

char alias

Definition at line 432 of file Vector4d.hpp.

double alias

Definition at line 416 of file Vector4d.hpp.

float alias

Definition at line 418 of file Vector4d.hpp.

int alias

Definition at line 428 of file Vector4d.hpp.

long alias

Definition at line 420 of file Vector4d.hpp.

short alias

Definition at line 424 of file Vector4d.hpp.

typedef slip::Vector4d<unsigned char> slip::Vector4d_uc

unsigned char alias

Definition at line 434 of file Vector4d.hpp.

typedef slip::Vector4d<unsigned int> slip::Vector4d_ui

unsigned int alias

Definition at line 430 of file Vector4d.hpp.

typedef slip::Vector4d<unsigned long> slip::Vector4d_ul

unsigned long alias

Definition at line 422 of file Vector4d.hpp.

typedef slip::Vector4d<unsigned short> slip::Vector4d_us

unsigned long alias

Definition at line 426 of file Vector4d.hpp.

char alias

Definition at line 1093 of file Vector.hpp.

typedef slip::Vector<double> slip::Vector_d

double alias

Definition at line 1077 of file Vector.hpp.

typedef slip::Vector<float> slip::Vector_f

float alias

Definition at line 1079 of file Vector.hpp.

int alias

Definition at line 1089 of file Vector.hpp.

long alias

Definition at line 1081 of file Vector.hpp.

typedef slip::Vector<short> slip::Vector_s

short alias

Definition at line 1085 of file Vector.hpp.

typedef slip::Vector<unsigned char> slip::Vector_uc

unsigned char alias

Definition at line 1095 of file Vector.hpp.

typedef slip::Vector<unsigned int> slip::Vector_ui

unsigned int alias

Definition at line 1091 of file Vector.hpp.

typedef slip::Vector<unsigned long> slip::Vector_ul

unsigned long alias

Definition at line 1083 of file Vector.hpp.

typedef slip::Vector<unsigned short> slip::Vector_us

unsigned long alias

Definition at line 1087 of file Vector.hpp.

char alias

Definition at line 3644 of file Volume.hpp.

typedef slip::Volume<double> slip::Volume_d

double alias

Definition at line 3628 of file Volume.hpp.

typedef slip::Volume<float> slip::Volume_f

float alias

Definition at line 3630 of file Volume.hpp.

int alias

Definition at line 3640 of file Volume.hpp.

long alias

Definition at line 3632 of file Volume.hpp.

typedef slip::Volume<short> slip::Volume_s

short alias

Definition at line 3636 of file Volume.hpp.

typedef slip::Volume<unsigned char> slip::Volume_uc

unsigned char alias

Definition at line 3646 of file Volume.hpp.

typedef slip::Volume<unsigned int> slip::Volume_ui

unsigned int alias

Definition at line 3642 of file Volume.hpp.

typedef slip::Volume<unsigned long> slip::Volume_ul

unsigned long alias

Definition at line 3634 of file Volume.hpp.

typedef slip::Volume<unsigned short> slip::Volume_us

unsigned long alias

Definition at line 3638 of file Volume.hpp.

Enumeration Type Documentation

Choose between different border treatment modes for convolution algorithms.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/27
Since
1.0.0
{
// do not operate on a point where the kernel does
// not fit in the signal
// zero-padded
// repeat the nearest valid pixel
// periodize signal at last row/column
//reflect signal at last row/column
//copy signal at last row/column
};
Enumerator
BORDER_TREATMENT_AVOID 
BORDER_TREATMENT_ZERO_PADDED 
BORDER_TREATMENT_NEUMANN 
BORDER_TREATMENT_CIRCULAR 
BORDER_TREATMENT_REFLECT 
BORDER_TREATMENT_COPY 

Definition at line 117 of file border_treatment.hpp.

Choose between different types of crosscorrelation.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/31
Since
1.0.0
enum
{
// Standard algorithm
CC,
// Centered crosscorrelation algorithm
// Pseudo normalized crosscorrelation algorithm
//Normalized crosscorrelation algorithm
};
Enumerator
CC 
CCC 
PNCC 
NCC 

Definition at line 121 of file correlation.hpp.

Enumerator
RQ 
direct 

Definition at line 92 of file camera_algo.hpp.

Indicate the type of a dense matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/02
Since
1.0.0
Enumerator
DENSE_MATRIX_FULL 
DENSE_MATRIX_DIAGONAL 
DENSE_MATRIX_UPPER_BIDIAGONAL 
DENSE_MATRIX_LOWER_BIDIAGONAL 
DENSE_MATRIX_TRIDIAGONAL 
DENSE_MATRIX_UPPER_TRIANGULAR 
DENSE_MATRIX_LOWER_TRIANGULAR 
DENSE_MATRIX_BANDED 
DENSE_MATRIX_UPPER_HESSENBERG 
DENSE_MATRIX_LOWER_HESSENBERG 
DENSE_MATRIX_NULL 

Definition at line 134 of file linear_algebra.hpp.

Choose between different directions in a 4D space.

Version
Fluex 1.0
Date
2013/08/26
Since
1.4.0
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
The axial convention are the following~:
Conventions_4d_Space.jpg
4D spatial direction convention
{
//oparates in the time direction
// operates in the slice direction
//operates in the row direction
// operates in the col direction
};
Enumerator
T_DIRECTION 
S_DIRECTION 
R_DIRECTION 
C_DIRECTION 

Definition at line 824 of file derivatives.hpp.

Choose between different neighbourhood.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2013/11/12
enum
{
//unidimensional connexity neighbourhood
// 4-connexity neighbourhood
// hexagonal odd connexity neighbourhood
// hexagonal even connexity neighbourhood
// 8-connexity neighbourhood
// 6_connexity 3d neighbourhood
// 18_connexity 3d neighbourhood
// 26_connexity 3d neighbourhood
// 8_connexity 4d neighbourhood (added for Fluex V1.0)
};
connexity.jpg
Connexity neighbourghood conventions
Enumerator
N_2_C 
N_4_C 
N_6o_C 
N_6e_C 
N_8_C 
N_6_C 
N_18_C 
N_26_C 
N_4D_8_C 

Definition at line 119 of file neighbors.hpp.

Choose between different border treatment modes for convolution algorithms.

Since
1.0.0
enum NORMALIZATION_FUNTION
{
// T([a,b]) = [0,1], with T an affine transformation
//
//
};
Enumerator
AFFINE_FUNCTION 
NORMAL_FUNCTION 
SIGMOID_FUNCTION 

Definition at line 107 of file dynamic.hpp.

Choose between different plane orientations.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/02/13
enum
{
// Perpendicular to k axis
// Perpendicular to i axis
// Perpendicular to j axis
};
iterator3d_plane_conventions.jpg
axis and notation conventions
Enumerator
IJ_PLANE 
KJ_PLANE 
KI_PLANE 

Definition at line 109 of file iterator3d_plane.hpp.

Choose between different spatial directions.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/11/26
Since
1.0.0
The axial convention are the following~:
spatial_directions.jpg
spatial direction convention
{
// operates in the x direction
//operates in the y direction
// operates in the z direction
};
Enumerator
X_DIRECTION 
Y_DIRECTION 
Z_DIRECTION 

Definition at line 120 of file derivatives.hpp.

Function Documentation

template<typename T , std::size_t N>
kvector<typename slip::lin_alg_traits<T>::value_type,N> slip::abs ( const kvector< T, N > &  V)
related

Definition at line 1435 of file KVector.hpp.

template<typename T >
Vector<typename slip::lin_alg_traits<T>::value_type> slip::abs ( const Vector< T > &  V)
related

Definition at line 2013 of file Vector.hpp.

template<typename T >
Signal<typename slip::lin_alg_traits<T>::value_type> slip::abs ( const Signal< T > &  V)
related

Definition at line 2026 of file Signal.hpp.

template<typename T >
Matrix<typename slip::lin_alg_traits<T>::value_type> slip::abs ( const Matrix< T > &  M)
related

Definition at line 3892 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::abs ( const HyperVolume< T > &  M)
related
Examples:
edge_detection.cpp, fft2d.cpp, and test_math.cpp.

Definition at line 5064 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::abs ( const Matrix4d< T > &  M)
related

Definition at line 5073 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::abs ( const Matrix3d< T > &  M)
related

Definition at line 5714 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::abs ( const Volume< T > &  M)
related

Definition at line 6031 of file Volume.hpp.

template<std::size_t N>
kvector<float,N> slip::acos ( const kvector< float, N > &  V)
related

Definition at line 1464 of file KVector.hpp.

template<std::size_t N>
kvector<double,N> slip::acos ( const kvector< double, N > &  V)
related

Definition at line 1473 of file KVector.hpp.

template<std::size_t N>
kvector<long double,N> slip::acos ( const kvector< long double, N > &  V)
related

Definition at line 1482 of file KVector.hpp.

Vector<float> slip::acos ( const Vector< float > &  V)
related

Definition at line 2041 of file Vector.hpp.

Vector<double> slip::acos ( const Vector< double > &  V)
related

Definition at line 2049 of file Vector.hpp.

Signal<float> slip::acos ( const Signal< float > &  V)
related

Definition at line 2054 of file Signal.hpp.

Vector<long double> slip::acos ( const Vector< long double > &  V)
related

Definition at line 2057 of file Vector.hpp.

Signal<double> slip::acos ( const Signal< double > &  V)
related

Definition at line 2062 of file Signal.hpp.

Signal<long double> slip::acos ( const Signal< long double > &  V)
related

Definition at line 2070 of file Signal.hpp.

Matrix<float> slip::acos ( const Matrix< float > &  M)
related

Definition at line 3920 of file Matrix.hpp.

Matrix<double> slip::acos ( const Matrix< double > &  M)
related

Definition at line 3928 of file Matrix.hpp.

Matrix<long double> slip::acos ( const Matrix< long double > &  M)
related

Definition at line 3936 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::acos ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5092 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::acos ( const Matrix4d< T > &  M)
related

Definition at line 5101 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::acos ( const Matrix3d< T > &  M)
related

Definition at line 5742 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::acos ( const Volume< T > &  M)
related

Definition at line 6059 of file Volume.hpp.

template<typename _II , typename _OI >
void slip::add_border ( _II  first,
_II  last,
_OI  out_first,
_OI  out_last,
const slip::BORDER_TREATMENT  border,
const std::size_t  b_size = 1 
)

Adds the border of the range [first,last) according to the border condtion border and the border size b_size.

Since
1.0.0
Parameters
firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
lastRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
out_firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
borderslip::BORDER_TREATMENT border condition.
b_sizeSize of the border (1 by default).
Precondition
first, last and out_first must be of the same iterator_category.
(out_last-out_first) >= (in_last-in_first)+2*(b_size)
Example:
//The input grayscale image
slip::iota(I2.begin(),I2.end(),1.0);
//The enlarged grayscale image
slip::GrayscaleImage<double> tmp2(I2.rows()+(2*b_size),
I2.cols()+(2*b_size));
//add border to I2 in tmp2 with slip::BORDER_TREATMENT_NEUMANN conditions
//and a border size of 2
std::size_t b_size = 2;
tmp2.upper_left(),tmp2.bottom_right(),

Definition at line 1191 of file border_treatment.hpp.

template<typename Container1 , typename Container2 >
void slip::add_border1d ( const Container1 &  in,
const slip::BORDER_TREATMENT  border_type,
Container2 &  out,
const std::size_t  border_size = 1 
)

Adds the border at a 1d container according to the border condition border and the border size b_size.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2013/11/30
Since
1.4.0
Parameters
ininput container.
border_typeslip::BORDER_TREATMENT border condition.
outoutput container.
b_sizeSize of the border (1 by default).
Postcondition
out.size() == (in.size() + 2 * border_size)
Example:
slip::iota(in1d.begin(),in1d.end(),1.0);
const std::size_t border_size1 = 2;
border_type,
out1d,
border_size1);
std::cout<<"in1d = \n"<<in1d<<std::endl;
std::cout<<"out1d = \n"<<out1d<<std::endl;

Definition at line 1230 of file border_treatment.hpp.

template<typename Container2d1 , typename Container2d2 >
void slip::add_border2d ( const Container2d1 &  in,
const slip::BORDER_TREATMENT  border_type,
Container2d2 &  out,
const std::size_t  border_size = 1 
)

Adds the border at a 2d container according to the border condition border and the border size b_size.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2013/11/30
Since
1.4.0
Parameters
ininput container.
border_typeslip::BORDER_TREATMENT border condition.
outoutput container.
b_sizeSize of the border (1 by default).
Postcondition
out.rows() == (in.rows() + 2 * border_size)
out.cols() == (in.cols() + 2 * border_size)
Example:
slip::iota(in2d.begin(),in2d.end(),1.0);
const std::size_t border_size2 = 2;
border_type,
out2d,
border_size2);
std::cout<<"in2d = \n"<<in2d<<std::endl;
std::cout<<"out2d = \n"<<out2d<<std::endl;
Examples:
median_filter.cpp, median_filter_ind_unsafeN.cpp, and median_filter_unsafeN.cpp.

Definition at line 1270 of file border_treatment.hpp.

template<typename Container3d1 , typename Container3d2 >
void slip::add_border3d ( const Container3d1 &  in,
const slip::BORDER_TREATMENT  border_type,
Container3d2 &  out,
const std::size_t  border_size = 1 
)

Adds the border at a 3d container according to the border condition border and the border size b_size.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2013/11/30
Since
1.4.0
Parameters
ininput container.
border_typeslip::BORDER_TREATMENT border condition.
outoutput container.
b_sizeSize of the border (1 by default).
Postcondition
out.slices() == (in.slices() + 2 * border_size)
out.rows() == (in.rows() + 2 * border_size)
out.cols() == (in.cols() + 2 * border_size)
Example:
slip::iota(in3d.begin(),in3d.end(),1.0);
const std::size_t border_size3 = 2;
border_type,
out3d,
border_size3);
std::cout<<"in3d = \n"<<in3d<<std::endl;
std::cout<<"out3d = \n"<<out3d<<std::endl;

Definition at line 1313 of file border_treatment.hpp.

template<typename Container4d1 , typename Container4d2 >
void slip::add_border4d ( const Container4d1 &  in,
const slip::BORDER_TREATMENT  border_type,
Container4d2 &  out,
const std::size_t  border_size = 1 
)

Adds the border at a 4d container according to the border condition border and the border size b_size.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2013/11/30
Since
1.4.0
Parameters
ininput container.
border_typeslip::BORDER_TREATMENT border condition.
outoutput container.
b_sizeSize of the border (1 by default).
Postcondition
out.slabs() == (in.slabs() + 2 * border_size)
out.slices() == (in.slices() + 2 * border_size)
out.rows() == (in.rows() + 2 * border_size)
out.cols() == (in.cols() + 2 * border_size)
Example:
slip::Array4d<double> in4d(2,2,4,5);
slip::iota(in4d.begin(),in4d.end(),1.0);
const std::size_t border_size4 = 2;
border_type,
out4d,
border_size4);
std::cout<<"in4d = \n"<<in4d<<std::endl;
std::cout<<"out4d = \n"<<out4d<<std::endl;

Definition at line 1360 of file border_treatment.hpp.

template<typename InputIterator , typename OutputIterator , typename Real >
void slip::add_gaussian_noise ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const Real  mean = Real(0.0),
const Real  var = Real(0.01) 
)
inline

Add a gaussian noise to a container.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/06/05
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
meanMean of the gaussian noise.
varStandard deviation of the gaussian noise.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::add_gaussian_noise(tab.begin(),tab.end(),noisy.begin(),1.0,0.02);

Definition at line 109 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void slip::add_gaussian_noise_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
const Real  mean = Real(0.0),
const Real  var = Real(0.01) 
)
inline

Add a gaussian noise to a container according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
preda predicate
meanMean of the gaussian noise.
varStandard deviation of the gaussian noise.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
Example:
bool lt5Predicate (const T& val)
{
return (val < T(15));
};
slip::Matrix<double> tab(5,5,100.0);
slip::iota(tab.begin(),tab.end(),1.0,1.0);
slip::add_gaussian_noise_if(tab.begin(),tab.end(),noisy.begin(),lt5Predicate<double>,1.0,0.02);

Definition at line 204 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void slip::add_gaussian_noise_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
const Real  mean = Real(0.0),
const Real  var = Real(0.01),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Add a gaussian noise to a container according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
mask_firstAn inputIterator.
resultbegin OutputIterator on results
meanMean of the gaussian noise.
varStandard deviation of the gaussian noise.
valuetrue value of the mask range. Default is 1.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
[mask_first + (last-first)) is a valid range
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::Matrix<int> Mask(5,5,0);
mask(0,0)=1;mask(1,1)=1; mask(2,2)=1; mask(3,3)=1; mask(4,4)=1;
slip::add_gaussian_mask(tab.begin(),tab.end(),Mask.begin(),noisy.begin(),1.0,0.02,1);

Definition at line 150 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real >
void slip::add_salt_and_pepper_noise ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const Real  density = Real(0.05),
const typename std::iterator_traits< OutputIterator >::value_type  salt_value = typename std::iterator_traits<OutputIterator>::value_type(1.0),
const typename std::iterator_traits< OutputIterator >::value_type  pepper_value = typename std::iterator_traits<OutputIterator>::value_type(0.0) 
)
inline

Add a salt and pepper noise to a container.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/06/05
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end Inputiterator on datas
resultbegin OutputIterator on results
densityDensity of noisy items
salt_valueValue used for "white" items
pepper_valueValue used for "black" items
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
0 <= density <= 1
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::add_salt_and_pepper_noise(tab.begin(),tab.end(),noisy.begin(),0.20,0.0,255.0);

Definition at line 558 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void slip::add_salt_and_pepper_noise_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
const Real  density = Real(0.05),
const Real  salt_value = Real(1.0),
const Real  pepper_value = Real(0.0) 
)
inline

Add a salt and pepper noise to a container according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
predA predicate.
densityDensity of noisy items
salt_valueValue used for "white" items
pepper_valueValue used for "black" items
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
0 <= density <= 1
Example:
bool lt5Predicate (const T& val)
{
return (val < T(15));
};
slip::Matrix<double> tab(5,5,100.0);
slip::iota(tab.begin(),tab.end(),1.0,1.0);
slip::add_salt_and_pepper_noise_if(tab.begin(),tab.end(),noisy.begin(),lt5Predicate<double>,0.20,0.0,255.0);

Definition at line 703 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void slip::add_salt_and_pepper_noise_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
const Real  density = Real(0.05),
const Real  salt_value = Real(1.0),
const Real  pepper_value = Real(0.0),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Add a salt and pepper noise to a container according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
mask_firstAn inputIterator.
resultbegin OutputIterator on results
densityDensity of noisy items
salt_valueValue used for "white" items
pepper_valueValue used for "black" items
valuetrue value of the mask range. Default is 1.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
[mask_first + (last-first)) is a valid range
0 <= density <= 1
The input and output container must have the same size.
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::Matrix<int> mask(5,5,0);
mask(0,0)=1;mask(1,1)=1; mask(2,2)=1; mask(3,3)=1; mask(4,4)=1;
slip::add_salt_and_pepper_noise_mask(tab.begin(),tab.end(),mask.begin(),noisy.begin(),0.20,0.0,255.0,1);

Definition at line 625 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real >
void slip::add_speckle_noise ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const Real  var = 0.04 
)
inline

Add a speckle noise to a container.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/06/05
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
varStandard deviation of the speckle noise.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
0 <= var <= 1
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::add_speckle_noise(tab.begin(),tab.end(),noisy.begin(),0.04);

Definition at line 255 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void slip::add_speckle_noise_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
const Real  var = 0.04 
)
inline

Add a speckle noise to a container according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
preda predicate
varStandard deviation of the speckle noise.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
0 <= var <= 1
Example:
bool lt5Predicate (const T& val)
{
return (val < T(15));
};
slip::Matrix<double> tab(5,5,100.0);
slip::iota(tab.begin(),tab.end(),1.0,1.0);
slip::add_speckle_noise_if(tab.begin(),tab.end(),noisy.begin(),lt5Predicate<double>,0.04);

Definition at line 358 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void slip::add_speckle_noise_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
const Real  var = 0.04,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Add a speckle noise to a container according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
mask_firstAn inputIterator.
resultbegin OutputIterator on results
varStandard deviation of the speckle noise.
valuetrue value of the mask range. Default is 1.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
[mask_first + (last-first)) is a valid range
0 <= var <= 1
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::Matrix<int> Mask(5,5,0);
mask(0,0)=1;mask(1,1)=1; mask(2,2)=1; mask(3,3)=1; mask(4,4)=1;
slip::add_speckle_noise_mask(tab.begin(),tab.end(),Mask.begin(),noisy.begin(),0.04,1);

Definition at line 300 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real >
void slip::add_uniform_noise ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const Real  min = Real(0.0),
const Real  max = Real(1.0) 
)
inline

Add a uniform noise to a container.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/06/05
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin. OutputIterator on results
minMinimum noise value
maxMaximum noise value
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::add_uniform_noise(tab.begin(),tab.end(),noisy.begin(),-1.0,1.0);

Definition at line 410 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename Predicate >
void slip::add_uniform_noise_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
const Real  min = Real(0.0),
const Real  max = Real(1.0) 
)
inline

Add a uniform noise to a container according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
resultbegin OutputIterator on results
predan predicate.
minMinimum noise value
maxMaximum noise value
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
Example:
bool lt5Predicate (const T& val)
{
return (val < T(15));
};
slip::Matrix<double> tab(5,5,100.0);
slip::iota(tab.begin(),tab.end(),1.0,1.0);
slip::add_uniform_noise_if(tab.begin(),tab.end(),noisy.begin(),lt5Predicate<double>,-1.0,1.0);

Definition at line 507 of file noise.hpp.

template<typename InputIterator , typename OutputIterator , typename Real , typename MaskIterator >
void slip::add_uniform_noise_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
const Real  min = Real(0.0),
const Real  max = Real(1.0),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Add a uniform noise to a container according to mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator on datas
lastpast-to-end InputIterator on datas
mask_firstAn inputIterator.
resultbegin OutputIterator on results
minMinimum noise value
maxMaximum noise value
valuetrue value of the mask range. Default is 1.
Precondition
[first, last) is a valid range
[result + (last-first)) is a valid range
[mask_first + (last-first)) is a valid range
The input and output container must have the same size.
Example:
slip::Matrix<double> tab(5,5,100.0);
slip::Matrix<int> mask(5,5,0);
mask(0,0)=1;mask(1,1)=1; mask(2,2)=1; mask(3,3)=1; mask(4,4)=1;
slip::add_uniform_noise_mask(tab.begin(),tab.end(),mask.begin(),noisy.begin(),-1.0,1.0,1);

Definition at line 453 of file noise.hpp.

template<typename MatrixIterator1 >
slip::DENSE_MATRIX_TYPE slip::analyse_matrix ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Analyse the type of a matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container.
A_bot2D iterator on the bottom_right element of A container.
tolTolerance (epsilon by default).
Returns
slip::DENSE_MATRIX_TYPE type of the dense matrix.
Example:

Definition at line 4785 of file linear_algebra.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::apply ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator >::value_type)  function 
)
inline

Applies a C-function to each element of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn OutputIterator.
functionA one parameter C-function.

Applies the C-function function to each element in the input range and assigns the results to successive elements of the output range. Applies the following code

for (;first!=last;++first,++result)
result=(*function)(*first);
Precondition
[first,last) must be valid.
The size of the result range must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of a square function
float sqr(const float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply sqr to each element of M
slip::apply(M.begin(),M.end(),M.begin(),sqr);

Definition at line 128 of file apply.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::apply ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator >::value_type &)  function 
)
inline

Applies a C-function to each element of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Version
0.0.2
Since
1.0.0
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn OutputIterator.
functionA one const-parameter C-function.

Applies the C-function function to each element in the input range and assigns the results to successive elements of the output range. Applies the following code

for (;first!=last;++first,++result)
result=(*function)(*first);
Precondition
[first,last) must be valid.
The size of the result range must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of a square function
float sqr(const float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply sqr to each element of M
slip::apply(M.begin(),M.end(),M.begin(),sqr);

Definition at line 292 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::apply ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type)  function 
)
inline

Applies a two-parameter C-function to each element of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
functionA two-parameter C-function.

Applies the C-function function to each element in the two input ranges and assigns the results to successive elements of the output range. Applies the following code

for (;first!=last;++first,++first2,++result)
*result=(*function)(*first,*first2);
Precondition
[first,last) must be valid.
The sizes of the second input and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges ones.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
//apply atimesb to M and M2 and copy the result in M3
slip::apply(M.begin(),M.end(),M2.begin(),M3.begin(),atimesb);

Definition at line 469 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::apply ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &)  function 
)
inline

Applies a two-const-parameter C-function to each element of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
functionA two-parameter C-function.

Applies the C-function function to each element in the two input ranges and assigns the results to successive elements of the output range. Applies the following code

for (;first!=last;++first,++first2,++result)
*result=(*function)(*first,*first2);
Precondition
[first,last) must be valid.
The sizes of the second input and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges one.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
//apply atimesb to M and M2 and copy the result in M3
slip::apply(M.begin(),M.end(),M2.begin(),M3.begin(),atimesb);

Definition at line 664 of file apply.hpp.

template<typename InputIterator , typename OutputIterator , typename Predicate >
void slip::apply_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator >::value_type)  function 
)
inline

Applies a C-function to each element of a range according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Version
0.0.2
Since
1.0.0
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn OutputIterator.
predA predicate.
functionA one parameter C-function.
Precondition
[first,last) must be valid.
The size of the result range must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
//definition of a square function
float sqr(const float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply sqr to each element of M
slip::apply_if(M.begin(),M.end(),M.begin(),lt5Predicate<float>,sqr);

Definition at line 232 of file apply.hpp.

template<typename InputIterator , typename OutputIterator , typename Predicate >
void slip::apply_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator >::value_type &)  function 
)
inline

Applies a C-function to each element of a range according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn OutputIterator.
predA predicate.
functionA one parameter C-function.
Precondition
[first,last) must be valid.
The size of the result range must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
//definition of a square function
float sqr(const float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
//apply sqr to each element of M
slip::apply_if(M.begin(),M.end(),M.begin(),lt5Predicate<float>,sqr);

Definition at line 401 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename Predicate >
void slip::apply_if ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
OutputIterator  result,
Predicate  pred,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type)  function 
)
inline

Applies a C-function to each element of a range according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
predA predicate.
functionA two-parameter C-function
Precondition
[first,last) must be valid.
The sizes of the second input and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges ones.
The output parameter of the function must have the same value type as the output range one.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
//apply atimesb to M and M2 and copy the result in M3
slip::apply_if(M.begin(),M.end(),M2.begin(),M3.begin(),lt5Predicate<float>,atimesb);

Definition at line 594 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename Predicate >
void slip::apply_if ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
OutputIterator  result,
Predicate  pred,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &)  function 
)
inline

Applies a C-function to each element of a range according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
predA predicate.
functionA two-parameter C-function
Precondition
[first,last) must be valid.
The sizes of the second input and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges ones.
The output parameter of the function must have the same value type as the output range one.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
//apply atimesb to M and M2 and copy the result in M3
slip::apply_if(M.begin(),M.end(),M2.begin(),M3.begin(),lt5Predicate<float>,atimesb);

Definition at line 785 of file apply.hpp.

template<typename InputIterator , typename OutputIterator , typename MaskIterator >
void slip::apply_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator >::value_type)  function,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Applies a C-function to each element of a range according to a mask range.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Version
0.0.2
Since
1.0.0
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator.
resultAn OutputIterator.
functionA one parameter C-function.
valuetrue value of the mask range. Default is 1.
Precondition
[first,last) must be valid.
The size of the mask and result ranges must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of a square function
float sqr(float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
int f[]={1,1,1,0,1,1,0,1,0};
slip::Array2d<int>Mask(3,3,f);
//apply sqr to each element of M
slip::apply_mask(M.begin(),M.end(),Mask.begin(),M.begin(),sqr,1);

Definition at line 175 of file apply.hpp.

template<typename InputIterator , typename OutputIterator , typename MaskIterator >
void slip::apply_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator >::value_type &)  function,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Applies a C-function to each element of a range according to a mask range.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator.
resultAn OutputIterator.
functionA one parameter C-function.
valuetrue value of the mask range. Default is 1.
Precondition
[first,last) must be valid.
The size of the result and mask range must be greater or equal than the input range one.
The input parameter of the function must have the same value type as the input range one.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of a square function
float sqr(const float x)
{
return x * x;
}
//construction of an Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
int f[]={1,1,1,0,1,1,0,1,0};
slip::Array2d<int>Mask(3,3,f);
//apply sqr to each element of M
slip::apply_mask(M.begin(),M.end(),Mask.begin(),M.begin(),sqr,1);

Definition at line 342 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename MaskIterator >
void slip::apply_mask ( InputIterator1  first,
InputIterator1  last,
MaskIterator  mask_first,
InputIterator2  first2,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(typename std::iterator_traits< InputIterator1 >::value_type, typename std::iterator_traits< InputIterator2 >::value_type)  function,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Applies a C-function to each element of a range according to a mask range.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Version
0.0.2
Since
1.0.0
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
functionA two-parameter C-function
valuetrue value of the mask range. Default is 1.
Precondition
[first,last) must be valid.
The sizes of the second input, mask and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges ones.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
int f[]={1,1,1,0,1,1,0,1,0};
slip::Array2d<int>Mask(3,3,f);
//apply atimesb to M and M2 and copy the result in M3
slip::apply_mask(M.begin(),M.end(),Mask.begin(),M2.begin(),M3.begin(),atimesb,1);

Definition at line 525 of file apply.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename MaskIterator >
void slip::apply_mask ( InputIterator1  first,
InputIterator1  last,
MaskIterator  mask_first,
InputIterator2  first2,
OutputIterator  result,
typename std::iterator_traits< OutputIterator >::value_type(*)(const typename std::iterator_traits< InputIterator1 >::value_type &, const typename std::iterator_traits< InputIterator2 >::value_type &)  function,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Applies a C-function to each element of a range according to a mask range.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/05/16
Version
0.0.2
Since
1.0.0
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
resultAn OutputIterator.
functionA two-parameter C-function
valuetrue value of the mask range. Default is 1.
Precondition
[first,last) must be valid.
The sizes of the second input, mask and result ranges must be greater or equal than the first input range one.
The input parameters of the function must have the same value type as the input ranges ones.
The output parameter of the function must have the same value type as the output range one.
Example:
//definition of binary function
float atimesb(const float& a, const float& b)
{
return a * b;
}
//construction of the Array2d
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::Array2d<float> M3(M.dim1(),M.dim2());
int f[]={1,1,1,0,1,1,0,1,0};
slip::Array2d<int>Mask(3,3,f);
//apply atimesb to M and M2 and copy the result in M3
slip::apply_mask(M.begin(),M.end(),Mask.begin(),M2.begin(),M3.begin(),atimesb,1);

Definition at line 719 of file apply.hpp.

template<std::size_t N>
kvector<float,N> slip::asin ( const kvector< float, N > &  V)
related

Definition at line 1501 of file KVector.hpp.

template<std::size_t N>
kvector<double,N> slip::asin ( const kvector< double, N > &  V)
related

Definition at line 1510 of file KVector.hpp.

template<std::size_t N>
kvector<long double,N> slip::asin ( const kvector< long double, N > &  V)
related

Definition at line 1519 of file KVector.hpp.

Vector<float> slip::asin ( const Vector< float > &  V)
related

Definition at line 2076 of file Vector.hpp.

Vector<double> slip::asin ( const Vector< double > &  V)
related

Definition at line 2084 of file Vector.hpp.

Signal<float> slip::asin ( const Signal< float > &  V)
related

Definition at line 2089 of file Signal.hpp.

Vector<long double> slip::asin ( const Vector< long double > &  V)
related

Definition at line 2092 of file Vector.hpp.

Signal<double> slip::asin ( const Signal< double > &  V)
related

Definition at line 2097 of file Signal.hpp.

Signal<long double> slip::asin ( const Signal< long double > &  V)
related

Definition at line 2105 of file Signal.hpp.

Matrix<float> slip::asin ( const Matrix< float > &  M)
related

Definition at line 3954 of file Matrix.hpp.

Matrix<double> slip::asin ( const Matrix< double > &  M)
related

Definition at line 3962 of file Matrix.hpp.

Matrix<long double> slip::asin ( const Matrix< long double > &  M)
related

Definition at line 3970 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::asin ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5110 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::asin ( const Matrix4d< T > &  M)
related

Definition at line 5119 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::asin ( const Matrix3d< T > &  M)
related

Definition at line 5760 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::asin ( const Volume< T > &  M)
related

Definition at line 6077 of file Volume.hpp.

template<std::size_t N>
kvector<float,N> slip::atan ( const kvector< float, N > &  V)
related

Definition at line 1539 of file KVector.hpp.

template<std::size_t N>
kvector<double,N> slip::atan ( const kvector< double, N > &  V)
related

Definition at line 1548 of file KVector.hpp.

template<std::size_t N>
kvector<long double,N> slip::atan ( const kvector< long double, N > &  V)
related

Definition at line 1557 of file KVector.hpp.

Vector<float> slip::atan ( const Vector< float > &  V)
related

Definition at line 2109 of file Vector.hpp.

Vector<double> slip::atan ( const Vector< double > &  V)
related

Definition at line 2117 of file Vector.hpp.

Signal<float> slip::atan ( const Signal< float > &  V)
related

Definition at line 2122 of file Signal.hpp.

Vector<long double> slip::atan ( const Vector< long double > &  V)
related

Definition at line 2125 of file Vector.hpp.

Signal<double> slip::atan ( const Signal< double > &  V)
related

Definition at line 2130 of file Signal.hpp.

Signal<long double> slip::atan ( const Signal< long double > &  V)
related

Definition at line 2138 of file Signal.hpp.

Matrix<float> slip::atan ( const Matrix< float > &  M)
related

Definition at line 3988 of file Matrix.hpp.

Matrix<double> slip::atan ( const Matrix< double > &  M)
related

Definition at line 3996 of file Matrix.hpp.

Matrix<long double> slip::atan ( const Matrix< long double > &  M)
related

Definition at line 4004 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::atan ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp, and test_quaternion.cpp.

Definition at line 5128 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::atan ( const Matrix4d< T > &  M)
related

Definition at line 5137 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::atan ( const Matrix3d< T > &  M)
related

Definition at line 5778 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::atan ( const Volume< T > &  M)
related

Definition at line 6095 of file Volume.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::autocorrelation ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::autocorrelation(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1581 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::autocorrelation_full ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == 2*(last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(2*V.size()-1);
slip::autocorrelation_full(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1518 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::autocovariance ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the autocovariance from lag -(last-first) to 0 of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::autocovariance(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1750 of file correlation.hpp.

template<typename AT , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::aXpY ( const AT &  a,
RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2  first2 
)
inline

Computes the saxpy ("scalar a x plus b") for each element of two ranges x and y.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
aA scalar value
first1iterator to the beginning of the first sequence (X)
last1iterator to the end of the first sequence (X)
first2iterator to the beginning of the second sequence (Y)
Precondition
[first1, last1) must be valid.
The two range must have the same size
Complexity: 2n flops

Definition at line 632 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::balance ( Matrix1 &  A,
Matrix2 &  D 
)
inline

applies a diagonal similarity transform to the square matrix A to make the rows and columns as close in norm as possible. Balancing may reduce the 1-norm of the matrix, and improves the accuracy of the computed eigenvalues and/or eigenvectors. To avoid round-off errors, balance scales A with powers of 2. A is replaced by the balanced matrix which has the same eigenvalues and singular values : $ A = D \times A \times D^{-1} $

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Since
1.0.0
Version
0.0.1
Parameters
A
Ddiagonal scaling matrix

Definition at line 110 of file linear_algebra_qr.hpp.

template<typename MatrixIterator1 , typename RandomAccessIterator >
int slip::band_lu ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const int  p,
const int  q,
RandomAccessIterator  Ind_first,
RandomAccessIterator  Ind_last,
typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type  precision 
)
inline

in place Band LU decomposition a square band Matrix A $ A = LU$ with L a p lower band matrix and U a q upper band matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : concepteur
Date
2009/03/05
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
pWidth of the lower band of A.
qWidth of the upper_band of A
Ind_firstRandomAccessIterator to the first element of the permutation vector.
Ind_lastRandomAccessIterator to one past-the-end element of the permutation vector.
precision
Precondition
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(A_bot - A_up)[1] == (Ind_last - Ind_first)
p < (A_bot - A_up)[0]
q < (A_bot - A_up)[0]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular.
a partial pivoting strategy is used.
Complexity: npq - pq^2/2 - p^3/6 + pn if p <= q, npq -qp^2/2 - q^3/6 + qn if p > q

Definition at line 6773 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 , class Matrix4 >
int slip::band_lu ( const Matrix1 &  M,
const int  p,
const int  q,
Matrix2 &  L,
Matrix3 &  U,
Matrix4 &  P,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision 
)
inline

in place Band LU decomposition a square band Matrix A $ A = PLU$ with L a p lower band matrix and U a q upper band matrix and P the permutation matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/05
Since
1.0.0
Version
0.0.1
Parameters
MThe matrix M.
pWidth of the lower band of A.
qWidth of the upper_band of A.
LThe matrix L.
UThe matrix U.
PThe matrix P.
precision
Precondition
A must be square
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(A_bot - A_up)[1] == (Ind_last - Ind_first)
p < (A_bot - A_up)[0]
q < (A_bot - A_up)[0]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular.
a partial pivoting strategy is used.
Complexity: npq - pq^2/2 - p^3/6 + pn if p <= q, npq -qp^2/2 - q^3/6 + qn if p > q
Example:
slip::fill_diagonal(Aband,1.0,0);
slip::fill_diagonal(Aband,2.0,1);
slip::fill_diagonal(Aband,-2.0,-1);
slip::fill_diagonal(Aband,3.0,2);
slip::fill_diagonal(Aband,-3.0,-2);
std::cout<<"Aband = \n"<<Aband<<std::endl;
slip::Array<int> Indxband(5);
slip::band_lu(Aband,2,2,AbandL,AbandU,Pband,1.0E-6);
std::cout<<"Pband = \n"<<Pband<<std::endl;
std::cout<<"AbandL = \n"<<AbandL<<std::endl;
std::cout<<"AbandU = \n"<<AbandU<<std::endl;
slip::Array2d<double> PxAbandL(5,5);
slip::matrix_matrix_multiplies(Pband,AbandL,PxAbandL);
slip::Array2d<double> PxAbandLxAbandU(5,5);
slip::matrix_matrix_multiplies(PxAbandL,AbandU, PxAbandLxAbandU);
std::cout<<"PxAbandLxAbandU = \n"<<PxAbandLxAbandU<<std::endl;

Definition at line 6902 of file linear_algebra.hpp.

template<typename Vector , typename SizeType >
void slip::BdBacksearch ( Vector &  d,
Vector &  e,
const typename slip::lin_alg_traits< typename Vector::value_type >::value_type  tol,
SizeType &  l,
SizeType &  i1,
SizeType &  i2 
)

Back searching a bidiagonal Matrix this algorithm takes a bidiagobal matrix B, a tolerance tol and an index l(0<=l<=p-1) and determines indices i1,i2<=l such one of the following condictions holds 1) 0<=i1<i2<=l, in which case the matrix deflates as rows i1 and i2. 2) 0=i1=i2, in which case all the superdiagonal elements of B in rows 0 through l-1 are zero.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/1/07
Since
1.0.0
Version
0.0.1
Parameters
dThe diagonal vector of B.
eThe lower diagonal vector of B.
tolthe relative error we can expect from setting the curent superdiagonal to zero
lmaximum index
i1first index
i2second index
Precondition
d.size() == (e.size() + 1)
l < d.size()
i1 < d.size()
i2 < d.size()

Definition at line 459 of file linear_algebra_svd.hpp.

template<typename Matrix , typename Vector >
void slip::Bi_complex_to_real ( Vector &  d,
Vector &  e,
Matrix &  U,
Matrix &  V 
)

BiQR Given an upper bidiagonal matrix B, Bi_complex_to_real transforms the complex bidiagonal form into a real form. The tranformations from the left are accumulmated in the matrix U and the transformations from the right in the matrix V.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/1/07
Since
1.0.0
Version
0.0.1
Parameters
U2D Container of the tranformations from the left n*p
V2D Container of the transformations from the right p*p
d1D Container size p
e1D Container.size p-1
Precondition
d.size() == U.cols()
(d.size()-1) == e.size()
V.rows() == V.cols()
U.cols() == V.rows()

Definition at line 277 of file linear_algebra_svd.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::biased_autocorrelation ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the biased autocorrelations from lag -(last-first) to (last-first) of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \frac{1}{N}\sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::biased_autocorrelation(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1642 of file correlation.hpp.

template<typename RandomAccessIterator , typename Matrix >
void slip::biased_autocorrelation_matrix ( RandomAccessIterator  first,
RandomAccessIterator  last,
Matrix &  A 
)
inline

Constructs the biased autocorrelation matrix from given a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/22
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of the data.
lastRandomAccessIterator to one past-the-end element of the data.
AThe resulting biased autocorrelation matrix.
Precondition
(A.cols() == A.rows())
A.rows == last - first
Example:
slip::iota(Vtoep.begin(),Vtoep.end(),1.0);
std::cout<<"Vtoeplitz = \n"<<Vtoep<<std::endl;
slip::Matrix<float> Atoep(Vtoep.size(),Vtoep.size());
slip::biased_autocorrelation_matrix(Vtoep.begin(),Vtoep.end(),Atoep);
std::cout<<"Atoeplitz = \n"<<Atoep<<std::endl;

Definition at line 1914 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::biased_autocovariance ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the biased autocovariance from lag -(last-first) to 0 of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::biased_autocovariance(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1813 of file correlation.hpp.

template<typename RandomAccessIterator , typename Matrix >
void slip::biased_autocovariance_matrix ( RandomAccessIterator  first,
RandomAccessIterator  last,
Matrix &  A 
)
inline

Constructs the biased autocorrelation matrix from given a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/22
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of the data.
lastRandomAccessIterator to one past-the-end element of the data.
AThe resulting biased autocovariance matrix.
Precondition
(A.cols() == A.rows())
A.rows == last - first
Example:
slip::iota(Vtoep.begin(),Vtoep.end(),1.0);
std::cout<<"Vtoeplitz = \n"<<Vtoep<<std::endl;
slip::Matrix<float> Atoep(Vtoep.size(),Vtoep.size());
slip::biased_autocovariance_matrix(Vtoep.begin(),Vtoep.end(),Atoep);
std::cout<<"Atoeplitz = \n"<<Atoep<<std::endl;

Definition at line 1953 of file correlation.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::binarize ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const typename std::iterator_traits< InputIterator >::value_type &  t_value,
const typename std::iterator_traits< OutputIterator >::value_type &  false_value,
const typename std::iterator_traits< OutputIterator >::value_type &  true_value 
)
inline

binarize algorithm

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/14
Version
0.0.1
Parameters
firstbegin InputIterator of the range to binarize
lastpast-the-end InputIterator of the range to binarize
resultbegin OutputIterator of the resulting range
t_valuebinarize value
false_valueresult value when *first <= t_value
true_valueresult value when *first > t_value
Precondition
[first, last) must be valid.
[result, result + (last-first)) must be valid.
Example:
//values less than 8 are set to 2 other are set to 266
slip::iota(M.begin(),M.end(),0.0,1.0);
slip::Matrix<int> Result(4,5);
slip::binarize(M.begin(),M.end(),Result.begin(),8.0f,2,255);

Definition at line 194 of file threshold.hpp.

template<typename Matrix , typename Vector , typename Real , typename SizeType >
void slip::BiQR ( Vector &  d,
Vector &  e,
Real &  sigma,
const SizeType &  row1,
const SizeType &  row2,
Matrix &  U,
Matrix &  V 
)

BiQR Given an upper bidiagonal matrix B and a shift sigma, BiQR performs a QR step between rows row1 ans row2. The tranformations from the left are accumulmated in the matrix U and the transformations from the right in the matrix V.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/1/07
Since
1.0.0
Version
0.0.1
Parameters
d1D Container size p
e1D Container.size p-1
sigmashift value.
row1first row index.
row2second row index.
U2D Container of the tranformations from the left n*p
V2D Container of the transformations from the right p*p
Precondition
d.size() == U.cols()
(d.size()-1) == e.size()
V.rows() == V.cols()
U.cols() == V.rows()

Definition at line 343 of file linear_algebra_svd.hpp.

template<typename Matrix1 , typename Vector , typename Matrix2 , typename Matrix3 >
void slip::BiReduce ( Matrix1 &  X,
Vector &  d,
Vector &  e,
Matrix2 &  U,
Matrix3 &  V 
)

BiReduce. Given an n*p matrix X with n>=p Bireduce reduce X to an upper bidiagola form The tranformations from the left are accumulmated in the n*p matrix U and the transformations from the right in the matrix V. on return X contains the genrators of the householder transformation used in the reduction X=U[d,e]V.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/1/07
Since
1.0.0
Version
0.0.1
Parameters
X2D Container of the input Matrix n*p
U2D Container of the tranformations from the left n*p
V2D Container of the transformations from the right p*p
d1D Container
e1D Container.
Precondition
X.rows() >= X.rows()
U.rows() == X.rows()
U.cols() == X.cols()
V.rows() == V.cols()
V.rows() == X.cols()
d.size() == X.rows()
(e.size() + 1) == X.rows()
Note
BiReduce returns V^H not V.
Example:
slip::iota(X.begin(),X.end(),1.0,1.0);
slip::Matrix<double> U(X.rows(),X.cols());
slip::Matrix<double> V(X.cols(),X.cols());
slip::Vector<double>e(X.cols()-1);
slip::BiReduce(X,d,e,U,V);
slip::fill(d,e,S);
std::cout<<"d"<<d<<std::endl;
std::cout<<"e"<<e<<std::endl;
std::cout<<"U="<<std::endl<<U<<std::endl;
std::cout<<"V="<<std::endl<<V<<std::endl;
std::cout<<"S="<<std::endl<<S<<std::endl;
slip::Matrix<double> US(U.rows(),S.cols());
slip::Matrix<double> USV(U.rows(),V.cols());
std::cout<<"USV="<<std::endl<<USV<<std::endl;

Definition at line 148 of file linear_algebra_svd.hpp.

unsigned int slip::bitReverse ( unsigned int  x,
const int  log2n 
)
inline

bitReverse function used in the Cooley-Tukey FFT algorithm

Parameters
xInteger to reverse
log2nThe log2 of the dimension
Returns
the bit reversed integer

Definition at line 116 of file FFT.hpp.

template<typename Integer , typename InputIterator >
Integer slip::cardinal ( InputIterator  first,
InputIterator  last 
)
inline

Computes the cardinal or the number of elements of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
The number of elements of the container.
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
std::cout<<"cardinal = "<<slip::cardinal<int>(M.begin(),M.end())<<std::endl;

Definition at line 285 of file statistics.hpp.

template<typename Integer , typename InputIterator , typename Predicate >
Integer slip::cardinal_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the cardinal or the number of elements of a range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
preda predicate function
Returns
The number of elements of the range.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::cardinal_if<int>(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 2605 of file statistics.hpp.

template<typename Integer , typename MaskIterator >
Integer slip::cardinal_mask ( MaskIterator  mask_first,
MaskIterator  mask_last,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the cardinal or the number of elements of a mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
mask_firstAn InputIterator of a mask Iterator.
mask_lastAn InputIterator of a mask Iterator.
valueMask value.
Returns
The number of elements of the range.
Precondition
[mask_first,mask_last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout<<slip::cardinal_mask<int>(ValuedMask.begin(),ValuedMask.end(),2)<<std::endl;

Definition at line 2221 of file statistics.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 >
T slip::cc ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2 
)
inline

Computes the standard crosscorrelation between two sequences: $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
Returns
A value equals to the standard crosscorrelation of the two sequences
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::cc<float>(M.begin(),M.end(),M2.begin())<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::cc<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 339 of file correlation.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
T slip::cc_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the standard crosscorrelation between two sequences according to a Predicate. $ \sum_i x_i y_i $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::cc_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 429 of file correlation.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
T slip::cc_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the standard crosscorrelation between two sequences according to a mask sequence $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges accordind to a mask sequence and adds each product according to the mask range into the accumulated value using operator+(). The values in the ranges are processed in order.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
std::cout<<slip::cc_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 382 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::ccc ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the centered crosscorrelation between two sequences: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::ccc<float>(M.begin(),M.end(),M2.begin())<<std::endl;
float mean1 = slip::mean<float>(M.begin(),M.end());
float mean2 = slip::mean<float>(M2.begin(),M2.end());
std::cout<<slip::ccc<float>(M.begin(),M.end(),M2.begin(),mean1,mean2)<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::ccc<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 669 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::ccc_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard crosscorrelation between two sequences according to a Predicate: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean_if1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean_if2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::ccc_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean_if1,mean_if2)<<std::endl;

Definition at line 768 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::ccc_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the centered crosscorrelation between two sequences according to a mask sequence $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::ccc_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),mean1,mean2,1)<<std::endl;

Definition at line 715 of file correlation.hpp.

template<typename RandomAccessIterator , typename RandomAccessIterator2 >
void slip::center ( RandomAccessIterator  first,
RandomAccessIterator  last,
RandomAccessIterator2  out_first 
)

Substracts its mean to a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of the range.
lastRandomAccessIterator to one past-the-end element of the range.
out_firstRandomAccessIterator to the first element of the range.
Precondition
The two range must have the same size.
The value type of the range should be compatible with those of the mean value of the range.
Example:
slip::iota(Mc.begin(),Mc.end(),1.0);
std::cout<<"Mc = \n"<<Mc<<std::endl;
std::cout<<"center(Mc) = "<<std::endl;
slip::center(Mc.begin(),Mc.end(),Mc2.begin());
std::cout<<"Mc2 = \n"<<Mc2<<std::endl;

Definition at line 1381 of file statistics.hpp.

template<typename InputIterator , typename Predicate , typename OutputIterator >
void slip::center_if ( InputIterator  first,
InputIterator  last,
Predicate  pred,
OutputIterator  out_first 
)
inline

Substracts its mean to a range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
preda predicate function
out_firstAn OutputIterator
Precondition
[first,last) must be valid.
the two range must have the same size.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
slip::iota(M.begin(),M.end(),0.0);
slip::center_if(M.begin(),M.end(),myPredicate,Mcif2.begin());
std::cout<<"Mcif2 = \n"<<Mcif2<<std::endl;

Definition at line 3548 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void slip::center_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  out_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Substracts its mean to a range according a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
mask_firstAn InputIterator on the mask
out_firstAn OuputIterator.
valueMask value.
Precondition
[first,last) must be valid.
The two ranges and the Mask must have the same dimensions
The value type of the range should be compatible with those of the mean value of the range.
Example:
slip::iota(Mcmask.begin(),Mcmask.end(),1.0);
std::cout<<"Mcmask = \n"<<Mcmask<<std::endl;
slip::Array2d<float> Mcmask2(4,5);
slip::center_mask(Mcmask.begin(),Mcmask.end(),
ValuedMask.begin(),
Mcmask2.begin(),2);
std::cout<<"Mcmask2 = \n"<<Mcmask2<<std::endl;

Definition at line 2490 of file statistics.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::centered_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the centered crosscorrelation between two sequences: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::centered_crosscorrelation<float>(M.begin(),M.end(),M2.begin())<<std::endl;
float mean1 = slip::mean<float>(M.begin(),M.end());
float mean2 = slip::mean<float>(M2.begin(),M2.end());
std::cout<<slip::centered_crosscorrelation<float>(M.begin(),M.end(),M2.begin(),mean1,mean2)<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::centered_crosscorrelation<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 488 of file correlation.hpp.

template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::centered_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the centered crosscorrelation between two Images.

Author
Denis Arrivault <denis.arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/30
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
Precondition
[in1_upper_left,in1_bottom_right) is valid
[in2_upper_left,in2_upper_left + (in1_bottom_right - in1_upper_left)) must be valid.
(out_bottom_right - out_upper_left) == (in1_bottom_right - in1_upper_left)
the value_type of the input sequences have to be real (not complex)

Definition at line 2147 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::centered_crosscorrelation_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard crosscorrelation between two sequences according to a Predicate: $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last) (0 by default).
mean2mean value of the second range [first2, first2 + (last-first)) (0 by default).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::centered_crosscorrelation_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean1,mean2)<<std::endl;

Definition at line 601 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::centered_crosscorrelation_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the centered crosscorrelation between two sequences according to a mask sequence $ \sum_i (x_i-mean(x))(y_i-mean(y)) $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::centered_crosscorrelation_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),mean1,mean2,1)<<std::endl;

Definition at line 542 of file correlation.hpp.

template<typename InputIterator , typename OutputIterator , typename UnaryOperation >
void slip::change_dynamic ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
UnaryOperation  dynamic_fun 
)
inline

Changes the dynamic of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/05
Since
1.0.0
Version
0.0.1
Parameters
firstbegin iterator of the input container
lastpast-the-end iterator of the input container
resultbegin iterator of the result container
dynamic_funUnary function
Precondition
containers must have the same sizes.
Example 1:
slip::iota(M.begin(,M.end(),1.0f,1.0f);
slip::Matrix<int> Result(10,10);
slip::change_dynamic(M.begin(),M.end(),Result.begin(),fun);
std::cout<<Result<<std::endl;
Example2:
slip::iota(M.begin(,M.end(),1.0,1.0);
slip::Matrix<int> Result(10,10);
slip::range_fun_interab<double,int> funab(M.min(),M.max(),0,200);
slip::change_dynamic(M.begin(),M.end(),Result.begin(),funab);
std::cout<<Result<<std::endl;
Examples:
fits_file_io.cpp.

Definition at line 357 of file dynamic.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::change_dynamic_01 ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
slip::NORMALIZATION_FUNCTION  fun 
)
inline

Changes the dynamic of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/10
Since
1.0.0
Version
0.0.1
Parameters
firstInputIterator on the container.
lastInputIterator on the container.
resultOutputIterator on the result container.
funNORMALIZATION_FUNCTION : AFFINE_FUNCTION,SIGMOID_FUNCTION
Precondition
containers must have the same sizes
Example:
Examples:
color_edge_detection.cpp, edge_detection.cpp, fft2d.cpp, fft_crosscorrelation2d.cpp, regularvector2dfield2d_op.cpp, and regularvector3dfield3d_op.cpp.

Definition at line 495 of file dynamic.hpp.

template<typename InputIterator , typename OutputIterator , typename UnaryOperation , typename Predicate >
void slip::change_dynamic_if ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
Predicate  pred,
UnaryOperation  dynamic_fun 
)
inline

Changes the dynamic of a container according to a predicate.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn output iterator.
predpredicate.
dynamic_funUnary function
Precondition
containers must have the same sizes.
Example1:
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(250));
}
slip::iota(M.begin(,M.end(),1.0f,1.0f);
slip::Matrix<int> Result(10,10);
slip::change_dynamic_if(M.begin(),M.end(),Result.begin(),lt5Predicate<float>,fun);
std::cout<<Result<<std::endl;
Example2:
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(250));
}
slip::iota(M.begin(,M.end(),1.0f,1.0f);
slip::Matrix<int> Result(10,10);
slip::range_fun_interab<double,int> funab(M.min(),M.max(),0,200);
slip::change_dynamic_if(M.begin(),M.end(),Result.begin(),lt5Predicate<float>,funab);
std::cout<<Result<<std::endl;

Definition at line 464 of file dynamic.hpp.

template<typename InputIterator , typename OutputIterator , typename MaskIterator , typename UnaryOperation >
void slip::change_dynamic_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  result,
UnaryOperation  dynamic_fun,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Changes the dynamic of a container according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/16
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
resultAn output iterator.
mask_firstAn input iterator.
dynamic_funUnary function
valuetrue value of the mask range. Default is 1.
Precondition
containers must have the same sizes.
Example 1:
slip::iota(M.begin(,M.end(),1.0f,1.0f);
slip::Matrix<int> Result(10,10);
slip::Matrix<float> Mask(10,10,1);
slip::change_dynamic_mask(M.begin(),M.end(),Mask.begin(),Result.begin(),fun,1);
std::cout<<Result<<std::endl;
Example2:
slip::iota(M.begin(,M.end(),1.0,1.0);
slip::Matrix<int> Result(10,10);
slip::Matrix<float> Mask(10,10,1);
slip::range_fun_interab<double,int> funab(M.min(),M.max(),0,200);
slip::change_dynamic_mask(M.begin(),M.end(),Mask.begin(),Result.begin(),funab,1);
std::cout<<Result<<std::endl;

Definition at line 406 of file dynamic.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::chebyshev_nd_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Chebyshev multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Chebychev Polynomials of both the first and second kinds:

\[ 2xPk(x)-P_{k-1}\]

.

Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Example:
m01.powers[0] = 0;
m01.powers[1] = 0;
p0.insert(m01,1.0);
m11.powers[0] = 1;
m11.powers[1] = 0;
p1.insert(m11,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > chebyshev_basis_2d;
chebyshev_basis_2d.push_back(p0);
chebyshev_basis_2d.push_back(p1);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_2d.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,2> >(l, p1, chebyshev_basis_2d[l], chebyshev_basis_2d[l-1]));
}
for(unsigned l = 0; l < chebyshev_basis_2d.size(); ++l)
{
std::cout<<chebyshev_basis_2d[l]<<std::endl;
}

Definition at line 295 of file polynomial_algo.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::chebyshev_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Chebyshev polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Chebyshev Polynomials of both the first and second kinds:

\[ P_{k+1}(x) = 2xP_k(x)-P_{k-1}(x)\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/07
Version
0.0.1
Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Returns
Pk+1
Example 1:
std::vector<slip::Polynomial<double> > chebyshev_basis;
//creation of Chebyshev polynomial of the first kind basis
P1[0] = 0.0;
chebyshev_basis.push_back(P0);
chebyshev_basis.push_back(P1);
for(unsigned k = 1; k < 10; ++k)
{
chebyshev_basis.push_back(slip::chebyshev_next<slip::Polynomial<double> >(k, P1, chebyshev_basis[k], chebyshev_basis[k-1]));
}
for(std::size_t k = 0; k < chebyshev_basis.size(); ++k)
{
std::cout<<chebyshev_basis[k]<<std::endl;
}
Example 2:
std::vector<slip::Polynomial<double> > chebyshev_basis;
//creation of Chebyshev polynomial of the second kind basis
P1[0] = 0.0;
chebyshev_basis.push_back(P0);
chebyshev_basis.push_back(P1);
for(unsigned k = 1; k < 10; ++k)
{
chebyshev_basis.push_back(slip::chebyshev_next<slip::Polynomial<double> >(k, P1, chebyshev_basis[k], chebyshev_basis[k-1]));
}
for(std::size_t k = 0; k < chebyshev_basis.size(); ++k)
{
std::cout<<chebyshev_basis[k]<<std::endl;
}

Definition at line 244 of file polynomial_algo.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::Chi2_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the Chi2 "distance" of two ranges : $ \sum_i ((s_i-b_i)*(s_i-b_i)/s_i)$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
the Chi2 "distance" between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Chi2_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1921 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::Chi2_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)
inline

Computes the Chi2 "distance" of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
the Chi2 "distance" between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Chi2_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 2020 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::Chi2_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the Chi2 "distance" of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} ((s_i-b_i)*(s_i-b_i)/s_i)$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
the Chi2 "distance" between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::Chi2_distance_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1964 of file compare.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::cholesky ( const Matrix1 &  A,
Matrix2 &  L,
Matrix3 &  LT 
)
inline

cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A2D container.
L2D container.
LT2D container.
Precondition
A must be square and positive definite
A.rows() == A.cols()
L.rows() == L.cols()
LH.rows() == LH.cols()
A.rows() == L.rows()
A.rows() == LH.rows()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky(Cholc,LCholc,LCholTc);
std::cout<<"LCholc = "<<std::endl;
std::cout<<LCholc<<std::endl;
std::cout<<"LChol^Tc = "<<std::endl;
std::cout<<LCholTc<<std::endl;
slip::matrix_matrix_multiplies(LCholc,LCholTc,LCholxLCholTc);
std::cout<<"LCholxLChol^Tc = "<<std::endl;
std::cout<<LCholxLCholTc<<std::endl;

Definition at line 10290 of file linear_algebra.hpp.

template<class Matrix1 >
void slip::cholesky ( Matrix1 &  A)
inline

cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^H$ is stored in the upper triangular part of A.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A2D container.
Precondition
A must be square and positive definite
A.rows() == A.cols()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky(Cholc,LCholc,LCholTc);
std::cout<<"LCholc = "<<std::endl;
std::cout<<LCholc<<std::endl;
std::cout<<"LChol^Tc = "<<std::endl;
std::cout<<LCholTc<<std::endl;
slip::matrix_matrix_multiplies(LCholc,LCholTc,LCholxLCholTc);
std::cout<<"LCholxLChol^Tc = "<<std::endl;
std::cout<<LCholxLCholTc<<std::endl;

Definition at line 10348 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::cholesky_cplx ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  L_up,
MatrixIterator2  L_bot,
MatrixIterator3  LH_up,
MatrixIterator3  LH_bot 
)
inline

cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
LH_up2D iterator corresponding to the upper_left element of the matrix LH
LH_bot2D iterator corresponding to one past-the-end bottom_right of the matrix LH
Precondition
A must be square and positive definite
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(L_bot - L_up)[0] == (L_bot - L_up)[1];
(LH_bot - LH_up)[0] == (LH_bot - LH_up)[1];
(A_bot - A_up)[0] == (L_bot - L_up)[0];
(A_bot - A_up)[0] == (LH_bot - LH_up)[0];
(L_bot - L_up)[0] == (LH_bot - LH_up)[0];
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky_cplx(Cholc.upper_left(),Cholc.bottom_right(),
LCholc.upper_left(),LCholc.bottom_right(),
LCholTc.upper_left(),LCholTc.bottom_right());
std::cout<<"LCholc = "<<std::endl;
std::cout<<LCholc<<std::endl;
std::cout<<"LChol^Tc = "<<std::endl;
std::cout<<LCholTc<<std::endl;
slip::matrix_matrix_multiplies(LCholc,LCholTc,LCholxLCholTc);
std::cout<<"LCholxLChol^Tc = "<<std::endl;
std::cout<<LCholxLCholTc<<std::endl;

Definition at line 9822 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
void slip::cholesky_cplx ( MatrixIterator1  A_up,
MatrixIterator1  A_bot 
)
inline

cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^H$ is stored in the upper triangular part of A.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
Precondition
A must be square and positive definite
(A_bot - A_up)[0] == (A_bot - A_up)[1];
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky_cplx(Cholc.upper_left(),Cholc.bottom_right());
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;

Definition at line 9913 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::cholesky_cplx ( const Matrix1 &  A,
Matrix2 &  L,
Matrix3 &  LT 
)
inline

cholesky decomposition of a square hermitian positive definite Matrix. $ A = LL^H$ with L a lower triangular matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A2D container.
L2D container.
LT2D container.
Precondition
A must be square and positive definite
A.rows() == A.cols()
L.rows() == L.cols()
LH.rows() == LH.cols()
A.rows() == L.rows()
A.rows() == LH.rows()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky_cplx(Cholc,LCholc,LCholTc);
std::cout<<"LCholc = "<<std::endl;
std::cout<<LCholc<<std::endl;
std::cout<<"LChol^Tc = "<<std::endl;
std::cout<<LCholTc<<std::endl;
slip::matrix_matrix_multiplies(LCholc,LCholTc,LCholxLCholTc);
std::cout<<"LCholxLChol^Tc = "<<std::endl;
std::cout<<LCholxLCholTc<<std::endl;

Definition at line 10235 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 >
void slip::cholesky_inv ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Ainv_up,
MatrixIterator2  Ainv_bot,
typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename MatrixIterator1::value_type>::value_type(1.0E-6) 
)
inline

cholesky inverse of a square hermitian positive definite Matrix A.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
Ainv_up2D iterator corresponding to the upper_left element of the inverse matrix.
Ainv_bot2D iterator corresponding to one past-the-end bottom_right of the inverse matrix.
precision1.0E-6 by default.
Precondition
A must be a square, real and positive definite matrix
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1];
(A_bot - A_up)[0] == (Ainv_bot - Ainv_up)[0]
(A_bot - A_up)[1] == (Ainv_bot - Ainv_up)[1]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: (13/6)n^3 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky_inv(Cholc.upper_left(),Cholc.bottom_right(),
invCholc.upper_left(),invCholc.bottom_right());
std::cout<<"invCholc = "<<std::endl;
std::cout<<invCholc<<std::endl;
slip::matrix_matrix_multiplies(Cholc,invCholc,ICholc);
std::cout<<"Cholc invCholc = "<<std::endl;
std::cout<<IChol2<<std::endl;

Definition at line 10550 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::cholesky_inv ( Matrix1  A,
Matrix2  Ainv,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Matrix1::value_type>::value_type(1.0E-6) 
)
inline

cholesky inverse of a square hermitian positive definite Matrix A.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
AThe matrix to invert.
AinvThe inverted matrix.
precision1.0E-6 by default.
Precondition
A must be a square, real and positive definite matrix
A.rows() == A.cols()
Ainv.rows() == Ainv.cols()
A.rows() == Ainv.rows()
(A_bot - A_up)[0] == (Ainv_bot - Ainv_up)[0]
(A_bot - A_up)[1] == (Ainv_bot - Ainv_up)[1]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: (13/6)n^3 flops + n std::sqrt
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
slip::cholesky_inv(Cholc,invCholc,1.0e-8);
std::cout<<"invCholc = "<<std::endl;
std::cout<<invCholc<<std::endl;
slip::matrix_matrix_multiplies(Cholc,invCholc,ICholc);
std::cout<<"Cholc invCholc = "<<std::endl;
std::cout<<IChol2<<std::endl;

Definition at line 10637 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::cholesky_real ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  L_up,
MatrixIterator2  L_bot,
MatrixIterator3  LH_up,
MatrixIterator3  LH_bot 
)
inline

cholesky decomposition of a square real symmetric and positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
LH_up2D iterator corresponding to the upper_left element of the matrix LH
LH_bot2D iterator corresponding to one past-the-end bottom_right of the matrix LH
Precondition
A must be a square, real and positive definite matrix
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(L_bot - L_up)[0] == (L_bot - L_up)[1];
(LH_bot - LH_up)[0] == (LH_bot - LH_up)[1];
(A_bot - A_up)[0] == (L_bot - L_up)[0];
(A_bot - A_up)[0] == (LH_bot - LH_up)[0];
(L_bot - L_up)[0] == (LH_bot - LH_up)[0];
Remarks
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
std::cout<<"Chol = "<<std::endl;
std::cout<<Chol<<std::endl;
slip::cholesky_real(Chol.upper_left(),Chol.bottom_right(),
LChol.upper_left(),LChol.bottom_right(),
LCholT.upper_left(),LCholT.bottom_right());
std::cout<<"LChol = "<<std::endl;
std::cout<<LChol<<std::endl;
std::cout<<"LChol^T = "<<std::endl;
std::cout<<LCholT<<std::endl;
slip::Array2d<float> LCholxLCholT(4,4);
slip::matrix_matrix_multiplies(LChol,LCholT,LCholxLCholT);
std::cout<<"LCholxLChol^T = "<<std::endl;
std::cout<<LCholxLCholT<<std::endl;

Definition at line 10008 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
void slip::cholesky_real ( MatrixIterator1  A_up,
MatrixIterator1  A_bot 
)
inline

cholesky decomposition of a square real symmetric and positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix. L is stored in the lower triangular part of A, $L^T$ is stored in the upper triangular part of A.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
Precondition
A must be a square, real and positive definite matrix
(A_bot - A_up)[0] == (A_bot - A_up)[1];
Remarks
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
std::cout<<"Chol = "<<std::endl;
std::cout<<Chol<<std::endl;
slip::cholesky_real(Chol.upper_left(),Chol.bottom_right());
std::cout<<"Chol = "<<std::endl;
std::cout<<Chol<<std::endl;

Definition at line 10093 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::cholesky_real ( const Matrix1 &  A,
Matrix2 &  L,
Matrix3 &  LT 
)
inline

cholesky decomposition of a square real symmetric positive definite Matrix. $ A = LL^T$ with L a lower triangular matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A2D container.
L2D container.
LT2D container.
Precondition
A must be square,real and positive definite.
A.rows() == A.cols()
L.rows() == L.cols()
LH.rows() == LH.cols()
A.rows() == L.rows()
A.rows() == LH.rows()
Remarks
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt
Example:
std::cout<<"Chol = "<<std::endl;
std::cout<<Chol<<std::endl;
slip::cholesky_real(Chol,LChol,LCholT);
std::cout<<"LChol = "<<std::endl;
std::cout<<LChol<<std::endl;
std::cout<<"LChol^T = "<<std::endl;
std::cout<<LCholT<<std::endl;
slip::Array2d<float> LCholxLCholT(4,4);
slip::matrix_matrix_multiplies(LChol,LCholT,LCholxLCholT);
std::cout<<"LCholxLChol^T = "<<std::endl;
std::cout<<LCholxLCholT<<std::endl;

Definition at line 10180 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::cholesky_solve ( MatrixIterator  A_up,
MatrixIterator  A_bot,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision = typename slip::lin_alg_traits<typename MatrixIterator::value_type>::value_type(1.0E-6) 
)
inline

cholesky solve of system AX = B with A a square hermitian positive definite Matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
X_firstRandomAccessIterator (points to the first element of X)
X_lastRandomAccessIterator (points to the one past the end element of X)
B_firstRandomAccessIterator (points to the first element of B)
B_lastRandomAccessIterator (points to the one past the end element of B)
precision1.0E-6 by default.
Precondition
A must be a square, real and positive definite matrix
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(A_bot - A_up)[1] == (X_last - X_first);
(X_last - X_first) == (B_last - B_first);
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt + 2 n^2 flops
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
std::complex<double> bcholc[] = {TC(1.0,0.2),TC(2.0,0.5),TC(3.0,0.5)};
std::cout<<"BCholc = "<<std::endl;
std::cout<<BCholc<<std::endl;
slip::cholesky_solve(Cholc.upper_left(),Cholc.bottom_right(),
XCholc.begin(),XCholc.end(),
BCholc.begin(),BCholc.end());
std::cout<<"XCholc = "<<std::endl;
std::cout<<XCholc<<std::endl;
slip::matrix_vector_multiplies(Cholc,XCholc,BChol2c);
std::cout<<"Cholc XCholc = "<<std::endl;
std::cout<<BChol2c<<std::endl;

Definition at line 10412 of file linear_algebra.hpp.

template<class Matrix1 , class Vector1 , class Vector2 >
void slip::cholesky_solve ( const Matrix1 &  A,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Matrix1::value_type>::value_type(1.0E-6) 
)
inline

cholesky solve of system AX = B with A a square hermitian positive definite Matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
A2D container.
X1D container.
B1D container.
precision1.0E-6 by default.
Precondition
A must be a square, real and positive definite matrix
A.rows() == A.cols();
A.cols() == X.size()
X.size() == B.size()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not positive definite
Complexity: n^3/6 flops + n std::sqrt + 2 n^2 flops
Example:
typedef std::complex<double> TC;
std::complex<double> dcholc[] = {TC(2.0,0.0),TC(1.0,1.0),TC(0.0,2.0),
TC(1.0,-1.0),TC(5.0,0.0),TC(-3.0,0.0),
TC(0.0,-2.0),TC(-3.0,0.0),TC(10.0,0.0)};
std::cout<<"Cholc = "<<std::endl;
std::cout<<Cholc<<std::endl;
std::complex<double> bcholc[] = {TC(1.0,0.2),TC(2.0,0.5),TC(3.0,0.5)};
std::cout<<"BCholc = "<<std::endl;
std::cout<<BCholc<<std::endl;
slip::cholesky_solve(Cholc,XCholc,BCholc);
std::cout<<"XCholc = "<<std::endl;
std::cout<<XCholc<<std::endl;
slip::matrix_vector_multiplies(Cholc,XCholc,BChol2c);
std::cout<<"Cholc XCholc = "<<std::endl;
std::cout<<BChol2c<<std::endl;

Definition at line 10490 of file linear_algebra.hpp.

template<typename RandomAccessIterator2d >
slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator2d>::value_type>::value_type slip::col_norm ( RandomAccessIterator2d  upper_left,
RandomAccessIterator2d  bottom_right 
)
inline

Computes the column norm ( $\max_i\sum_j |a_{ij}|$) of a 2d range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
upper_leftRandomAccessIterator2d: first element of the 2d range.
bottom_rightRandomAccessIterator2d: one past-the-end of the 2d range.
Returns
The column norm of the 2d range.
Precondition
bottom_right - upper_left != slip::Dpoint2d<int>(0,0)
Remarks
It corresponds to the infinite norm of a Matrix.
Works with real and complex matrix.
Complexity: rows*cols flops
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"col norm of M = "<<slip::col_norm(M.upper_left(),M.bottom_right())<<std::endl;

Definition at line 3214 of file linear_algebra.hpp.

template<typename Container2d >
slip::lin_alg_traits<typename Container2d::value_type>::value_type slip::col_norm ( const Container2d &  container)
inline

Computes the column norm ( $\max_i\sum_j |a_{ij}|$) of a Container2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
containerContainer2d.
Returns
The column norm of the 2d container.
Precondition
container.size() != 0
Remarks
It corresponds to the L1 norm of a Matrix.
Works with real and complex matrix.
Complexity: rows*cols flops
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"col norm of M = "<<slip::col_norm(M)<<std::endl;

Definition at line 3258 of file linear_algebra.hpp.

bool slip::compareTwoRows2D ( double *  rowA,
double *  rowB 
)

Comparator used to sort an Array2d.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2013/11/20
Since
1.4.0
Parameters
*rowAPointer to a 1st row.
*rowBPointer to a second row.
Bug:
The iterators are invalidated by the sort algorithm. Use [] operator to access data after a sorting operation.
Example:
// Create a Array2d and sort it by the 3rd column, then by the 2nd then by the 1st.
slip::iota(data.begin(), data.end(), 10., -1.);
for (size_t i = 0; i < data.dim1(); ++i)
{
slip::iota(data.row_begin(i), data.row_end(i), 10.-i*0.3);
for (size_t j = 2; j < data.dim2(); ++j)
{
data[i][j]=(int)data[i][j];
}
}
std::cout<<data<<endl<<endl;
data.sort(&compareTwoRows2D);
std::cout<<data<<endl<<endl;

Definition at line 2333 of file tecplot_binaries.hpp.

bool slip::compareTwoRows3D ( double *  rowA,
double *  rowB 
)

Comparator used to sort an Array2d.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2013/11/20
Since
1.4.0
Parameters
*rowAPointer to a 1st row.
*rowBPointer to a second row.
Bug:
The iterators are invalidated by the sort algorithm. Use [] operator to access data after a sorting operation.
Example:
// Create a Array2d and sort it by the 3rd column, then by the 2nd then by the 1st.
slip::iota(data.begin(), data.end(), 10., -1.);
for (size_t i = 0; i < data.dim1(); ++i)
{
slip::iota(data.row_begin(i), data.row_end(i), 10.-i*0.3);
for (size_t j = 2; j < data.dim2(); ++j)
{
data[i][j]=(int)data[i][j];
}
}
std::cout<<data<<endl<<endl;
data.sort(&compareTwoRows3D);
std::cout<<data<<endl<<endl;

Definition at line 1340 of file tecplot_binaries.hpp.

template<class InputIter , class OutputIter >
void slip::complex_fft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the complex fft of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate throw the input data
in_endA BidirectionalIterator at the end of the input data
out_beginA BidirectionalIterator to iterate throw the output data
Precondition
size(in) == size(out).
input data have to be std::complex
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
slip::Array<cx> Ic(N,cx(0));
std::copy(I.begin(),I.end(),Ic.begin());
slip::complex_fft(Ic.begin(),Ic.end(),b.begin());

Definition at line 2470 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::complex_fft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the complex fft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the 2d range must have the same sizes
input data have to be std::complex
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.

Definition at line 2585 of file FFT.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::complex_fft2d ( Matrix1 &  datain,
Matrix2 &  dataout 
)
inline

Computes the complex fft2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.

Definition at line 2707 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::complex_fft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the complex fft3d of a container with 3d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/10/22
Since
1.4.0
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the 3d range must have the same sizes
input data have to be std::complex
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::Volume<std::complex<double> > M of dimensions dim1, dim2, dim3;
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::Matrix3d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),Czero);
slip::complex_fft3d(M.front_upper_left(),M.back_bottom_right(),OFFT.front_upper_left());
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 2113 of file FFT.hpp.

template<typename Volume1 , typename Volume2 >
void slip::complex_fft3d ( Volume1 &  datain,
Volume2 &  dataout 
)
inline

Computes the complex fft3d of a container.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::Volume<std::complex<double> > M of dimensions dim1, dim2, dim3;
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::Matrix3d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),Czero);
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 2164 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::complex_fft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the complex fft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/10/22
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the 4d range must have the same sizes
input data have to be std::complex
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::HyperVolume<std::complex<double> > M of dimensions dim1, dim2, dim3 and dim4;
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::complex_fft4d(M.first_front_upper_left(),M.last_back_bottom_right(),OFFT.first_front_upper_left());
slip::HyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 3873 of file FFT.hpp.

template<typename HyperVolume1 , typename HyperVolume2 >
void slip::complex_fft4d ( const HyperVolume1 &  datain,
HyperVolume2 &  dataout 
)
inline

Computes the complex fft4d of a container.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/10/22
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::HyperVolume<std::complex<double> > M of dimensions dim1, dim2, dim3 and dim4;
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 4023 of file FFT.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::complex_fft_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
InputIterator2  last2,
OutputIterator  result_first,
OutputIterator  result_last 
)
inline

Computes the standard complex crosscorrelation between two sequences using fft.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr> (2007/14/04)
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : change the fft algorithm used
Date
2008/10/04
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
last2An InputIterator.
result_firstAn Output iterator.
result_lastAn Output iterator.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first,last) must be valid.
[first2,first2 + (last-first)) must be valid.
[result_first,result_first + (last-first)) must be valid.
Example:
typedef std::complex<double> TC;
std::complex<double> dxc[] = {TC(1.0,3.0), TC(2.0,0.0), TC(3.0,-1.0), TC(4.0,1.0)};
std::complex<double> dyc[] = {TC(-1.0,1.0), TC(2.0,-1.0), TC(1.0,0.0),TC(-1.0,-1.0)};
slip::Array<TC> xc(4,dxc);
slip::Array<TC> yc(4,dyc);
slip::Array<TC> convxyc(x.size()+y.size() - 1);
std::cout<<"xc = "<<xc<<std::endl;
std::cout<<"yc = "<<yc<<std::endl;
slip::complex_xcorr(xc.begin(),xc.end(),
yc.begin(),yc.end(),
convxyc.begin(),convxyc.end());
std::cout<<"fft xcorr(xc,yc) = "<<convxyc<<std::endl;

Definition at line 2473 of file correlation.hpp.

template<class InputIter , class OutputIter >
void slip::complex_fftw ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

complex fftw of a container (from fftw3.h).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
size(b) >= size(a).
the input and output data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1690 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::complex_fftw2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the complex fftw2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/04
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be complex
the 2d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1831 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::complex_fftw3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the complex fftw3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input and output data have to be std::complex
the 3d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 2037 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::complex_fftw3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the complex fftw3d of a container 3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 2275 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::complex_fftw4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the complex fftw4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the input and output data have to be std::complex
the 4d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 3563 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::complex_fftw4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the complex fftw4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain.slabs() == dataout.slabes()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 3734 of file FFT.hpp.

template<typename Complex >
void slip::complex_givens_sin_cos ( const Complex &  xi,
const Complex &  xk,
Complex &  sin,
typename Complex::value_type &  cos 
)
inline

Computes the complex Givens sinus and cosinus.

\[ R = \left( \begin{array}{cc} \cos \theta & -\overline{\sin \theta} \\ \sin \theta & \cos \theta\\ \end{array}\right) \]

\[ \cos \theta = \frac{|xi|}{\epsilon\sqrt{xi\overline{xi}+xk\overline{xk}}} \]

\[ \sin \theta = \frac{-xk}{\epsilon sign(xi)\sqrt{xi\overline{xi}+xk\overline{xk}}} \]

with

\[ \epsilon = sign{\mathcal{R}(xi)} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/13
Version
0.0.1
Parameters
xivalue at index i.
xkvalue at index k.
sinGivens sinus
cosGivens cosinus.
Complexity: 10 flops + 1 std::sqrt

Definition at line 10761 of file linear_algebra.hpp.

template<typename Matrix , typename SizeType , typename Complex >
void slip::complex_left_givens ( Matrix &  M,
const SizeType &  row1,
const SizeType &  row2,
const Complex &  sinus,
const typename Complex::value_type &  cosinus,
const SizeType &  col1,
const SizeType &  col2 
)
inline

Apply complex left Givens rotation multiplication.

Perform a left multiplication of a matrix M with the hermitian transpose Givens matrix on the row1 and row2 between the indices col1 and col2.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptator
Date
2008/10/14
Since
1.0.0
Version
0.0.1
Parameters
Mthe Container to multiply
row1the first row involved in the computation.
row2the second row involved in the computation.
sinusGivens sinus.
cosinusGivens cosinus.
col1the first column index.
col2the second column index.
Precondition
row1 and row2 must be within the Matrix indices range.
col1 and col2 must be within the Matrix indices range.
row1 should be less than row2.
col1 should be less than col2.
Complexity: 7 (col2-col1 + 1) flops

Definition at line 10885 of file linear_algebra.hpp.

template<typename Matrix , typename SizeType , typename Complex >
void slip::complex_right_givens ( Matrix &  M,
const SizeType &  col1,
const SizeType &  col2,
const Complex &  sinus,
const typename Complex::value_type &  cosinus,
const SizeType &  row1,
const SizeType &  row2 
)
inline

Apply complex right Givens rotation multiplication.

Perform a right multiplication of a matrix M with the Givens matrix on the col1 and col2 between the indices row1 and row2.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/14
Since
1.0.0
Version
0.0.1
Parameters
MThe Container to multiply
col1The first column involved in the computation.
col2The second column involved in the computation.
sinusGivens sinus.
cosinusGivens cosinus.
row1the first row index.
row2the second row index.
Precondition
row1 and row2 must be within the Matrix indices range.
col1 and col2 must be within the Matrix indices range.
row1 should be less than row2.
col1 should be less than col2.
Complexity: 7 (row2-row1 + 1) flops

Definition at line 10928 of file linear_algebra.hpp.

template<class InputIter , class OutputIter >
void slip::complex_split_radix_fft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the complex split radix fft of a container (from FFTPACK.hpp).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
size(b) >= size(a).
the input and output data have to be std::complex
Example:
...
slip::Array<cx> Ic(N,cx(0));
std::copy(I.begin(),I.end(),Ic.begin());
slip::complex_split_radix_fft(Ic.begin(),Ic.end(),b.begin());

Definition at line 828 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::complex_split_radix_fft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the complex split-radix fft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/01/29
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be complex
the 2d range must have the same sizes

Definition at line 984 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::complex_split_radix_fft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the complex split-radix fft3d of a container with 3d iterators.

Version
Fluex 1.0
Date
2013/10/22
Since
1.4.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be complex
the 3d range must have the same sizes

Definition at line 1303 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::complex_split_radix_fft3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the complex split-radix fft3d of a container 3d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/10/22
Since
1.4.0
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be complex

Definition at line 1359 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::complex_split_radix_fft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the complex split-radix fft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_leftinput start iterator4d
in_last_back_bottom_rightinput end interator4d
out_first_front_upper_leftoutput start iterator4d
Precondition
the input data have to be complex
the input and output container must have the same sizes

Definition at line 3206 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::complex_split_radix_fft4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the complex split-radix fft4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/10/22
Since
1.4.0
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be complex

Definition at line 3409 of file FFT.hpp.

std::string slip::compose_file_name ( const std::string &  file_path_name,
const std::size_t  img 
)
inline

Compose a file_name from the file name format basenamend*.ext.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2009/03/27
Since
1.0.0
Parameters
file_path_nameString of the file path name
imgNumber to format.
Returns
the resulting string
Remarks
This function substitute the last 3 characters length beginning by '' by img formated according to n.
Example1:
//print toto001.bmp, toto002.bmp..., toto005.bmp
for(std::size_t img = 1; img < 5; ++img)
{
std::cout<<slip::compose_file_name("toto%3d.bmp",img)<<std::endl;
}
Example2:
//print toto001_a.bmp, toto002_a.bmp..., toto005_a.bmp
for(std::size_t img = 1; img < 5; ++img)
{
std::cout<<slip::compose_file_name("toto%3d_a.bmp",img)<<std::endl;
}

Definition at line 203 of file io_tools.hpp.

int slip::conj ( const int  arg)
inline

Definition at line 122 of file complex_cast.hpp.

unsigned slip::conj ( const unsigned  arg)
inline

Definition at line 123 of file complex_cast.hpp.

long slip::conj ( const long  arg)
inline

Definition at line 124 of file complex_cast.hpp.

short slip::conj ( const short  arg)
inline

Definition at line 125 of file complex_cast.hpp.

char slip::conj ( const char  arg)
inline

Definition at line 126 of file complex_cast.hpp.

float slip::conj ( const float  arg)
inline

Definition at line 127 of file complex_cast.hpp.

double slip::conj ( const double  arg)
inline

Definition at line 128 of file complex_cast.hpp.

long double slip::conj ( const long double  arg)
inline

Definition at line 129 of file complex_cast.hpp.

template<typename T >
std::complex<T> slip::conj ( const std::complex< T > &  arg)
inline

Definition at line 131 of file complex_cast.hpp.

template<class Matrix1 , class Matrix2 >
void slip::conj ( const Matrix1 &  M,
Matrix2 &  CM 
)
inline

Computes the conjugate of a matrix $ CM = \overline{M} $.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/06/24
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
CMresult of the conjugate
Precondition
M, CM must have the double bracket element accessor
Matrix are supposed to be allocated first
M.rows() == CM.rows()
M.cols() == CM.cols()
Example:
Sshc(0,0) = std::complex<double>(0.0,1.0);
Sshc(0,1) = std::complex<double>(0.5,-0.5);
Sshc(0,2) = std::complex<double>(1.0,-1.2);
Sshc(1,0) = std::complex<double>(-0.5,-0.5);
Sshc(1,1) = std::complex<double>(0.0,2.0);
Sshc(1,2) = std::complex<double>(0.2,-0.3);
Sshc(2,0) = std::complex<double>(-1.0,-1.2);
Sshc(2,1) = std::complex<double>(-0.2,-0.3);
Sshc(2,2) = std::complex<double>(0.0,3.0);
std::cout<<"Sshc = \n"<<Sshc<<std::endl;
slip::conj(Sshc,conjSshc);
std::cout<<"conjSshc = \n"<<conjSshc<<std::endl;

Definition at line 2603 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename T , typename RandomAccessIterator2 >
void slip::conj_vector_scalar_multiplies ( RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
const T &  scal,
RandomAccessIterator2  result_first 
)
inline

Computes the multiplication of a vector $\overline{V}$ by a scalar scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the first element of the Vector.
V_lastRandomAccessIterator to one-past-the-end element of the vector.
scalA scalar value.
result_firstRandomAccessIterator to the first element of the result vector.
Precondition
[V_first,V_last) must be valid
[result_first, result_first + (V_last-V_first) must be valid
The result range must be larger than the vector range.
result should be of scal type
Complexity: n flops for real data, 2n flops for complex data
Example:
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
float scal = 3.3;
slip::conj_vector_scalar_multiplies(V1.begin(),V1.end(),scalc,Vscalc1.begin());
std::cout<<"Vscal1 = "<<std::endl;
std::cout<<Vscal1<<std::endl;

Definition at line 774 of file linear_algebra.hpp.

template<typename Vector1 , typename T , typename Vector2 >
void slip::conj_vector_scalar_multiplies ( const Vector1 &  V,
const T &  scal,
Vector2 &  Result 
)
inline

Computes the multiplication of a vector $\overline{V}$ by a scalar scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
VThe vector.
scalA scalar value.
ResultResulting vector.
Precondition
V.size() <= Result.size()
result should be of scal type
Complexity: n flops for real data, 2n flops for complex data
Example:
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
float scal = 3.3;
std::cout<<"Vscal1 = "<<std::endl;
std::cout<<Vscal1<<std::endl;

Definition at line 815 of file linear_algebra.hpp.

template<typename Container , typename _II >
void slip::container_cast ( Container &  cont,
_II &  first,
_II &  last 
)

Get the default iterators of a SLIP container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2010/05/10
Parameters
contContainer.
firstiterator to the first element of the container.
lastiterator to one past-the-end element of the container.
Example 1:
slip::iota(V.begin(),V.end(),1.0,1.0);
std::cout<<"V = \n"<<V<<std::endl;
slip::container_cast(V,firstV,lastV);
for(; firstV != lastV; ++firstV)
{
std::cout<<*firstV<<" ";
}
std::cout<<std::endl;
Example 2:
slip::iota(A.begin(),A.end(),1.0,1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::container_cast(A,firstA,lastA);
for(; firstA != lastA; ++firstA)
{
std::cout<<"("<<firstA.i()<<","<<firstA.j()<<") ";
}
std::cout<<std::endl;
Example 3:
slip::iota(Vol.begin(),Vol.end(),1.0,1.0);
std::cout<<"Vol = \n"<<Vol<<std::endl;
slip::container_cast(Vol,firstVol,lastVol);
for(; firstVol != lastVol; ++firstVol)
{
std::cout<<"("<<firstVol.k()<<","<<firstVol.i()<<","<<firstVol.j()<<") ";
}
std::cout<<std::endl;

Definition at line 205 of file container_cast.hpp.

template<typename Container , typename _II >
void slip::container_castR ( Container &  cont,
_II &  first,
_II &  last 
)

Get the reverse default iterators of a SLIP container.

Author
Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2010/05/10
Parameters
contContainer.
firstreverse iterator to the first element of the container.
lastreverse iterator to one past-the-end element of the container.
Example:
// ** slip::GrayscaleImage<double> I;
// ** I.read("lena.png");
// ** slip::GrayscaleImage<double>::default_iterator first;
// ** slip::GrayscaleImage<double>::default_iterator last;
// ** slip::container_castR(I,first,last);
// **

Definition at line 402 of file container_cast.hpp.

template<typename _II , typename _OI >
void slip::copy ( _II  first,
_II  last,
_OI  output_first 
)

Copy algorithm optimized for slip iterators.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2011/03/24
Since
1.2.0
Version
0.0.1
Parameters
firstA BidirectionalIterator.
lastA BidirectionalIterator.
output_firstA BidirectionalIterator.
Precondition
[first,last) is a valid range.
Example:
slip::iota(A2.begin(),A2.end(),1.0);
std::cout<<"A2 = \n"<<A2<<std::endl;
slip::copy(A2.upper_left(),A2.bottom_right(),B2.upper_left());
Examples:
jpg_file_io.cpp, median_filter_ind_unsafeN.cpp, test_algo.cpp, and test_string.cpp.

Definition at line 177 of file copy_ext.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::cos ( const kvector< T, N > &  V)
related

Definition at line 1454 of file KVector.hpp.

template<typename T >
Vector<T> slip::cos ( const Vector< T > &  V)
related

Definition at line 2032 of file Vector.hpp.

template<typename T >
Signal<T> slip::cos ( const Signal< T > &  V)
related

Definition at line 2045 of file Signal.hpp.

template<typename T >
Matrix<T> slip::cos ( const Matrix< T > &  M)
related

Definition at line 3911 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::cos ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5083 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::cos ( const Matrix4d< T > &  M)
related

Definition at line 5092 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::cos ( const Matrix3d< T > &  M)
related

Definition at line 5733 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::cos ( const Volume< T > &  M)
related

Definition at line 6050 of file Volume.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::cosh ( const kvector< T, N > &  V)
related

Definition at line 1584 of file KVector.hpp.

template<typename T >
Vector<T> slip::cosh ( const Vector< T > &  V)
related

Definition at line 2152 of file Vector.hpp.

template<typename T >
Signal<T> slip::cosh ( const Signal< T > &  V)
related

Definition at line 2165 of file Signal.hpp.

template<typename T >
Matrix<T> slip::cosh ( const Matrix< T > &  M)
related

Definition at line 4031 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::cosh ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5155 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::cosh ( const Matrix4d< T > &  M)
related

Definition at line 5164 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::cosh ( const Matrix3d< T > &  M)
related

Definition at line 5805 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::cosh ( const Volume< T > &  M)
related

Definition at line 6122 of file Volume.hpp.

template<typename T , typename InputIterator , typename InputIterator2 >
T slip::covariance ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
mean1,
mean2 
)
inline

Computes the covariance of a two sequences

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1The mean of the first container.
mean2The mean of the second container.
Returns
The value of the covariance of the two containers.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Example:
slip::iota(M1.begin(),M1.end(),1,1);
double mean1 = slip::mean<double>(M1.begin(),M1.end());
slip::iota(M2.begin(),M2.end(),4,1);
double mean2 = slip::mean<double>(M2.begin(),M2.end());
std::cout<<slip::covariance<float>(M1.begin(),M1.end(),M2.begin(),mean1,mean2)<<std::endl;

Definition at line 443 of file statistics.hpp.

template<typename T , typename InputIterator , typename InputIterator2 , typename Predicate >
T slip::covariance_if ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
mean1,
mean2,
Predicate  pred 
)
inline

Computes the covariance of a two sequences using a predicate on the first one

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1The mean of the first range using the predicate.
mean2The mean of the second range using the predicate.
preda predicate function
Returns
The value of the covariance of the two ranges using the predicate.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::covariance_if(M.begin(),M.end(),M.begin(),mean_if,mean_if,myPredicate)<<std::endl;

Definition at line 2768 of file statistics.hpp.

template<typename T , typename InputIterator , typename InputIterator2 , typename MaskIterator >
T slip::covariance_mask ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
MaskIterator  mask_first,
mean1,
mean2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the covariance of a two sequences over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mask_firstAn InputIterator on the mask
mean1The mean of the first range over the mask.
mean2The mean of the second range over the mask.
valueMask value.
Returns
The value of the covariance of the two ranges over the mask.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::covariance_mask(M.begin(),M.end(),M.begin(),ValuedMask.begin(),mean_mask2,mean_mask2,2)<<std::endl;

Definition at line 1601 of file statistics.hpp.

template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right,
CROSSCORRELATION_TYPE  t 
)
inline

Computes the crosscorrelation between two Images.

Author
Denis Arrivault <denis.arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/30
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
t: type of algorithm CC, CCC, NCC, PNCC
Precondition
[in1_upper_left,in1_bottom_right) is valid
[in2_upper_left,in2_upper_left + (in1_bottom_right - in1_upper_left)) must be valid.
(out_bottom_right - out_upper_left) == (in1_bottom_right - in1_upper_left)
the value_type of the input sequences have to be real (not complex)
Example:
I1.read("image1.jpg");
I2.read("imag2.jpg");
slip::GrayscaleImage<double> OutSTD(size1[0],size1[1],1.0);
// STD crosscorrelation calculation - CC algorithm
slip::crosscorrelation2d<double>(I1.upper_left(),I1.bottom_right(),I2.upper_left(),I2.bottom_right()
,OutSTD.upper_left(),OutSTD.bottom_right(),slip::CC);
slip::change_dynamic_01(OutSTD.upper_left(),OutSTD.bottom_right(),OutSTD.upper_left(),
OutSTD.write("STD_CC_crosscorrelation_2d.jpg");

Definition at line 2012 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::cumulative_histogram ( RandomAccessIterator1  histo_first,
RandomAccessIterator1  histo_last,
RandomAccessIterator2  cum_histo_first,
RandomAccessIterator2  cum_histo_last 
)
inline

Computes the cumulative histogram from a histogram.

Author
Mouhamed hammoud <hammoud_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/08/24
Since
1.0.0
Version
0.0.1
Parameters
histo_firstA RandomAccessIterator to the first element of the histogram.
histo_lastA RandomAccessIterator to the one past-the-end element of the histogram.
cum_histo_firstA RandomAccessIterator to the first element of the cumulative histogram.
cum_histo_lastA RandomAccessIterator to the one past-the-end element of the cumulative histogram.
Precondition
[histo_first,histo_last) is a valid range.
[cum_histo_first,cum_histo_last) is a valid range.
(histo_last - histo_first) == (cum_histo_last - cum_histo_first)
Example:
I1.read("lena.gif");
slip::Vector<int> Histo(256);
slip::histogram(I1.begin(),I1.end(),Histo.begin(),Histo.end(),0,255, 1);
slip::Vector<int> CumHisto(256);
slip::cumulative_histogram(Histo.begin(),Histo.end(),
CumHisto.begin(),CumHisto.end());
std::cout<<CumHisto<<std::endl;

Definition at line 508 of file histo.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::db_threshold ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const typename std::iterator_traits< InputIterator >::value_type &  min_t_value,
const typename std::iterator_traits< InputIterator >::value_type &  max_t_value,
const typename std::iterator_traits< OutputIterator >::value_type &  false_value 
)
inline

double-threshold algorithm

Author
Denis Arrivault<arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/21
Version
0.0.1
Parameters
firstbegin InputIterator of the range to threshold
lastpast-the-end InputIterator of the range to threshold
resultbegin OutputIterator of the resulting range
min_t_valueminimum threshold value
max_t_valuemaximum threshold value
false_valueresult value when min_t_value <= *first <= max_t_value
Precondition
[first, last) must be valid.
[result, result + (last-first)) must be valid.
Example:
//values less than 120 and more than 40 are set to 0
I1.read("lena.gif");
slip::db_threshold(I1.begin(),I1.end(),I2.begin(),40,120,0);
I2.write("lena_threshold.gif");

Definition at line 276 of file threshold.hpp.

template<class InputIter , class OutputIter >
void slip::dct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the Discrete Cosinus Transform II (forward) of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$
Example:
typedef double tt;
tt a[] = { tt(0), tt(1), tt(3), tt(4), tt(4), tt(3),tt(1),tt(0)};
tt b[8];
slip::dct(a,a+8,b);
for(int i = 0; i < 8; ++i)
std::cout<<b[i]<<" ";
std::cout<<std::endl;

Definition at line 2993 of file FFT.hpp.

template<typename Type >
int slip::decompose_direct ( const slip::Matrix< Type > &  M,
slip::Matrix< Type > &  K,
slip::Matrix< Type > &  R,
slip::Vector3d< Type > &  c 
)

Direct-Decomposition a 3x4-Matrix into internal and external parameters.

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Version
0.0.1
Date
2008/07/18
Since
1.2.0
Parameters
M3x4-Matrix
K3x3-Matrix containing the internal parameters
R3x3-Matrix containing the rotations
cVector3d containing the camera centre
Returns
1 (always)

Definition at line 630 of file camera_algo.hpp.

template<typename Type >
int slip::decompose_RQ ( const slip::Matrix< Type > &  M,
slip::Matrix< Type > &  K,
slip::Matrix< Type > &  R,
slip::Vector3d< Type > &  c 
)

RQ-Decomposition 3x4-Matrix into internal and external parameters.

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Version
0.0.2
Date
2012/07/04
Since
1.2.0
Parameters
M3x4-Matrix
K3x3-Matrix containing the internal parameters
R3x3-Matrix containing the rotations
cVector3d containing the camera centre
Returns
0, if the input Matrix M was singular
Todo:
Is it necessary to negate R at the end?

Definition at line 582 of file camera_algo.hpp.

template<typename SrcIter , typename Container2D , typename ResIter >
void slip::derivative ( SrcIter  first,
SrcIter  last,
const std::size_t  der_ord,
const std::size_t  sch_ord,
const std::size_t  sch_shift,
const Container2D &  M,
ResIter  result 
)
inline

Computes 1d finite differences derivatives of an iterator range.

Author
Ludovic Chatellier <ludovic.chatellier_AT_lea.univ-poitiers.fr>
Date
2007/01/12
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
der_ordderivative order
sch_ordorder of derivation scheme
sch_shiftleft shift value (upwind direction)
MPrecomputed finite differences coefficients Matrix.
resultA RandomAccessIterator.
Precondition
C must be of size > sch_ord in direction of derivation
sch_ord must be >= der _ord
The dimensions of M must be (sch_ord + 1)x(sch_ord + 1)
Example:
std::cout<<"compute finite derivatives kernels "<<std::endl;
std::size_t der_order = 1;
std::size_t sch_order = 5;
std::size_t sch_shift = sch_order/2;
//computes all kernels
slip::Matrix<double> kernels(sch_order + 1, sch_order + 1);
std::vector<slip::Matrix<double>::iterator> kernels_iterators(sch_order + 1);
for(std::size_t i = 0; i < (sch_order + 1); ++i)
{
kernels_iterators[i] = kernels.row_begin(i);
}
slip::finite_diff_kernels(der_order,sch_order,sch_shift,
kernels_iterators);
for(std::size_t i = 0; i < (sch_order + 1); ++i)
{
std::cout<<"kernel "<<i<<std::endl;
std::copy(kernels_iterators[i],kernels_iterators[i]+(sch_order + 1),std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;
}
std::cout<<"pre-computed kernels derivative ...."<<std::endl;
slip::derivative(data,data+ 10, 1,sch_order,sch_shift,kernels_iterators,result.begin());
std::cout<<"First derivative, order = "<<sch_order<<" : "<<std::endl;
std::copy(result.begin(),result.end(),std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;

Definition at line 417 of file derivatives.hpp.

template<typename SrcIter , typename KernelsIterator , typename ResIter >
void slip::derivative ( SrcIter  first,
SrcIter  last,
const std::size_t  der_ord,
const std::size_t  sch_ord,
const std::size_t  sch_shift,
const std::vector< KernelsIterator > &  kernels_first,
ResIter  result 
)
inline

Computes 1d finite differences derivatives of an iterator range.

Author
Ludovic Chatellier <ludovic.chatellier_AT_lea.univ-poitiers.fr>
Benoit Tremblais <benoit.tremblais_AT_sic.univ-poitiers.fr>
Date
2007/11/26
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the first element of the data to derivate.
lastA RandomAccessIterator to the past-the-end element of the data to derivate.
der_ordDerivative order.
sch_ordOrder of derivation scheme.
sch_shiftLeft shift value (upwind direction).
kernels_firststd::vector which contain iterators to first elements of the derivative kernels
resultA RandomAccessIterator to the result container.
Precondition
C must be of size > sch_ord in direction of derivation
sch_ord must be >= der _ord
The kernels must have (sch_ord + 1) elements
Computes 1d finite differences derivatives of an iterator range
from pre-computed kernels.

Definition at line 512 of file derivatives.hpp.

template<typename Iterator2d1 , typename Iterator2d2 , typename T >
void slip::derivative_2d ( Iterator2d1  I_up,
Iterator2d1  I_bot,
const slip::Point2d< T > &  grid_step,
slip::SPATIAL_DIRECTION  der_dir,
const std::size_t  der_order,
const std::size_t  sch_order,
Iterator2d2  R_up,
Iterator2d2  R_bot 
)
inline

Computes finite differences derivatives of a 2d range.

Author
Benoit Tremblais <benoit.tremblais_AT_sic.univ-poitiers.fr>
Date
2007/11/26
Since
1.0.0
Version
0.0.1
Parameters
I_upupper_left iterator2d of the input 2d range
I_botbottom_right iterator2d of the input 2d range
grid_stepGrid step associated to the 2d range.
der_dirSPATIAL_DIRECTION of the derivative:
  • X_DIRECTION
  • Y_DIRECTION
der_orderDerivative order.
sch_orderOrder of derivation scheme.
R_upupper_left iterator2d of the resulting 2d range
R_botbottom_right iterator2d of the resulting 2d range
Precondition
if der_dir == X_DIRECTION, rows() must be > sch_order
if der_dir == Y_DIRECTION, cols() must be > sch_order
sch_order must be >= der_order

Definition at line 592 of file derivatives.hpp.

template<typename RandomAccessIterator3d1 , typename RandomAccessIterator3d2 , typename T >
void slip::derivative_3d ( RandomAccessIterator3d1  I_fup,
RandomAccessIterator3d1  I_back_bot,
const slip::Point3d< T > &  grid_step,
slip::SPATIAL_DIRECTION  der_dir,
const std::size_t  der_order,
const std::size_t  sch_order,
RandomAccessIterator3d2  R_fup,
RandomAccessIterator3d2  R_back_bot 
)
inline

Computes finite differences derivatives of a 3d range.

Author
Benoit Tremblais <benoit.tremblais_AT_sic.univ-poitiers.fr>
Date
2007/11/26
Since
1.0.0
Version
0.0.1
Parameters
I_fupupper_left iterator3d of the input 3d range
I_back_botbottom_right iterator3d of the input 3d range
grid_stepGrid step associated to the 3d range.
der_dirSPATIAL_DIRECTION of the derivative:
  • X_DIRECTION
  • Y_DIRECTION
der_orderDerivative order.
sch_orderOrder of derivation scheme.
R_fupupper_left iterator3d of the resulting 3d range
R_back_botbottom_right iterator3d of the resulting 3d range
Precondition
if der_dir == X_DIRECTION, rows() must be > sch_order
if der_dir == Y_DIRECTION, cols() must be > sch_order
sch_order must be >= der_order
Example:
typedef double T;
slip::Array3d<T> M3d(8,5,6);
slip::Array3d<T> M3d_res(8,5,6);
slip::iota(M3d.begin(),M3d.end(),1.0);
slip::derivative_3d(M3d.front_upper_left(),M3d.back_bottom_right(),
slip::Point3d<double>(1.0,0.5,0.5),
der_order2,
sch_order2,
M3d_res.front_upper_left(),
M3d_res.back_bottom_right());
std::cout<<"M3d_res = \n"<<M3d_res<<std::endl;

Definition at line 696 of file derivatives.hpp.

template<typename RandomAccessIterator4d1 , typename RandomAccessIterator4d2 , typename T >
void slip::derivative_4d ( RandomAccessIterator4d1  I_ffup,
RandomAccessIterator4d1  I_last_back_bot,
const slip::Point4d< T > &  grid_step,
slip::FOUR_DIM_DIRECTION  der_dir,
const std::size_t  der_order,
const std::size_t  sch_order,
RandomAccessIterator4d2  R_ffup,
RandomAccessIterator4d2  R_last_back_bot 
)
inline

Computes finite differences derivatives of a 4d range.

Version
Fluex 1.0
Date
2013/08/26
Since
1.4.0
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
Version
0.0.1
Parameters
I_ffupupper_left iterator4d of the input 4d range
I_last_back_botbottom_right iterator4d of the input 4d range
grid_stepGrid step associated to the 4d range.
der_dir4D space direction of the derivative:
  • T_DIRECTION
  • S_DIRECTION
  • R_DIRECTION
  • C_DIRECTION
der_orderDerivative order.
sch_orderOrder of derivation scheme.
R_ffupupper_left iterator4d of the resulting 4d range
R_last_back_botbottom_right iterator4d of the resulting 4d range
Precondition
if der_dir == T_DIRECTION, slabs() must be > sch_order
if der_dir == S_DIRECTION, cols() must be > sch_order
if der_dir == R_DIRECTION, rows() must be > sch_order
if der_dir == C_DIRECTION, slices() must be > sch_order
sch_order must be >= der_order
Example:
typedef double T;
slip::Array4d<T> M4d(8,5,6,4);
slip::Array4d<T> M4d_res(8,5,6,4);
slip::iota(M4d.begin(),M4d.end(),1.0);
slip::derivative_4d(M4d.first_front_upper_left(),M4d.last_back_bottom_right(),
slip::Point4d<double>(1.0,0.5,0.5,0.5),
der_order2,
sch_order2,
M4d_res.first_front_upper_left(),
M4d_res.last_back_bottom_right());
std::cout<<"M4d_res = \n"<<M4d_res<<std::endl;
Todo:
Unit tests has not been performed for this function.

Definition at line 880 of file derivatives.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::diagonal_solve ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision 
)
inline

Solve the linear system D*X=B when D a diagonal matrix

\[ \left( \begin{array}{cccc} d_{1,1} & 0&\cdots&0\\ 0 & d_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&d_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/06
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of D.
lastRandomAccessIterator to one-past-the-end element of D.
X_firstRandomAccessIterator to the first element of X.
X_lastRandomAccessIterator to one-past-the-end element of X.
B_firstRandomAccessIterator to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
(last - first) == (X_last - X_first)
(B_last - B_first) == (X_last - X_first)
Remarks
Raise an exception if the matrix is singular
Works with real and complex data.
Complexity: n flops
Example:
double diagonal[] = {1.0,2.0,4.0};
slip::Array<double> Ddiag(3,diagonal);
std::cout<<"Ddiag ="<<std::endl;
std::cout<<Ddiag<<std::endl;
double bdiag[] = {6.0,2.0,5.0};
slip::Array<double> Bdiag(3,bdiag);
std::cout<<"Bdiag ="<<std::endl;
std::cout<<Bdiag<<std::endl;
slip::diagonal_solve(Ddiag.begin(),Ddiag.end(),
Xdiag.begin(),Xdiag.end(),
Bdiag.begin(),Bdiag.end(),1.0E-6);
std::cout<<"Xdiag = "<<Xdiag<<std::endl;
std::cout<<"Check:"<<std::endl;
slip::set_diagonal(Ddiag.begin(),Ddiag.end(),Adiag);
std::cout<<"Adiag ="<<std::endl;
std::cout<<Adiag<<std::endl;
slip::matrix_vector_multiplies(Adiag,Xdiag,Bdiag2);
std::cout<<"Adiag * Xdiag = "<<std::endl;
std::cout<<Bdiag2<<std::endl;

Definition at line 6716 of file linear_algebra.hpp.

template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename Operator >
void slip::differential_operator ( RandomAccessIteratorNd1  in_first,
RandomAccessIteratorNd1  in_last,
RandomAccessIteratorNd2  out_first,
Operator &  op 
)

Applies a differential operator on a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
in_firstInputIterator.
in_lastInputIterator.
out_firstOutputIterator.
opDifferential operator.
Precondition
[in_first,in_last) must be valid.
[out_first,out_first + (in_last-in_first)) must be valid.
out_first is not an iterator within the range ]in_first,in_last).
Example:
//read the image
I.read("lena.png");
std::size_t nb_row = I.rows();
std::size_t nb_col = I.cols();
//create a AddBorder object with slip::BORDER_TREATMENT_NEUMANN
//border condition and a border size of 1
std::size_t b_size = 1;
//create a bigger image containing the initial image and the borders
slip::GrayscaleImage<double> tmp(nb_row+(2*b_size),nb_col+(2*b_size));
slip::Box2d<int> box(b_size,b_size,(tmp.rows()- 1) - b_size,(tmp.cols() - 1) - b_size);
//add border
b(I.upper_left(),I.bottom_right(),tmp.upper_left());
//declare a differential operator
Dx<double> op;
//Apply the operator op to tmp and store the result in Result
slip::GrayscaleImage<double> Result(nb_row,nb_col);
differential_operator(tmp.upper_left(box),tmp.bottom_right(box),Result.upper_left(),op);
//change the dynamic of Result
//write the resulting image
Result.write("result.png");

Definition at line 6255 of file derivatives.hpp.

template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename RandomAccessIteratorNd3 , typename Operator1 , typename Operator2 >
void slip::differential_operator_2 ( RandomAccessIteratorNd1  in_first,
RandomAccessIteratorNd1  in_last,
RandomAccessIteratorNd2  out_first1,
RandomAccessIteratorNd3  out_first2,
Operator1 &  op1,
Operator2 &  op2 
)

Applies 2 differential operators on a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
in_firstInputIterator.
in_lastInputIterator.
out_first1OutputIterator.
out_first2OutputIterator.
op1Differential operator.
op2Differential operator.
Precondition
[in_first,in_last) must be valid.
[out_first1,out_first1 + (in_last-in_first)) must be valid.
[out_first2,out_first2 + (in_last-in_first)) must be valid.
out_first1 is not an iterator within the range ]in_first,in_last).
out_first2 is not an iterator within the range ]in_first,in_last).
Example:
//read the image
I.read("lena.png");
std::size_t nb_row = I.rows();
std::size_t nb_col = I.cols();
//create a AddBorder object with slip::BORDER_TREATMENT_NEUMANN
//border condition and a border size of 1
std::size_t b_size = 1;
//create a bigger image containing the initial image and the borders
slip::GrayscaleImage<double> tmp(nb_row+(2*b_size),nb_col+(2*b_size));
slip::Box2d<int> box(b_size,b_size,(tmp.rows()- 1) - b_size,(tmp.cols() - 1) - b_size);
//add border
b(I.upper_left(),I.bottom_right(),tmp.upper_left());
//declare a differential operator
Dx<double> op1;
Dy<double> op2;
//Apply the operator op to tmp and store the result in Result
slip::GrayscaleImage<double> Result1(nb_row,nb_col);
slip::GrayscaleImage<double> Result2(nb_row,nb_col);
differential_operator2(tmp.upper_left(box),tmp.bottom_right(box),
Result1.upper_left(),
Result2.upper_left(),
op1,op2);
//change the dynamic of Result1 and Result2
slip::change_dynamic_01(Result1.begin(),Result1.end(),Result1.begin(),slip::SIGMOID_FUNCTION);
slip::change_dynamic_01(Result2.begin(),Result2.end(),Result2.begin(),slip::SIGMOID_FUNCTION);
//write the resulting images
Result1.write("dx.png");
Result2.write("dy.png");

Definition at line 6324 of file derivatives.hpp.

template<typename RandomAccessIteratorNd1 , typename RandomAccessIteratorNd2 , typename RandomAccessIteratorNd3 , typename RandomAccessIteratorNd4 , typename Operator1 , typename Operator2 , typename Operator3 >
void slip::differential_operator_3 ( RandomAccessIteratorNd1  in_first,
RandomAccessIteratorNd1  in_last,
RandomAccessIteratorNd2  out_first1,
RandomAccessIteratorNd3  out_first2,
RandomAccessIteratorNd4  out_first3,
Operator1 &  op1,
Operator2 &  op2,
Operator3 &  op3 
)

Applies 3 differential operators on a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
in_firstInputIterator.
in_lastInputIterator.
out_first1OutputIterator.
out_first2OutputIterator.
out_first3OutputIterator.
op1Differential operator.
op2Differential operator.
op3Differential operator.
Precondition
[in_first,in_last) must be valid.
[out_first1,out_first1 + (in_last-in_first)) must be valid.
[out_first2,out_first2 + (in_last-in_first)) must be valid.
[out_first3,out_first3 + (in_last-in_first)) must be valid.
out_first1 is not an iterator within the range ]in_first,in_last).
out_first2 is not an iterator within the range ]in_first,in_last).
out_first3 is not an iterator within the range ]in_first,in_last).
Example:
//read an image
I.read("lena.png");
std::size_t nb_row = I.rows();
std::size_t nb_col = I.cols();
//create a AddBorder object with slip::BORDER_TREATMENT_NEUMANN
//border condition and a border size of 1
std::size_t b_size = 1;
//create a bigger image containing the initial image and the borders
slip::GrayscaleImage<double> tmp(nb_row+(2*b_size),nb_col+(2*b_size));
slip::Box2d<int> box(b_size,b_size,(tmp.rows()- 1) - b_size,(tmp.cols() - 1) - b_size);
//add border
b(I.upper_left(),I.bottom_right(),tmp.upper_left());
//declare a differential operator
Dxx<double> op1;
Dyy<double> op2;
Dxy<double> op2;
//Apply the operator op to tmp and store the result in Result
slip::GrayscaleImage<double> Result1(nb_row,nb_col);
slip::GrayscaleImage<double> Result2(nb_row,nb_col);
slip::GrayscaleImage<double> Result3(nb_row,nb_col);
differential_operator2(tmp.upper_left(box),tmp.bottom_right(box),
Result1.upper_left(),
Result2.upper_left(),
Result3.upper_left(),
op1,op2,op3);
//change the dynamic of Result1 and Result2
slip::change_dynamic_01(Result1.begin(),Result1.end(),Result1.begin(),slip::SIGMOID_FUNCTION);
slip::change_dynamic_01(Result2.begin(),Result2.end(),Result2.begin(),slip::SIGMOID_FUNCTION);
slip::change_dynamic_01(Result3.begin(),Result3.end(),Result3.begin(),slip::SIGMOID_FUNCTION);
//write the resulting images
Result1.write("dxx.png");
Result2.write("dyy.png");
Result2.write("dxy.png");

Definition at line 6406 of file derivatives.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor >
Real slip::distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
BinaryFunctor  distance 
)
inline

Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
distanceA binary functor.
Returns
square Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable
Example1:
//create 2 containers
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
//print the containers
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
//compute the L1 distance between this 2 containers
std::cout<<"L1_distance(Md1,Md2) = \n";
std::cout<<slip::distance<float>(Md1.begin(),Md1.end(),
Md2.begin(),
Example2:
//create 2 vector fields
slip::iota(VF3.begin(),VF3.end(),slip::Vector2d<float>(1.0,1.0),slip::Vector2d<float>(1.0,1.0));
slip::iota(VF4.begin(),VF4.end(),slip::Vector2d<float>(1.0,0.5),slip::Vector2d<float>(0.5,1.0));
//print the 2 vector fields
std::cout<<"VF3 = \n"<<VF3<<std::endl;
std::cout<<"VF4 = \n"<<VF4<<std::endl;
//computes the L2 distance between the 2 vector fields
float ee = slip::distance<float>(VF3.begin(),VF3.end(),VF4.begin(),slip::L2_dist_vect<slip::Vector2d<float> >());

Definition at line 150 of file compare.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunctor >
void slip::distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
OutputIterator  result,
BinaryFunctor  distance 
)
inline

Computes the pointwise distances of two ranges: $ d(s_i, b_i)$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
resultAn InputIterator.
distanceA binary functor.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[result,result + (last1 - first1)) is a valid range.
result is not an iterator within the range ]first1,last1) or ]first2,first2 + (last1 - first1)).
Example:
//create 2 input containers and the map container
slip::Matrix<float> Resultd(2,3);
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
//print the containers
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
//computes the L1 distance map
slip::distance(Md1.begin(),Md1.end(),
Md2.begin(),
Resultd.begin(),
std::cout<<"Resultd L1 = \n"<<Resultd<<std::endl;

Definition at line 342 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename Predicate >
Real slip::distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
BinaryFunctor  distance,
Predicate  pred 
)

Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d and the given predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
distanceA binary functor.
predA predicate.
Returns
the sum of the distances.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
//define a predicate
template<typename T>
bool lt2Predicate (const T& val)
{
return (val <= T(2));
}
//create 2 containers
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
//print the containers
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
//computes the L2 distance between the 2 containers
std::cout<<"L2_distance(Md1,Md2) = "<<std::endl;
std::cout<<slip::distance_if<float>(Md1.begin(),Md1.end(),
Md2.begin(),
lt2Predicate<float>)<<std::endl;

Definition at line 280 of file compare.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation , typename _Predicate >
void slip::distance_if ( _InputIterator1  first1,
_InputIterator1  last1,
_InputIterator2  first2,
_OutputIterator  result,
_BinaryOperation  distance,
_Predicate  pred 
)
inline

Computes the pointwise distances of two ranges: $ d(s_i, b_i)$ according to a Predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
resultAn output iterator.
distanceA binary operator.
predA predicate.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[result,result + (last1 - first1)) is a valid range.
result is not an iterator within the range ]first1,last1) or ]first2,first2 + (last1 - first1)).
Example:
//define a predicate
template<typename T>
bool lt2Predicate (const T& val)
{
return (val <= T(2));
}
//create two containers, a mask and the map container
slip::Matrix<float> Resultd(2,3);
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
//computes the L2 distance map between the 2 containers
//according to the predicate lt2Predicate<float>
slip::distance_if(Md1.begin(),Md1.end(),
Md2.begin(),
Resultd.begin(),
lt2Predicate<float>);
std::cout<<"Resultd L2 = \n"<<Resultd<<std::endl;

Definition at line 468 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename BinaryFunctor , typename MaskIterator >
Real slip::distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
BinaryFunctor  distance,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the sum of the pointwise distances of two ranges: $ \sum_i d(s_i, b_i)$ according to the distance d and the given mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
distanceA binary functor.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
the sum of the distances.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
//create two containers and a mask
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
int maskd[] = {2,0,0,2,0,2};
slip::Matrix<int> Maskd(2,3,maskd);
//print the containers and the mask
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
std::cout<<"Maskd = \n"<<Maskd<<std::endl;
std::cout<<"L2_distance(Md1,Md2) = "<<std::endl;
//computes the L2 distance between the 2 containers
std::cout<<slip::distance_mask<float>(Md1.begin(),Md1.end(),
Maskd.begin(),
Md2.begin(),
slip::L2_dist<float,float>(),2)<<std::endl;

Definition at line 211 of file compare.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename MaskIterator , typename OutputIterator , typename BinaryFunctor >
void slip::distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
OutputIterator  result,
BinaryFunctor  distance,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the pointwise distances of two ranges: $ d(s_i, b_i)$ according to a given mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/30
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
resultAn InputIterator.
distanceA binary functor.
valuetrue value of the mask range. Default is 1.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
[result,result + (last1 - first1)) is a valid range.
result is not an iterator within the range ]first1,last1) or ]first2,first2 + (last1 - first1)).
Example:
//create two containers, a mask and the map container
slip::Matrix<float> Resultd(2,3);
slip::iota(Md1.begin(),Md1.end(),1.0f,1.0f);
slip::iota(Md2.begin(),Md2.end(),6.0f,-1.0f);
int maskd[] = {2,0,0,2,0,2};
slip::Matrix<int> Maskd(2,3,maskd);
//print the containers and the mask
std::cout<<"Md1 = \n"<<Md1<<std::endl;
std::cout<<"Md2 = \n"<<Md2<<std::endl;
std::cout<<"Maskd = \n"<<Maskd<<std::endl;
//computes the L2 distance map between the 2 containers
//according to the mask Maskd
slip::distance_mask(Md1.begin(),Md1.end(),
Maskd.begin(),
Md2.begin(),
Resultd.begin(),
std::cout<<"Resultd L2 = \n"<<Resultd<<std::endl;

Definition at line 402 of file compare.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::divides ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the pointwise division of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//bitwise division of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::divides(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 701 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::divides_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the pointwise division of two ranges. according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::divides_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 843 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::divides_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the pointwise division of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// Computes the pointwise division of two ranges of two Array2d according to a mask
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::divides_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::divides_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 777 of file arithmetic_op.hpp.

template<typename InputIterator1 , typename OutputIterator >
void slip::divides_scalar ( InputIterator1  __first1,
InputIterator1  __last1,
const typename std::iterator_traits< InputIterator1 >::value_type &  scalar,
OutputIterator  __result 
)
inline

Divides a range by a scalar.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An InputIterator.
__last1An InputIterator.
scalarA scalar value.
__resultAn OutputIterator.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
//divides M by 5
slip::iota(M.begin(),M.end(),1,1);
slip::divides_scalar(M.begin(),M.end(),5.0f,M3.begin());
Examples:
color_gaussian_filter.cpp.

Definition at line 1762 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void slip::divides_scalar_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Divides a range by a scalar according to a Predicate.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
scalarA scalar value.
__resultAn output iterator.
__predA predicate.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
// divides v1 by 5 according to the Predicate lt5Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::divides_scalar_if(v1.begin(),v1.end(),
5,
v3.begin(),
lt5Predicate<int>);
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1885 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void slip::divides_scalar_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Divides a range by a scalar according to a mask sequence.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
scalarA scalar value.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
[__first1,__last1) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example1:
//divides v1 by 2
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::divides_scalar_mask(v1.begin(),v1.end(),
mask.begin(),
2,
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::divides_scalar_mask(v1.begin(),v1.end(),
maskint.begin(),
2,
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1827 of file arithmetic_op.hpp.

template<class Matrix1 , class Vector1 >
void slip::eigen ( const Matrix1 &  A,
Vector1 &  E,
bool  sort = false 
)
inline

Eigen Values Computation for non symmetric matrix.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/13
Since
1.0.0
Version
0.0.2
Parameters
AMatrix container
EVector containing the real eigenvalue
sorta boolean, if sort == true eigen will be sorted by decressing order
Precondition
A must be real
E must be complex
Todo:

Add the eigen vectors

optimize schur transform

Example:
double db[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0};
std::cout<<" Mb \n"<<Mb<<std::endl;
slip::eigen(Mb,Eigb,true);
std::cout<<" Eigenvalues\n"<<Eigb<<std::endl;

Definition at line 204 of file linear_algebra_eigen.hpp.

template<typename T >
slip::lin_alg_traits<T>::value_type slip::epsilon ( )

Returns the epsilon value of a real or a complex.

Author
Benoit Tremblais tremb.nosp@m.lais.nosp@m.@sic..nosp@m.univ.nosp@m.-poit.nosp@m.iers.nosp@m..fr : conceptor
Date
2009/02/21
Since
1.0.0
Returns
The corresponding epsilon value.
Example:
std::cout<<"epsilon = "<<slip::epsilon<std::complex<float> >()<<std::endl;
std::cout<<"epsilon = "<<slip::epsilon<double>()<<std::endl;
Examples:
test_numeric_limits.cpp.

Definition at line 211 of file linear_algebra_traits.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::Euclidean_norm ( InputIterator  first,
InputIterator  last 
)
inline

Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
the Euclidean norm of the range.
Precondition
[first, last) is a valid range
Value_T is Assignable
If x is an object of type Value_T, y and z are objects of InputIterator's value type, then x + y * z is defined
The type of x + y * z is convertible to Value_T
Note
Calls slip::L2_norm<Value_T>(first,last);
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
std::cout<<slip::Euclidean_norm<float>(M.begin(),M.end())<<std::endl;

Definition at line 347 of file norms.hpp.

template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::Euclidean_norm_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ a range according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predA predicate.
Returns
Precondition
[first, last) is a valid range
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(M.begin(),M.end(),1.0,1.0)
std::cout<<slip:: Euclidean_norm_if<float>(M.begin(),M.end(),lt5Predicate<float>)<<std::endl;

Definition at line 417 of file norms.hpp.

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) 
)
inline

Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
the infinite norm of the range.
Precondition
[first, last) is a valid range
[mask_first, (last-first)) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
float d[] = {0,1,1,0,0,1};
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<slip::Euclidean_norm_mask<float>(M.begin(),M.end(),Mask.begin(),1)<<std::endl

Definition at line 380 of file norms.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_chebyshev_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the Chebyshev scheme.

The order of the resulting values is the following (1,x,2x^2-1,4x^3-3x,...).

Since
1.0.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1

Definition at line 979 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_chebyshevII_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the ChebyshevII scheme. The order of the resulting values is the following (1,2x,4x^2-1,8x^3-4x,...).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/21
Version
0.0.1
Since
1.4.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1
Complexity: n multiplications + (n-1) substraction
Example:
double x = 2.1;
chIIx.size()-1,
chIIx.begin(),chIIx.end());
std::cout<<"chebyshevII_basis at x = "<<x<<"\n"<<chIIx<<std::endl;

Definition at line 331 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_discrete_chebyshev_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the Discrete Chebyshev scheme. The order of the resulting values is the following (1,2x-N+1,...).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/21
Version
0.0.1
Since
1.4.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1
Complexity:
Example:
double x = 2.1;
chIIx.size()-1,
chIIx.begin(),chIIx.end());
std::cout<<"chebyshevII_basis at x = "<<x<<"\n"<<chIIx<<std::endl;

Definition at line 391 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_hermite_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the Hermite scheme. The order of the resulting values is the following (1,2x,4x^2-2,8x^3-12x,...).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/21
Version
0.0.1
Since
1.4.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1
Complexity: 2*n multiplications + (n-1) substraction
Example:
slip::Array<double> hermitex(8);
double x = 2.1;
hermitex.size()-1,
hermitex.begin(),hermitex.end());
std::cout<<"hermite_basis at x = "<<x<<"\n"<<hermitex<<std::endl;

Definition at line 562 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
T slip::eval_horner ( RandomAccessIterator  first,
RandomAccessIterator  last,
const T &  x 
)
inline

Returns the evaluation of the polynomial given throw the range [first,last) at x using the horner scheme. The coefficients of the polynomial a0 + a1x + a2x^2 +... anx^n are supposed ordered as follows : (a0,a1,...,an).

Since
1.0.0
Parameters
firstRandomAccessIterator.
lastRandomAccessIterator.
xLocation to be evaluated.
Returns
The evaluated value.
Precondition
[first,last) is a valid range
Remarks
Complexity : (last - first) Mult + (last - first) Add

Definition at line 787 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_laguerre_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the Laguerre scheme. The order of the resulting values is the following (1,-x+1,0.5x^2-2x+1,-(1/6)x^3-(3/2)x^2-3x+1,...).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/21
Version
0.0.1
Since
1.4.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1
Complexity: 3*n multiplications + (n-1) substractions + (n-1) additions
Example:
slip::Array<double> laguerrex(8);
double x = 2.1;
laguerrex.size()-1,
laguerrex.begin(),laguerrex.end());
std::cout<<"laguerre_basis at x = "<<x<<"\n"<<laguerrex<<std::endl;

Definition at line 738 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_legendre_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluations of x until order n to the range [first,last) using the legendre scheme.

The order of the resulting values is the following (1,x,0.5*(3x^2-1),...).

Since
1.0.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1

Definition at line 926 of file polynomial_algo.hpp.

template<typename MultivariatePolynomial , typename RandomAccessIterator >
void slip::eval_multi_poly_power_basis ( const MultivariatePolynomial &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluation of the power of a slip::MultivariatePolynomial<T,DIM> P until order n to the range [first,last) using the horner scheme.

The order of the resulting values is the following (1,P,P^2,...,P^n).

Since
1.0.0
Parameters
xslip::MultivariatePolynomial<T,DIM> to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1
Example:
typedef double T;
std::vector<T> coefP(6);
slip::iota(coefP.begin(),coefP.end(),1.0);
slip::MultivariatePolynomial<T,2> P(2,coefP.begin(),coefP.end());
std::cout<<"P = \n"<<P<<std::endl;
std::vector<T> coefQ(6);
slip::iota(coefQ.begin(),coefQ.end(),2.0);
slip::MultivariatePolynomial<T,2> Q(2,coefQ.begin(),coefQ.end());
std::cout<<"Q = \n"<<Q<<std::endl;
std::vector<slip::MultivariatePolynomial<T,2> > VP(2);
VP[0] = P;
VP[1] = Q;
std::vector<T> coefS(6);
slip::iota(coefS.begin(),coefS.end(),3.0);
slip::MultivariatePolynomial<T,2> S(2,coefS.begin(),coefS.end());
std::cout<<"S = \n"<<S<<std::endl;
for(std::size_t i = 0; i < A.rows(); ++i)
{
slip::eval_multi_poly_power_basis(VP[i],S.degree(),A.row_begin(i),A.row_end(i));
}
std::cout<<"P^0 = \n"<<A[0][0]<<std::endl;
std::cout<<"P^1 = \n"<<A[0][1]<<std::endl;
std::cout<<"P^2 = \n"<<A[0][2]<<std::endl;
std::cout<<"Q^0 = \n"<<A[1][0]<<std::endl;
std::cout<<"Q^1 = \n"<<A[1][1]<<std::endl;
std::cout<<"Q^2 = \n"<<A[1][2]<<std::endl;
std::cout<<"P*Q = \n"<<A[0][1]*A[1][1]<<std::endl;

Definition at line 1179 of file polynomial_algo.hpp.

template<class Vector , typename RandomAccessIterator >
void slip::eval_multi_poly_power_nd_basis ( const Vector &  x,
const std::size_t  order,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluation of the powers of slip::MultivariatePolynomial<T,DIM> $Q = (P_1,...,P_{dim})$ such that $ sum_{k=1}^{dim} i_k \le order$ with $i_k$ the power of the qk to the range [first,last) using the horner scheme.

The order of the resulting values is the lexicographical one according to the powers of the monomial $(1,P_1,...,P_1^{order},P_2,P_2P_1,...,P_2P_k,P_2^2,..P_{dim}^{order})$.

Since
1.0.0
Parameters
xto be evaluated.
orderPolynomial order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = $ \frac{\prod_{i=1}^{dim} (order + i)}{dim!} $
Example:
typedef double T;
std::vector<T> coefP(6);
slip::iota(coefP.begin(),coefP.end(),1.0);
slip::MultivariatePolynomial<T,2> P(2,coefP.begin(),coefP.end());
std::cout<<"P = \n"<<P<<std::endl;
std::vector<T> coefQ(6);
slip::iota(coefQ.begin(),coefQ.end(),2.0);
slip::MultivariatePolynomial<T,2> Q(2,coefQ.begin(),coefQ.end());
std::cout<<"Q = \n"<<Q<<std::endl;
std::vector<slip::MultivariatePolynomial<T,2> > VP(2);
VP[0] = P;
VP[1] = Q;
std::vector<T> coefS(6);
slip::iota(coefS.begin(),coefS.end(),3.0);
slip::MultivariatePolynomial<T,2> S(2,coefS.begin(),coefS.end());
std::cout<<"S = \n"<<S<<std::endl;
SrondPQ = PoVP(S,VP);
std::cout<<"S(P,Q) = \n"<<SrondPQ<<std::endl;

Definition at line 1255 of file polynomial_algo.hpp.

template<class Vector , typename RandomAccessIterator >
void slip::eval_power_2d_basis ( const Vector &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluation of the powers of X = (x1,x2) such that $i_1 + i_2 \le n$ with $i_1$ and $i_2$ the power of x1 and x2. the range [first,last) using the horner scheme.

The order of the resulting values is the following (1,x1,...,x1^n,x2,x2x1,...,x2^2,..).

Since
1.0.0
Parameters
xLocation (multivariate) to be evaluated.
nPolynomial order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = (n + 1)(n + 2)/2

Definition at line 1028 of file polynomial_algo.hpp.

template<typename T , typename RandomAccessIterator >
void slip::eval_power_basis ( const T &  x,
const std::size_t  n,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluation of the power of x until order n to the range [first,last) using the horner scheme.

The order of the resulting values is the following (1,x,x^2,...,x^n).

Since
1.0.0
Parameters
xLocation to be evaluated.
nlast order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = n + 1

Definition at line 849 of file polynomial_algo.hpp.

template<class Vector , typename RandomAccessIterator >
void slip::eval_power_nd_basis ( const Vector &  x,
const std::size_t  order,
RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Returns the evaluation of the powers of $X = (x_1,...,x_{dim})$ such that $ sum_{k=1}^{dim} i_k \le order$ with $i_k$ the power of the xk to the range [first,last) using the horner scheme.

The order of the resulting values is the lexicographical one according to the powers of the monomial $(1,x1,...,x1^{order},x2,x2x1,...,x2xk,x2^2,..x_{dim}^{order})$.

Since
1.0.0
Parameters
xLocation (multivariate) to be evaluated.
orderPolynomial order to compute.
firstRandomAccessIterator.
lastRandomAccessIterator.
Precondition
[first,last) is a valid range
(last - first) = $ \frac{\prod_{i=1}^{dim} (order + i)}{dim!} $

Definition at line 1073 of file polynomial_algo.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::exp ( const kvector< T, N > &  V)
related

Definition at line 1566 of file KVector.hpp.

template<typename T >
Vector<T> slip::exp ( const Vector< T > &  V)
related

Definition at line 2134 of file Vector.hpp.

template<typename T >
Signal<T> slip::exp ( const Signal< T > &  V)
related

Definition at line 2147 of file Signal.hpp.

template<typename T >
Matrix<T> slip::exp ( const Matrix< T > &  M)
related

Definition at line 4013 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::exp ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5137 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::exp ( const Matrix4d< T > &  M)
related

Definition at line 5146 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::exp ( const Matrix3d< T > &  M)
related

Definition at line 5787 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::exp ( const Volume< T > &  M)
related

Definition at line 6104 of file Volume.hpp.

template<typename Real >
Real slip::fCieLab ( const Real  x)
inline

Definition at line 278 of file color_spaces.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::fft_circular_convolution ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  first2,
RandomAccessIterator2  last2,
RandomAccessIterator3  conv_first,
RandomAccessIterator3  conv_last 
)
inline

Computes the FFT circular convolution.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/13
Since
1.0.0
Version
0.0.2
Parameters
firstA RandomAccessIterator iterator to the data.
lastA RandomAccessIterator iterator to the data.
first2A RandomAccessIterator iterator to the filter.
last2A RandomAccessIterator iterator to the filter.
conv_firstA RandomAccessIterator iterator to the convolution.
conv_lastA RandomAccessIterator iterator to the convolution.
Precondition
data value type must be the same for the 3 ranges
[first,last) must be valid.
[first,last) and [first2,last2) are assumed to contain data of the same type
[first,last) and [first2,last2) are supposed to be (last-first) periodic
(conv_last-conv_first) == (last-first)
(last2-first2) == (last-first)
Complexity: 3*K*2*N*log_2(2*N) + N = 6KNlog_2(N) + (4K + 2)N with N = (last-first)
Example:
slip::Array<double> signal1(16);
slip::iota(signal1.begin(),signal1.end(),1.0);
slip::Array<double> signal2(16);
slip::iota(signal2.begin(),signal2.end(),3.0);
slip::Array<double> resultc(16);
std::cout<<"signal1 = \n"<<signal1<<std::endl;
std::cout<<"signal2 = \n"<<signal2<<std::endl;
slip::fft_circular_convolution(signal1.begin(),signal1.end(),
signal2.begin(),signal2.end(),
resultc.begin(),resultc.end());
std::cout<<"circular fft convoultion (signal1,signal2) = \n"<<resultc<<std::endl;

Definition at line 652 of file convolution.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::fft_circular_crosscorrelation ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  first2,
RandomAccessIterator2  last2,
RandomAccessIterator3  result_first,
RandomAccessIterator3  result_last 
)
inline

Computes the FFT circular crosscorrelation.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/13
Since
1.0.0
Version
0.0.2
Parameters
firstA RandomAccessIterator iterator to the data.
lastA RandomAccessIterator iterator to the data.
first2A RandomAccessIterator iterator to the filter.
last2A RandomAccessIterator iterator to the filter.
result_firstA RandomAccessIterator iterator to the crosscorrelation.
result_lastA RandomAccessIterator iterator to the crosscorrelation.
Precondition
data value type must be the same for the 3 ranges
[first,last) must be valid.
[first,last) and [first2,last2) are assumed to contain data of the same type
[first,last) and [first2,last2) are supposed to be (last-first) periodic
(result_last-result_first) == (last-first)
(last2-first2) == (last-first)
Complexity: 3*K*2*N*log_2(2*N) + N = 6KNlog_2(N) + (4K + 2)N with N = (last-first)
Example:
slip::Array<double> signal1(16);
slip::iota(signal1.begin(),signal1.end(),1.0);
slip::Array<double> signal2(16);
slip::iota(signal2.begin(),signal2.end(),3.0);
slip::Array<double> resultc(16);
std::cout<<"signal1 = \n"<<signal1<<std::endl;
std::cout<<"signal2 = \n"<<signal2<<std::endl;
slip::fft_circular_crosscorrelation(signal1.begin(),signal1.end(),
signal2.begin(),signal2.end(),
resultc.begin(),resultc.end());
std::cout<<"circular fft crosscorrelation (signal1,signal2) = \n"<<resultc<<std::endl;

Definition at line 2397 of file correlation.hpp.

template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::fft_circular_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the circular crosscorrelation between two 2D sequences using fft2d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> (2007/12/05)
Date
2009/23/01
Since
1.0.0
Version
0.0.3
Parameters
in1_upper_leftA 2d input iterator (image).
in1_bottom_rightA 2d input iterator (image).
in2_upper_leftA 2d input iterator (mask).
in2_bottom_rightA 2d input iterator (mask).
out_upper_leftA 2d output iterator (result).
out_bottom_rightA 2d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
(in1_bottom_right - in1_upper_left) == (out_bottom_right - out_upper_left)
(in2_bottom_right - in2_upper_left) == (out_bottom_right - out_upper_left)
Example:
I1.read("image1.jpg");
I2.read("imag2.jpg");
slip::DPoint2d<int> size(size1[0] + size2[0] - 1, size1[1] + size2[1] - 1);
slip::Array2d<double> A1(size[0],size[1],0.0);
slip::Array2d<double> A2(size[0],size[1],0.0);
slip::Box2d<int> box1(size2[0]/2,size2[1]/2,size2[0]/2 + size1[0]-1,size2[1]/2 + size1[1]-1);
slip::Box2d<int> box2(size1[0]/2,size1[1]/2,size1[0]/2 + size2[0]-1,size1[1]/2 + size2[1]-1);
std::copy(I1.upper_left(),I1.bottom_right(),A1.upper_left(box1));
std::copy(I2.upper_left(),I2.bottom_right(),A2.upper_left(box2));
slip::GrayscaleImage<double> OutFFT(size[0],size[1],1.0);
// FFT crosscorrelation calculation
slip::fft_circular_crosscorrelation2d(A1.upper_left(),A1.bottom_right()
,A2.upper_left(),A2.bottom_right(),OutFFT.upper_left(),OutFFT.bottom_right());
slip::change_dynamic_01(OutFFT.upper_left(),OutFFT.bottom_right(),OutFFT.upper_left(),
OutFFT.write("fft_crosscorrelation_2d.jpg");

Definition at line 2548 of file correlation.hpp.

template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void slip::fft_circular_crosscorrelation3d ( InputIterator3d1  in1_front_upper_left,
InputIterator3d1  in1_back_bottom_right,
InputIterator3d2  in2_front_upper_left,
InputIterator3d2  in2_back_bottom_right,
OutputIterator3d  out_front_upper_left,
OutputIterator3d  out_back_bottom_right 
)
inline

Computes the standard crosscorrelation between two 3D sequences using fft3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2009/01/23
Since
1.0.0
Version
0.0.2
Parameters
in1_front_upper_leftA 3d input iterator (volume).
in1_back_bottom_rightA 3d input iterator (volume).
in2_front_upper_leftA 3d input iterator (mask).
in2_back_bottom_rightA 3d input iterator (mask).
out_front_upper_leftA 3d output iterator (result).
out_back_bottom_rightA32d output iterator (result).
Precondition
the value_type of the input ranges should be the same
the value_type of the input ranges have to be real (not complex)
(in1_back_bottom_right - in1_front_upper_left) == (out_back_bottom_right - out_front_upper_left)
(in2_back_bottom_right - in2_front_upper_left) == (out_back_bottom_right - out_front_upper_left)
Example:
slip::Matrix3d<double> Axcorr3(4,4,4);
slip::iota(Axcorr3.begin(),Axcorr3.end(),1.0);
slip::Matrix3d<double> Bxcorr3(4,4,4);
slip::iota(Bxcorr3.begin(),Bxcorr3.end(),10.0);
slip::Matrix3d<double> Cxcorr3(Axcorr3.slices(),Axcorr3.rows(),Axcorr3.cols());
slip::fft_circular_crosscorrelation3d(Axcorr3.front_upper_left(),
Axcorr3.back_bottom_right(),
Bxcorr3.front_upper_left(),
Bxcorr3.back_bottom_right(),
Cxcorr3.front_upper_left(),
Cxcorr3.back_bottom_right());
std::cout<<"fft_circular_crosscorrelation3d(Axcorr3,Bxcorr3,Cxcorr3) = \n "<<Cxcorr3<<std::endl;

Definition at line 2813 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::fft_convolution ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  first2,
RandomAccessIterator2  last2,
RandomAccessIterator3  conv_first,
RandomAccessIterator3  conv_last 
)
inline

Computes the FFT convolution.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> (2008/05/24)
Date
2008/05/24
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator iterator to the data.
lastA RandomAccessIterator iterator to the data.
first2A RandomAccessIterator iterator to the filter.
last2A RandomAccessIterator iterator to the filter.
conv_firstA RandomAccessIterator iterator to the convolution.
conv_lastA RandomAccessIterator iterator to the convolution.
Precondition
[first,last) must be valid.
[first,last) and [first2,last2) are assumed to contain data of the same type
(conv_last-conv_first) >= (last-first) + (last2-first2) - 1
Complexity: 3*K*2*N*log_2(2*N) + N = 6KNlog_2(N) + (4K + 2)N with N = (last-first) + (last2-first2) + 1
Example:
std::vector<float> v(16);
slip::iota(v.begin(),v.end(),0.0f,1.0f);
slip::block<float,7> kernel = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0};
std::vector<float> result_fft2(22);
slip::fft_convolution(v.begin(),v.end(),
kernel.begin(),kernel.end(),
result_fft2.begin(),
result_fft2.end());

Definition at line 710 of file convolution.hpp.

template<typename Vector1 , typename Vector2 , typename Vector3 >
void slip::fft_convolution ( const Vector1 &  Signal,
const Vector2 &  Kernel,
Vector3 &  Result 
)
inline

Computes the fft convolution of signal by a symmetric 1d-kernel.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal1D Container of the input Signal.
Kernel1D Container of the kernel.
Result1D Container of the convolution result.
Precondition
Result.size() == Signal.size() + Kernel.size() - 1
Signal and Kernel are assumed to contain data of the same type
Complexity: 3*K*2*N*log_2(2*N) + N = 6KNlog_2(N) + (4K + 2)N with N = (last-first) + (last2-first2) + 1
Example:
slip::Vector<float> result5(22);
slip::iota(Signal.begin(),Signal.end(),1.0,1.0);
slip::fft_convolution(Signal,kernel,result5);
std::cout<<result5<<std::endl;

Definition at line 773 of file convolution.hpp.

template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::fft_convolution2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the standard crosscorrelation between two 2D sequences using fft2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
(in1_bottom_right - in1_upper_left) + (in2_bottom_right - in2_upper_left) - (1,1) = (out_bottom_right - out_upper_left)
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
std::size_t convA_rows = A.rows()+ Mask2d.rows()-static_cast<std::size_t>(1);
std::size_t convA_cols = A.cols()+ Mask2d.cols()-static_cast<std::size_t>(1);
slip::Array2d<float> ConvA(convA_rows,convA_cols);
slip::fft_convolution2d(A.upper_left(),A.bottom_right(),
Mask2d.upper_left(),Mask2d.bottom_right(),
ConvA.upper_left(),ConvA.bottom_right());
std::cout<<"ConvA = \n"<<ConvA<<std::endl;

Definition at line 2432 of file convolution.hpp.

template<typename Container2d1 , typename Kernel2d , typename Container2d2 >
void slip::fft_convolution2d ( const Container2d1 &  Signal,
const Kernel2d &  Kernel,
Container2d2 &  Result 
)
inline

Computes the convolution of a 2d signal using the fft2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/21
Since
1.0.0
Version
0.0.1
Parameters
Signal2D Container of the input Signal.
Kernel2D Container of the kernel.
Result2D Container of the convolution result.
Precondition
Result.rows() == Signal.rows() + Kernel.rows() - 1
Result.cols() == Signal.cols() + Kernel.cols() - 1
Signal and Kernel are assumed to contain data of the same type.
Example:
//create an array2d and a kernel mask
slip::iota(A.begin(),A.end(),1.0);
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
//print the array2d and the kernel mask
std::cout<<"A = \n"<<A<<std::endl;
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
//computes the fft convolution 2d
std::size_t convA_rows = A.rows()+ Mask2d.rows()-static_cast<std::size_t>(1);
std::size_t convA_cols = A.cols()+ Mask2d.cols()-static_cast<std::size_t>(1);
slip::Array2d<float> ConvA(convA_rows,convA_cols);
slip::fft_convolution2d(A,Mask2d,ConvA);
std::cout<<"ConvA = \n"<<ConvA<<std::endl;

Definition at line 2515 of file convolution.hpp.

template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void slip::fft_convolution3d ( InputIterator3d1  in1_front_upper_left,
InputIterator3d1  in1_back_bottom_right,
InputIterator3d2  in2_front_upper_left,
InputIterator3d2  in2_back_bottom_right,
OutputIterator3d  out_front_upper_left,
OutputIterator3d  out_back_bottom_right 
)
inline

Computes the convolution of two 3D sequences using fft3d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_front_upper_left: A 3d input iterator (volume).
in1_back_bottom_right: A 3d input iterator (volume).
in2_front_upper_left: A 3d input iterator (mask).
in2_back_bottom_right: A 3d input iterator (mask).
out_front_upper_left: A 3d output iterator (result).
out_back_bottom_right: A32d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
((in1_back_bottom_right - in1_front_upper_left)[0]+(in2_back_bottom_right - in2_front_upper_left)[0] - 1) == (out_back_bottom_right - out_front_upper_left)[0]
((in1_back_bottom_right - in1_front_upper_left)[1]+(in2_back_bottom_right - in2_front_upper_left)[1] - 1) == (out_back_bottom_right - out_front_upper_left)[1]
((in1_back_bottom_right - in1_front_upper_left)[2]+(in2_back_bottom_right - in2_front_upper_left)[2] - 1) == (out_back_bottom_right - out_front_upper_left)[2]
Example:
slip::iota(A3.begin(),A3.end(),1.0);
std::cout<<"A3 = \n"<<A3<<std::endl;
slip::Array3d<float> Mask3d(2,3,4);
slip::iota(Mask3d.begin(),Mask3d.end(),10.0,1.0);
std::cout<<"Mask3d = \n"<<Mask3d<<std::endl;
std::size_t convA3_slices = A3.slices()+ Mask3d.slices()-static_cast<std::size_t>(1);
std::size_t convA3_rows = A3.rows()+Mask3d.rows()-static_cast<std::size_t>(1);
std::size_t convA3_cols = A3.cols()+Mask3d.cols()-static_cast<std::size_t>(1));
slip::Array3d<float> ConvA3(convA3_slices,convA3_rows,convA3_cols);
slip::fft_convolution3d(A3.front_upper_left(),A3.back_bottom_right(),
Mask3d.front_upper_left(),Mask3d.back_bottom_right(),
ConvA3.front_upper_left(),ConvA3.back_bottom_right());

Definition at line 3176 of file convolution.hpp.

template<typename Container3d1 , typename Kernel3d , typename Container3d2 >
void slip::fft_convolution3d ( const Container3d1 &  Signal,
const Kernel3d &  Kernel,
Container3d2 &  Result 
)
inline

Computes the convolution of a 3d signal using the fft3d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/21
Since
1.0.0
Version
0.0.1
Parameters
Signal3D Container of the input Signal.
Kernel3D Container of the kernel.
Result3D Container of the convolution result.
Precondition
Result.slices() == Signal.slices() + Kernel.slices() - 1
Result.rows() == Signal.rows() + Kernel.rows() - 1
Result.cols() == Signal.cols() + Kernel.cols() - 1
Signal and Kernel are assumed to contain data of the same type.
Example:
slip::iota(A3.begin(),A3.end(),1.0);
std::cout<<"A3 = \n"<<A3<<std::endl;
slip::Array3d<float> Mask3d(2,3,4);
slip::iota(Mask3d.begin(),Mask3d.end(),10.0,1.0);
std::cout<<"Mask3d = \n"<<Mask3d<<std::endl;
std::size_t convA3_slices = A3.slices()+static_cast<std::size_t>(2)*(Mask3d.slices()-static_cast<std::size_t>(1));
std::size_t convA3_rows = A3.rows()+static_cast<std::size_t>(2)*(Mask3d.rows()-static_cast<std::size_t>(1));
std::size_t convA3_cols = A3.cols()+static_cast<std::size_t>(2)*(Mask3d.cols()-static_cast<std::size_t>(1));
slip::Array3d<float> ConvA3(convA3_slices,convA3_rows,convA3_cols);
slip::fft_convolution3d(A3,Mask3d,ConvA3);

Definition at line 3267 of file convolution.hpp.

template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void slip::fft_convolution3d_same ( InputIterator3d1  in1_front_upper_left,
InputIterator3d1  in1_back_bottom_right,
InputIterator3d2  in2_front_upper_left,
InputIterator3d2  in2_back_bottom_right,
OutputIterator3d  out_front_upper_left,
OutputIterator3d  out_back_bottom_right 
)
inline

Computes the convolution between two 3D sequences using fft3d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/13
Since
1.0.0
Version
0.0.2
Parameters
in1_front_upper_left: A 3d input iterator (volume).
in1_back_bottom_right: A 3d input iterator (volume).
in2_front_upper_left: A 3d input iterator (mask).
in2_back_bottom_right: A 3d input iterator (mask).
out_front_upper_left: A 3d output iterator (result).
out_back_bottom_right: A32d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
(in1_back_bottom_right - in1_front_upper_left) == (out_back_bottom_right - out_front_upper_left)
Example:

Definition at line 3307 of file convolution.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::fft_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
InputIterator2  last2,
OutputIterator  result_first,
OutputIterator  result_last 
)
inline

Computes the standard crosscorrelation between two sequences using fft.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr> (2007/14/04)
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : change the fft algorithm used
Date
2008/10/04
Since
1.0.0
Version
0.0.2
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
result_firstAn Output iterator.
result_lastAn Output iterator.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first,last) must be valid.
[first2,first2 + (last-first)) must be valid.
[result_first,result_first + (last-first)) must be valid.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
slip::fft_crosscorrelation(M.begin(),M.end(),M2.begin(),M2.end());

Definition at line 2250 of file correlation.hpp.

template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::fft_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the standard crosscorrelation between two 2D sequences using fft2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_leftA 2d input iterator (image).
in1_bottom_rightA 2d input iterator (image).
in2_upper_leftA 2d input iterator (mask).
in2_bottom_rightA 2d input iterator (mask).
out_upper_leftA 2d output iterator (result).
out_bottom_rightA 2d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
(in1_bottom_right - in1_upper_left) + (in2_bottom_right - in2_upper_left) - (1,1) = (out_bottom_right - out_upper_left)
Example:
I1.read("image1.jpg");
I2.read("imag2.jpg");
slip::DPoint2d<int> size(size1[0] + size2[0] - 1, size1[1] + size2[1] - 1);
slip::Array2d<double> A1(size[0],size[1],0.0);
slip::Array2d<double> A2(size[0],size[1],0.0);
slip::Box2d<int> box1(size2[0]/2,size2[1]/2,size2[0]/2 + size1[0]-1,size2[1]/2 + size1[1]-1);
slip::Box2d<int> box2(size1[0]/2,size1[1]/2,size1[0]/2 + size2[0]-1,size1[1]/2 + size2[1]-1);
std::copy(I1.upper_left(),I1.bottom_right(),A1.upper_left(box1));
std::copy(I2.upper_left(),I2.bottom_right(),A2.upper_left(box2));
slip::GrayscaleImage<double> OutFFT(size[0],size[1],1.0);
// FFT crosscorrelation calculation
slip::fft_crosscorrelation2d(A1.upper_left(),A1.bottom_right()
,A2.upper_left(),A2.bottom_right(),OutFFT.upper_left(),OutFFT.bottom_right());
slip::change_dynamic_01(OutFFT.upper_left(),OutFFT.bottom_right(),OutFFT.upper_left(),
OutFFT.write("fft_crosscorrelation_2d.jpg");

Definition at line 2627 of file correlation.hpp.

template<typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::fft_crosscorrelation2d_same ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the standard crosscorrelation between two 2D sequences using fft2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_leftA 2d input iterator (image).
in1_bottom_rightA 2d input iterator (image).
in2_upper_leftA 2d input iterator (mask).
in2_bottom_rightA 2d input iterator (mask).
out_upper_leftA 2d output iterator (result).
out_bottom_rightA 2d output iterator (result).
Precondition
(in1_bottom_right - in1_upper_left)[0] == (out_bottom_right - out_upper_left)[0]
(in1_bottom_right - in1_upper_left)[1] == (out_bottom_right - out_upper_left)[1]
Example:
slip::Matrix<float> Axcorr(8,10);
slip::iota(Axcorr.begin(),Axcorr.end(),1.0f);
slip::Matrix<float> Bxcorr(4,4);
slip::iota(Bxcorr.begin(),Bxcorr.end(),10.0f);
std::cout<<"Axcorr = \n"<<Axcorr<<std::endl;
std::cout<<"Bxcorr = \n"<<Bxcorr<<std::endl;
slip::Matrix<double> Cxcorr_s(Axcorr.rows(),Axcorr.cols());
Axcorr.bottom_right(),
Bxcorr.upper_left(),
Bxcorr.bottom_right(),
Cxcorr_s.upper_left(),
Cxcorr_s.bottom_right());
std::cout<<"Cxcorr_s = slip::fft_crosscorrelation2d_same(Axcorr,Bxcorr,Cxcorr_s) = \n"<<Cxcorr_s<<std::endl;
Examples:
fft_crosscorrelation2d.cpp.

Definition at line 2718 of file correlation.hpp.

template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void slip::fft_crosscorrelation3d ( InputIterator3d1  in1_front_upper_left,
InputIterator3d1  in1_back_bottom_right,
InputIterator3d2  in2_front_upper_left,
InputIterator3d2  in2_back_bottom_right,
OutputIterator3d  out_front_upper_left,
OutputIterator3d  out_back_bottom_right 
)
inline

Computes the standard crosscorrelation between two 3D sequences using fft3d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_front_upper_leftA 3d input iterator (volume).
in1_back_bottom_rightA 3d input iterator (volume).
in2_front_upper_leftA 3d input iterator (mask).
in2_back_bottom_rightA 3d input iterator (mask).
out_front_upper_leftA 3d output iterator (result).
out_back_bottom_rightA 3d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
((in1_back_bottom_right - in1_front_upper_left)[0]+(in2_back_bottom_right - in2_front_upper_left)[0] - 1) == (out_back_bottom_right - out_front_upper_left)[0]
((in1_back_bottom_right - in1_front_upper_left)[1]+(in2_back_bottom_right - in2_front_upper_left)[1] - 1) == (out_back_bottom_right - out_front_upper_left)[1]
((in1_back_bottom_right - in1_front_upper_left)[2]+(in2_back_bottom_right - in2_front_upper_left)[2] - 1) == (out_back_bottom_right - out_front_upper_left)[2]
Example:
slip::Matrix3d<double> Axcorr3d(4,8,10);
slip::iota(Axcorr3d.begin(),Axcorr3d.end(),1.0f);
slip::Matrix3d<double> Bxcorr3d(2,2,2);
slip::iota(Bxcorr3d.begin(),Bxcorr3d.end(),10.0f);
std::cout<<"Axcorr3d = \n"<<Axcorr3d<<std::endl;
std::cout<<"Bxcorr3d = \n"<<Bxcorr3d<<std::endl;
slip::Matrix3d<double> Cxcorr3d(Axcorr3d.slices()+Bxcorr3d.slices()-1,
Axcorr3d.rows()+Bxcorr3d.rows()-1,
Axcorr3d.cols()+Bxcorr3d.cols()-1);
slip::fft_crosscorrelation3d(Axcorr3d.front_upper_left(),
Axcorr3d.back_bottom_right(),
Bxcorr3d.front_upper_left(),
Bxcorr3d.back_bottom_right(),
Cxcorr3d.front_upper_left(),
Cxcorr3d.back_bottom_right());
std::cout<<"Cxcorr3d = slip::fft_crosscorrelation3d(Axcorr3d,Bxcorr3d,Cxcorr3d) = \n"<<Cxcorr3d<<std::endl;

Definition at line 2886 of file correlation.hpp.

template<typename InputIterator3d1 , typename InputIterator3d2 , typename OutputIterator3d >
void slip::fft_crosscorrelation3d_same ( InputIterator3d1  in1_front_upper_left,
InputIterator3d1  in1_back_bottom_right,
InputIterator3d2  in2_front_upper_left,
InputIterator3d2  in2_back_bottom_right,
OutputIterator3d  out_front_upper_left,
OutputIterator3d  out_back_bottom_right 
)
inline

Computes the standard crosscorrelation between two 3D sequences using fft3d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/09/17
Since
1.0.0
Version
0.0.1
Parameters
in1_front_upper_leftA 3d input iterator (volume).
in1_back_bottom_rightA 3d input iterator (volume).
in2_front_upper_leftA 3d input iterator (mask).
in2_back_bottom_rightA 3d input iterator (mask).
out_front_upper_leftA 3d output iterator (result).
out_back_bottom_rightA32d output iterator (result).
Precondition
the value_type of the input sequences have to be real (not complex)
(in1_back_bottom_right - in1_front_upper_left) == (out_back_bottom_right - out_front_upper_left)
Example:
slip::Matrix3d<double> Axcorr3d(4,8,10);
slip::iota(Axcorr3d.begin(),Axcorr3d.end(),1.0f);
slip::Matrix3d<double> Bxcorr3d(2,2,2);
slip::iota(Bxcorr3d.begin(),Bxcorr3d.end(),10.0f);
std::cout<<"Axcorr3d = \n"<<Axcorr3d<<std::endl;
std::cout<<"Bxcorr3d = \n"<<Bxcorr3d<<std::endl;
slip::Matrix3d<double> Cxcorr3d_s(Axcorr3d.slices(),
Axcorr3d.rows(),
Axcorr3d.cols());
slip::fft_crosscorrelation3d_same(Axcorr3d.front_upper_left(),
Axcorr3d.back_bottom_right(),
Bxcorr3d.front_upper_left(),
Bxcorr3d.back_bottom_right(),
Cxcorr3d_s.front_upper_left(),
Cxcorr3d_s.back_bottom_right());
std::cout<<"Cxcorr3d_s = slip::fft_crosscorrelation3d_same(Axcorr3d,Bxcorr3d,Cxcorr3d_s) = \n"<<Cxcorr3d<<std::endl;

Definition at line 2993 of file correlation.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::fft_crosscorrelation_same ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
InputIterator2  last2,
OutputIterator  result_first,
OutputIterator  result_last 
)
inline

Computes the FFT central part of the crosscorrelation.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/10/08
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator iterator to the data.
lastA RandomAccessIterator iterator to the data.
first2A RandomAccessIterator iterator to the filter.
last2A RandomAccessIterator iterator to the filter.
result_firstA RandomAccessIterator iterator to the correlation.
result_lastA RandomAccessIterator iterator to the correlation.
Precondition
data value type must be the same for the 3 ranges
[first,last) must be valid.
[first,last) and [first2,last2) are assumed to contain data of the same type
[first,last) and [first2,last2) are supposed to be (last-first) periodic
(result_last - result_first) == (last-first)
(last2-first2) == (last-first)
Complexity: 3*K*2*N*log_2(2*N) + N = 6KNlog_2(N) + (4K + 2)N with N = (last-first) + (last2-first2) + 1
Example:
slip::Array<double> signal1(16);
slip::iota(signal1.begin(),signal1.end(),1.0);
slip::Array<double> signal2(16);
slip::iota(signal2.begin(),signal2.end(),3.0);
slip::Array<double> resultc(16);
std::cout<<"signal1 = \n"<<signal1<<std::endl;
std::cout<<"signal2 = \n"<<signal2<<std::endl;
slip::fft_crosscorrelation_same(signal1.begin(),signal1.end(),
signal2.begin(),signal2.end(),
resultc.begin(),resultc.end());
std::cout<<"fft crosscorrelation_same(signal1,signal2) = \n"<<resultc<<std::endl;

Definition at line 2322 of file correlation.hpp.

template<class ForwardIterator1 , class ForwardIterator2 >
void slip::fftduplicate ( ForwardIterator1  begin1,
ForwardIterator2  begin2,
ForwardIterator2  end2 
)
inline

Calculates the conjugates of the begin std::complex elements of a first container. Writes them at the end of a second container. This function is used to calculate the negative frequencies after a real fftw.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/04
Since
1.0.0
Version
0.0.1
Parameters
begin1A ForwardIterator at the beginning of the input container
begin2A ForwardIterator at the beginning of the output container
end2A ForwardIterator at the end of the output container.
Precondition
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)
both containers must have std::complex elements

Definition at line 1582 of file FFT.hpp.

template<class ForwardIterator2D >
void slip::fftduplicate2d ( ForwardIterator2D  upper_left,
ForwardIterator2D  bottom_right 
)
inline

Performs a duplicate of a 2D container, for use with the fft2d and ifft2d functions, in order to calculate the negative frequencies with the real fftw2d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/04
Since
1.0.0
Version
0.0.1
Parameters
upper_leftA ForwardIterator on std::complex numbers
bottom_rightA ForwardIterator on std::complex numbers
Precondition
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1613 of file FFT.hpp.

template<class ForwardIterator >
void slip::fftshift ( ForwardIterator  first,
ForwardIterator  last 
)
inline

Performs a shift of a container, for use with the fft and ifft functions, in order to move the frequency 0 to the center of the container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/12/07
Since
1.0.0
Version
0.0.2
Parameters
firstA ForwardIterator.
lastA ForwardIterator.
fftshift.jpg
FFT shifting convention

Definition at line 166 of file FFT.hpp.

template<class ForwardIterator2D >
void slip::fftshift2d ( ForwardIterator2D  upper_left,
ForwardIterator2D  bottom_right 
)
inline

Performs a shift of a 2d container, for use with the fft2d and ifft2d functions, in order to move the frequency 0 to the center of the container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/12/07
Version
0.0.1
Since
1.0.0
Parameters
upper_leftA ForwardIterator2D.
bottom_rightA ForwardIterator2D.
fftshift2d.jpg
FFT shifting convention
Examples:
fft2d.cpp.

Definition at line 191 of file FFT.hpp.

template<class ForwardIterator3D >
void slip::fftshift3d ( ForwardIterator3D  front_upper_left,
ForwardIterator3D  back_bottom_right 
)
inline

Performs a shift of a 2d container, for use with the fft2d and ifft2d functions, in order to move the frequency 0 to the center of the container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/12/07
Since
1.0.0
Version
0.0.1
Parameters
front_upper_leftA ForwardIterator3D.
back_bottom_rightA ForwardIterator3D.
fftshift3d.jpg
FFT shifting convention

Definition at line 230 of file FFT.hpp.

template<class ForwardIterator4D >
void slip::fftshift4d ( ForwardIterator4D  first_front_upper_left,
ForwardIterator4D  last_back_bottom_right 
)
inline

Performs a shift of a 4d container, for use with the fft4d and ifft4d functions, in order to move the frequency 0 to the center of the container.

Version
Fluex 1.0
Date
2013/08/23
Since
1.4.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Parameters
first_front_upper_leftA ForwardIterator4D.
last_back_bottom_rightA ForwardIterator4D.

Definition at line 3058 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::fftw_dct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the Discrete Cosinus Transform II (forward) of a container (from fftw).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)
Postcondition
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$

Definition at line 2327 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::fftw_idct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the Discrete Cosinus Transform III (backward) of a container (from fftw).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration))
Postcondition
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$

Definition at line 2362 of file FFT.hpp.

template<typename _II >
void slip::fill_border ( _II  first,
_II  last,
std::size_t  b_size = 1,
const typename std::iterator_traits< _II >::value_type &  value = typename std::iterator_traits<_II>::value_type() 
)

Fills the border of the range [first,last) with value.

Since
1.0.0
Parameters
firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
lastRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
b_sizeSize of the border (1 by default).
valueThe value to fill the range (0 by default).
Precondition
first, last must be of the same iterator_category.
(last-first) >= 2 *size
//The input grayscale image
slip::iota(I2.begin(),I2.end(),1.0);
//The enlarged grayscale image
slip::GrayscaleImage<double> tmp2(I2.rows()+(2*b_size),
I2.cols()+(2*b_size));
//add border to I2 in tmp2 with slip::BORDER_TREATMENT_NEUMANN conditions
//and a border size of 2
std::size_t b_size = 2;
tmp2.upper_left(),tmp2.bottom_right(),
//fill border of tmp2 with 4
slip::fill_border(tmp2.upper_left(),tmp2.bottom_right(),
b_size,double(4));
//update border with slip::BORDER_TREATMENT_NEUMANN condition
slip::update_border(tmp.begin(),tmp.end(),

Definition at line 440 of file border_treatment.hpp.

template<typename Container2d >
void slip::fill_diagonal ( Container2d &  container,
const typename Container2d::value_type &  val,
const int  diag_number = 0 
)

Fill the diagonal diag_number of a 2d container with the value val.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
containerA 2d container
valvalue
diag_numbernumber of the diagonal:
  • 0 the diagonal (default value)
  • a negative number corresponds to a lower diagonal
  • a positive number corresponds to an upper diagonal
Precondition
container.dim1() == container.dim2()
std::abs(diag_number) < container.dim1()
Example:
std::cout<<"fill main diagonal with 1.0 :"<<std::endl;
std::cout<<"fill first upper diagonal with 2.0 :"<<std::endl;
std::cout<<"fill first lower diagonal with -2.0 :"<<std::endl;
slip::fill_diagonal(AA,-2.0,-1);
std::cout<<"fill second upper diagonal with 3.0 :"<<std::endl;
std::cout<<"fill second lower diagonal with -3.0 :"<<std::endl;
slip::fill_diagonal(AA,-3.0,-2);
std::cout<<"new AA ="<<std::endl;
std::cout<<AA<<std::endl;

Definition at line 3503 of file linear_algebra.hpp.

template<typename MatrixIterator >
void slip::fill_diagonal ( MatrixIterator  M_up,
MatrixIterator  M_bot,
const typename MatrixIterator::value_type &  val,
const int  diag_number = 0 
)

Fill the diagonal diag_number of a 2d range with the value val.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
M_upiterator2d to the upper_left element of the range.
M_botiterator2d to the bottom_right element og the range.
valvalue
diag_numbernumber of the diagonal:
  • 0 the diagonal (default value)
  • a negative number corresponds to a lower diagonal
  • a positive number corresponds to an upper diagonal
Precondition
std::abs(diag_number) < (M_bot-M_up)[0]
Example:
slip::fill_diagonal(AA.upper_left(),AA.bottom_right(),1.5,-2);
std::cout<<"new AA ="<<std::endl;
std::cout<<AA<<std::endl;

Definition at line 3556 of file linear_algebra.hpp.

template<class Container2D >
void slip::finite_diff_coef ( const std::size_t  sch_ord,
const std::size_t  sch_shift,
Container2D &  Dinv 
)
inline

return finite differences coefficients for derivation based on Taylor series (sch_ord-sch_shift steps upwind).

Author
Ludovic Chatellier <ludovic.chatellier_AT_lea.univ-poitiers.fr>
Date
2007/11/21
Since
1.0.0
Version
0.0.1
Parameters
sch_ordOrder of derivation scheme.
sch_shiftLeft shift of derivation scheme.
DinvContainer2D which will filled with Taylor series coefficients
Precondition
sch_ord must be >= sch_shift
The value type of the container must be real
Example:
std::size_t sch_order = 2;
std::size_t sch_shift = sch_order/2;
slip::finite_diff_coef(sch_order,sch_shift,Dinv);
std::cout<<Dinv<<std::endl;
Todo:
change from finite differences matrix inversion to analytic stencil

Definition at line 156 of file derivatives.hpp.

template<class Container2D >
void slip::finite_diff_coef ( const std::size_t  sch_ord,
const std::size_t  sch_shift,
const typename Container2D::value_type &  h,
Container2D &  Dinv 
)
inline

return finite differences coefficients for derivation based on Taylor series (sch_ord-sch_shift steps upwind)

Author
Ludovic Chatellier <ludovic.chatellier_AT_lea.univ-poitiers.fr>
Date
2009/03/25
Since
1.0.0
Version
0.0.1
Parameters
sch_ordOrder of derivation scheme.
sch_shiftLeft shift of derivation scheme.
hstep of the grid.
DinvContainer2D which will filled with Taylor series coefficients
Precondition
sch_ord must be >= sch_shift
The value type of the container must be real
h != 0
Example:
std::size_t sch_order = 2;
std::size_t sch_shift = sch_order/2;
double step = 0.1;
slip::finite_diff_coef(sch_order,sch_shift,step,Dinv);
std::cout<<Dinv<<std::endl;
Todo:
change from finite differences matrix inversion to analytic stencil

Definition at line 213 of file derivatives.hpp.

template<typename KernelsIterator >
void slip::finite_diff_kernels ( const std::size_t  der_ord,
const std::size_t  sch_ord,
const std::size_t  sch_shift,
std::vector< KernelsIterator > &  kernels_first 
)
inline

Computes finite differences kernels for derivation based on Taylor series (sch_ord-sch_shift steps upwind)

Author
Benoit Tremblais <benoit.tremblais_AT_sic.univ-poitiers.fr>
Date
2007/11/26
Since
1.0.0
Version
0.0.1
Parameters
der_ordOrder of the derivative.
sch_ordOrder of derivation scheme.
sch_shiftLeft shift of derivation scheme.
kernels_firststd::vector which contains the begin iterators of the kernels.
Precondition
sch_ord must be >= sch_shift
The value type of the container must be real
Example:
double data[]={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,11.0,14.0};
std::cout<<"Data to derivate "<<std::endl;
std::copy(data,data+10,std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;
slip::derivative(data,data+ 10, 1,sch_order,sch_shift,Dinv,result.begin());
std::cout<<"First derivative, order = "<<sch_order<<" : "<<std::endl;
std::copy(result.begin(),result.end(),std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;

Definition at line 283 of file derivatives.hpp.

template<typename KernelsIterator >
void slip::finite_diff_kernels ( const std::size_t  der_ord,
const std::size_t  sch_ord,
const std::size_t  sch_shift,
const typename std::iterator_traits< KernelsIterator >::value_type &  h,
std::vector< KernelsIterator > &  kernels_first 
)
inline

Computes finite differences kernels for derivation based on Taylor series (sch_ord-sch_shift steps upwind)

Author
Benoit Tremblais <benoit.tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/25
Since
1.0.0
Version
0.0.1
Parameters
der_ordOrder of the derivative.
sch_ordOrder of derivation scheme.
sch_shiftLeft shift of derivation scheme.
kernels_firststd::vector which contains the begin iterators of the kernels.
hgrid step.
Precondition
sch_ord must be >= sch_shift
The value type of the container must be real
Example:
double data[]={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,11.0,14.0};
std::cout<<"Data to derivate "<<std::endl;
std::copy(data,data+10,std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;
slip::derivative(data,data+ 10, 1,sch_order,sch_shift,Dinv,result.begin());
std::cout<<"First derivative, order = "<<sch_order<<" : "<<std::endl;
std::copy(result.begin(),result.end(),std::ostream_iterator<double>(std::cout," "));
std::cout<<std::endl;

Definition at line 341 of file derivatives.hpp.

template<typename RandomAccessIterator >
std::iterator_traits<RandomAccessIterator>::value_type slip::first_quartile ( RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Computes the first quartile value from a non sorted range.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Since
1.0.0
Date
2009/08/26
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
Returns
The first quartile value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::first_quartile(M2.begin(),M2.end())<<std::endl;

Definition at line 1199 of file statistics.hpp.

template<typename InputIterator , typename Predicate >
std::iterator_traits<InputIterator>::value_type slip::first_quartile_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the first quartile value from a non sorted range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
preda predicate function
Returns
The first quartile value of the range.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::first_quartile_if(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 3440 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator >
std::iterator_traits<InputIterator>::value_type slip::first_quartile_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the first quartile value from a non sorted range over a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
mask_firstAn InputIterator of the mask
valueMask value.
Returns
The first quartile value of the range.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout<<slip::first_quartile_mask(M.begin(),M.end(),ValuedMask.begin(),2)<<std::endl;

Definition at line 2379 of file statistics.hpp.

template<typename HessenbergMatrix , typename Matrix >
bool slip::Francis_QR_Step ( HessenbergMatrix &  H,
Matrix &  Z,
slip::Box2d< int >  box,
bool  compute_z 
)
inline

Computes the Francis QR Step used in the Schur decomposition

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-1 in "Matrix Computations", Golub and Van Loan.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Since
1.0.0
Version
0.0.1
Parameters
H2D container for the Input Hessenberg Matrix
Z2D container for the Z matrix
boxdefines the part of the H matrix to be considered
compute_ztrue if Z has to be computed
Precondition
H has to be an Hessenberg Matrix i.e. upper quasi-triangular

Definition at line 750 of file linear_algebra_qr.hpp.

template<class HessenbergMatrix , class Vector , class Matrix >
bool slip::Francis_Schur_decomp ( HessenbergMatrix &  H,
Vector &  Eig,
Matrix &  Z,
slip::Box2d< int > &  box,
typename slip::lin_alg_traits< typename HessenbergMatrix::value_type >::value_type  precision,
bool  compute_Z 
)
inline

computes the Schur decomposition of a square Hessenberg Matrix and copy the eigenvalues in the Eig vector :

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-2 in "Matrix Computations", Golub and Van Loan.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Since
1.0.0
Version
0.0.1
Parameters
H2D container for the Input Hessenberg Matrix
Eigcontainer for eigenvalues
Z2D container for the Z matrix
boxdefines the part of H to be considered
precisiondefines the precision of the iterations
compute_Ztrue if Z has to be computed
Precondition
H.rows() == H.cols();
Z.rows() == Z.cols();
Eig.size() == H.cols();
Z.rows() == H.rows();
box.width() == box.height();
box.width() <= (int)H.rows();
Todo:
optimize Francis_Schur_decomp
Example:
double d[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0};
slip::Box2d<int> box(0,0,2,2);
slip::Francis_Schur_decomp(H,Eig,Z,box,10E-10,true);
std::cout<<" H \n"<<std::endl;
std::cout<< H <<std::endl;
// 25.6119 9.86248 4.17549
// 0 -3.46543 1.81572
// -1.80176e-27 0 -0.146469
std::cout<<" Eigenvalues\n"<<std::endl;
std::cout<< Eig <<std::endl;
//((25.6119,0),(-3.46543,0),(-0.146469,0))

Definition at line 989 of file linear_algebra_qr.hpp.

template<class HessenbergMatrix , class Vector , class Matrix >
void slip::Francis_Schur_standardize ( HessenbergMatrix &  H,
Vector &  Eig,
Matrix &  Z,
slip::Box2d< int >  b22,
bool  compute_z 
)
inline

Converts a 2-by-2 diagonal block of H in the Schur form, normalizes H and extract the associated eigenvalues.

\[ H = Z \times H \times Z^{t}\]

Algorithm 7.5-1 in "Matrix Computations", Golub and Van Loan.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Version
0.0.1
Since
1.0.0
Parameters
H2D container for the Input Hessenberg Matrix
Eigcontainer for eigenvalues
Z2D container for the Z matrix
b222_by_2 box that defines the diagonal block to be considered
compute_ztrue if Z has to be computed
Precondition
b22 has to be a 2 by 2 box

Definition at line 850 of file linear_algebra_qr.hpp.

template<typename RandomAccessIterator2d >
slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator2d>::value_type>::value_type slip::frobenius_norm ( RandomAccessIterator2d  upper_left,
RandomAccessIterator2d  bottom_right 
)
inline

Computes the Frobenius norm ( $\sum_{i,j} \bar{a_{ij}}a_{i,j}$) of a 2d range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/04/10
Since
1.0.0
Version
0.0.1
Parameters
upper_leftRandomAccessIterator2d: first element of the 2d range.
bottom_rightRandomAccessIterator2d: one past-the-end of the 2d range.
Returns
The Frobenius norm of the 2d range.
Precondition
bottom_right - upper_left != slip::Dpoint2d<int>(0,0)
Remarks
It corresponds to the infinite norm of a Matrix.
Works with real and complex matrix.
Complexity: rows*cols flops
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"Frobenius norm of M = "<<slip::frobenius_norm(M.upper_left(),M.bottom_right())<<std::endl;

Definition at line 3286 of file linear_algebra.hpp.

template<typename Container2d >
slip::lin_alg_traits<typename Container2d::value_type>::value_type slip::frobenius_norm ( const Container2d &  container)
inline

Computes the Frobenius norm ( $\sum_{i,j} \bar{a_{ij}}a_{i,j}$) of a Container2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
containerContainer2d.
Returns
The column norm of the 2d container.
Precondition
container.size() != 0
Remarks
It corresponds to the L1 norm of a Matrix.
Works with real and complex matrix.
Complexity: rows*cols flops
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"Frobenius norm of M = "<<slip::frobenius_norm(M)<<std::endl;

Definition at line 3315 of file linear_algebra.hpp.

template<typename SrcIter , typename KernelIter , typename ResIter >
void slip::full_convolution ( SrcIter  first,
SrcIter  last,
KernelIter  kernel_first,
KernelIter  kernel_last,
ResIter  result 
)
inline

Computes the full convolution of signal by a 1d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/11/26
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
kernel_firstA RandomAccessIterator.
kernel_lastA RandomAccessIterator.
resultA RandomAccessIterator.
Precondition
size(result) = size(last - first + ksize_left + ksize_right - 1)
Description:
If the signal size is N, and the kernel size is K = ksize_left + ksize_right + 1, the size of the result will be N + (ksize_left + ksize_right + 1) - 1
Example:
std::vector<float> v(16);
for(int i = 0; i < 16; ++i)
v[i] = i + 1;
slip::block<float,7> kernel = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
7.0};
std::vector<float> result2(22);
slip::full_convolution(v.begin(),v.end(),
kernel.begin(),kernel.end(),
result2.begin());

Definition at line 192 of file convolution.hpp.

template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void slip::full_convolution2d ( SrcIter2d  S_up,
SrcIter2d  S_bot,
KernelIter2d  kernel_up,
KernelIter2d  kernel_bot,
ResIter2d  R_up,
ResIter2d  R_bot 
)
inline

Computes the full convolution of 2d signal by a 2d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/21
Since
1.0.0
Version
0.0.1
Parameters
S_upA RandomAccessIterator2d.
S_botA RandomAccessIterator2d.
kernel_upA RandomAccessIterator2d.
kernel_botA RandomAccessIterator2d.
R_upA RandomAccessIterator2d.
R_botA RandomAccessIterator2d.
Precondition
(R_bot-R_up)[0] = ((S_bot-S_up)[0] + (kernel_bot-kernel_up)[0] - 1)
(R_bot-R_up)[1] = ((S_bot-S_up)[1] + (kernel_bot-kernel_up)[1] - 1)
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
slip::Array2d<float> ConvAfull(A.rows()+Mask2d.rows()-1,
A.cols()+Mask2d.cols()-1);
slip::full_convolution2d(A.upper_left(),A.bottom_right(),
Mask2d.upper_left(),Mask2d.bottom_right(),
ConvAfull.upper_left(),ConvAfull.bottom_right());
std::cout<<"ConvAfull = \n"<<ConvAfull<<std::endl;

Definition at line 2165 of file convolution.hpp.

template<class Matrix , class Vector1 , class Vector2 >
bool slip::gauss_solve ( const Matrix &  M,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  precision 
)
inline

Solve the linear system M*X=B using the Gauss elemination partial pivoting.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adapt for complex matrix
Date
2009/03/01
Since
1.0.0
Version
0.0.2
Parameters
M2D container
X1D container
B1D container
precision
Returns
false if the system can't be solved
Precondition
M.rows() == M.cols()
M.cols() == X.size()
X.size() == B.size()
Remarks
If M is singular an exception will be raised.
Works with real and complex data
This method is numerically instable. That is to say you should use it for small and well conditioned matrices. For other matrices, you should prefer eucidean methods like QR, Cholesky... This method is well apdated to tridiagonal or Hessenberg matrices.
Complexity almost n^3/3 + O(n^2) comparisons
Example:
// G(0,0) = 0.0;
double bg[] = {22.0,7.0,4.5,1.0};
std::cout<< "G : " <<std::endl;
std::cout<< G <<std::endl;
std::cout<< "B : " <<std::endl;
std::cout<< Bg <<std::endl;
if(slip::gauss_solve(G,Xg,Bg,10E-6))
std::cout << "Gauss ok!\n";
else
{
std::cout << "Gauss not ok!\n";
}
std::cout<< "X : " <<std::endl;
std::cout<< Xg <<std::endl;
std::cout<< "Check : "<<std::endl;
std::cout<< "Bg2 = G Xg: " <<std::endl;
std::cout<< Bg2 <<std::endl;

Definition at line 7566 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
bool slip::gauss_solve_with_filling ( const Matrix &  M,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  precision 
)
inline

Solve the linear system M*X=B with the Gauss pivot method, the null pivot are replaced by precision.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adapt for complex matrix
Date
2009/03/01
Since
1.0.0
Version
0.0.2
Parameters
M2D container
X1D container
B1D container
precision
Returns
false if the system has been filled.
Precondition
M.rows() == M.cols()
M.cols() == X.size()
X.size() == B.size()
Remarks
If M is singular an exception will be raised.
Works with real and complex data
This method is numerically instable. That is to say you should use it for small and well conditioned matrices. For other matrices, you should prefer eucidean methods like QR, Cholesky... This method is well apdated to tridiagonal or Hessenberg matrices.
Complexity almost n^3/3 + O(n^2) comparisons
Example:
// G(0,0) = 0.0;
double bg[] = {22.0,7.0,4.5,1.0};
std::cout<< "G : " <<std::endl;
std::cout<< G <<std::endl;
std::cout<< "B : " <<std::endl;
std::cout<< Bg <<std::endl;
std::cout << "Gauss ok!\n";
else
{
std::cout << "Gauss not ok!\n";
}
std::cout<< "X : " <<std::endl;
std::cout<< Xg <<std::endl;
std::cout<< "Check : "<<std::endl;
std::cout<< "Bg2 = G Xg: " <<std::endl;
std::cout<< Bg2 <<std::endl;

Definition at line 7687 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d , typename RandomAccessIterator2 >
std::iterator_traits<RandomAccessIterator2>::value_type slip::gen_inner_product ( RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2d  A_upper_left,
RandomAccessIterator2d  A_bottom_right,
RandomAccessIterator2  first2,
RandomAccessIterator2  last2,
typename std::iterator_traits< RandomAccessIterator2 >::value_type  init = typename std::iterator_traits<RandomAccessIterator2>::value_type() 
)
inline

Computes the generalized inner_product of two ranges:

\[ (x,y)_A = \overline{x}^T A y = x^H A y \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
first1RandomAccessIterator to the first element of the vector x.
last1RandomAccessIterator to one-past-the-end element of the vector x.
A_upper_leftRandomAccessIterator2d to the upper_left matrix element.
A_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
first2RandomAccessIterator to the first element of the vector y.
last2RandomAccessIterator to one-past-the-end element of the vector y.
initinitial value (0 by default)
Returns
inner_product value.
Precondition
(last2 - first2) == (A_bottom_right - A_upper_left)[1]
(last1 - first1) >= (last2 - first2)
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dci[] = {TC(1,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2)};
slip::Array2d<TC> Mic(3,3,dci);
std::cout<<"Mic = "<<std::endl;
std::cout<<Mic<<std::endl;
TC xic[] = {TC(1,1),TC(2,1),TC(2,3)};
slip::Array<TC> Xic(Mic.cols(),xic);
std::cout<<"Xic = "<<std::endl;
std::cout<<Xic<<std::endl;
TC yic[] = {TC(2,1),TC(1,3),TC(2,4)};
slip::Array<TC> Yic(Mic.cols(),yic);
std::cout<<"Yic = "<<std::endl;
std::cout<<Yic<<std::endl;
std::cout<<"Xic^H Mic Yic = "<<std::endl;
std::cout<<slip::gen_inner_product(Xic.begin(),Xic.end(),
Mic.upper_left(),
Mic.bottom_right(),
Yic.begin(),Yic.end())<<std::endl;

Definition at line 442 of file linear_algebra.hpp.

template<typename Vector1 , typename Matrix , typename Vector2 >
Vector2::value_type slip::gen_inner_product ( const Vector1 &  X,
const Matrix &  M,
const Vector2 &  Y 
)
inline

Computes the generalized inner_product of two ranges:

\[ (x,y)_A = \overline{x}^T A y = x^H A y \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
XThe vector x.
MThe matrix M.
YThe vector y.
Returns
generalized inner_product value.
Precondition
Y.size() == A.cols()
X.size() >= Y.size()
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dci[] = {TC(1,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2)};
slip::Array2d<TC> Mic(3,3,dci);
std::cout<<"Mic = "<<std::endl;
std::cout<<Mic<<std::endl;
TC xic[] = {TC(1,1),TC(2,1),TC(2,3)};
slip::Array<TC> Xic(Mic.cols(),xic);
std::cout<<"Xic = "<<std::endl;
std::cout<<Xic<<std::endl;
TC yic[] = {TC(2,1),TC(1,3),TC(2,4)};
slip::Array<TC> Yic(Mic.cols(),yic);
std::cout<<"Yic = "<<std::endl;
std::cout<<Yic<<std::endl;
std::cout<<"Xic^H Mic Yic = "<<std::endl;
std::cout<<slip::gen_inner_product(Xic,Mic,Yic)<<std::endl;

Definition at line 509 of file linear_algebra.hpp.

template<typename RandomAccessIterator2d1 , typename RandomAccessIterator2d2 , typename RandomAccessIterator2d3 >
void slip::gen_matrix_matrix_multiplies ( RandomAccessIterator2d1  A_up,
RandomAccessIterator2d1  A_bot,
RandomAccessIterator2d2  B_up,
RandomAccessIterator2d2  B_bot,
RandomAccessIterator2d3  C_up,
RandomAccessIterator2d3  C_bot 
)
inline

Computes the generalized multiplication of a two Matrix:

\[C = AB + C\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
B_up2D iterator on the upper_left element of B container
B_bot2D iterator on the bottom_right element of B container
C_up2D iterator on the upper_left element of C container
C_bot2D iterator on the bottom_right element of C container
Precondition
A, B and C should contain data of the same value type
(A_bot-A_up)[1] == (B_bot-B_up)[0]
(A_bot-A_up)[0] == (C_bot-C_up)[0]
(B_bot-B_up)[1] == (C_bot-C_up)[1]
Remarks
Works with real and complex data.
Example:
slip::iota(A.begin(),A.end(),0.0);
std::cout<<"A = "<<std::endl;
std::cout<<A<<std::endl;
slip::iota(B.begin(),B.end(),0.0);
std::cout<<"B = "<<std::endl;
std::cout<<B<<std::endl;
slip::iota(C.begin(),C.end(),2.0);
std::cout<<"C = "<<std::endl;
std::cout<<C<<std::endl;
std::cout << "C = AB + C " << std::endl;
slip::gen_matrix_matrix_multiplies(M.upper_left(),M.bottom_right(),
M2.upper_left(),M2.bottom_right(),
C.upper_left(),C.bottom_right());
std::cout<<C<<std::endl;

Definition at line 1741 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::gen_matrix_matrix_multiplies ( const Matrix1 &  A,
const Matrix2 &  B,
Matrix3 &  C 
)
inline

Computes the generalized multiplication of a two Matrix:

\[C = AB + C\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
AThe first Matrix container.
BThe second Matrix container.
CThe third input/output Matrix
Precondition
A must have row_begin iterators.
B must have col_begin iterators.
A, B and C must have the double bracket accessor
A, B and C should contain data of the same value type
A.cols == B.rows()
A.rows == C.rows()
B.cols == C.cols()
Remarks
Works with real and complex data.
Example:
slip::iota(A.begin(),A.end(),0.0);
std::cout<<"A = "<<std::endl;
std::cout<<A<<std::endl;
slip::iota(B.begin(),B.end(),0.0);
std::cout<<"B = "<<std::endl;
std::cout<<B<<std::endl;
slip::iota(C.begin(),C.end(),2.0);
std::cout<<"C = "<<std::endl;
std::cout<<C<<std::endl;
std::cout << "C = AB + C " << std::endl;
std::cout<<C<<std::endl;

Definition at line 1811 of file linear_algebra.hpp.

template<typename RandomAccessIterator2d , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::gen_matrix_vector_multiplies ( RandomAccessIterator2d  M_up,
RandomAccessIterator2d  M_bot,
RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
RandomAccessIterator2  Y_first,
RandomAccessIterator2  Y_last 
)
inline

Computes the generalised multiplication of a Matrix and a Vector: computes the update

\[Y = MV + Y \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M_upRandomAccessIterator2d to the upper_left matrix element.
M_botRandomAccessIterator2d to the bottom_right matrix element.
V_firstRandomAccessIterator to the first element of the Vector V.
V_lastRandomAccessIterator to one-past-the-end element of the vector V.
Y_firstRandomAccessIterator to the first element of the Vector Y.
Y_lastRandomAccessIterator to one-past-the-end element of the vector Y.
Precondition
(M_bot - M_up)[1] == (V_last - V_first)
(Y_last - Y_first) == (M_bot - M_up)[0]
Remarks
Works with real and complex data.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
slip::iota(Y.begin(),Y.end(),2.0);
std::cout<<"Y = "<<std::endl;
std::cout<<Y<<std::endl;
slip::gen_matrix_vector_multiplies(M.upper_left(),M.bottom_right(),
V1.begin(),V1.end(),
Y.begin(),Y.end());
std::cout << "Y = MV + Y " <<std::endl;
std::cout<<Y<<std::endl;

Definition at line 1510 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::gen_matrix_vector_multiplies ( const Matrix &  M,
const Vector1 &  V,
Vector2 &  Y 
)
inline

Computes the generalised multiplication of a Matrix and a Vector: computes the update

\[Y = MV + Y\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
MThe Matrix container.
VThe Vector container.
YThe Vector container.
Precondition
M must have row_begin iterators.
V and Y must be compatible with the Container concept of the STL.
M.cols() == V.size()
Y.size() == M.rows()
Remarks
Works with real and complex data.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
slip::iota(Y.begin(),Y.end(),2.0);
std::cout<<"Y = "<<std::endl;
std::cout<<Y<<std::endl;
std::cout << "Y = MV + Y " <<std::endl;
std::cout<<Y<<std::endl;

Definition at line 1574 of file linear_algebra.hpp.

template<typename RegularVector2dField2d >
void slip::generic_plt_to_RegularVector2dField2d ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
const int  zone_loaded = 1 
)

Read a slip::RegularVector2dField2d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
titleTitle of the tecplot frame.
zoneName of the tecplot zone.
varnamesVector containing the variable names.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_2D.plt" file, put the data in the container2d Reg and get the title, zone name and variable names.
std::string file_name="test_2D.plt", title, zonename;
std::vector<std::string> varnames;
plt_to_RegularVector2dField2d(file_name, Reg, title, zonename, varnames);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<varnames.size(); ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the RegularVector2dField2d are "<<Reg.dim1()<<", "<<Reg.dim2()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 2367 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::generic_plt_to_RegularVector2dField2d ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
const int  zone_loaded = 1 
)

Read a slip::RegularVector2dField2d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_2D.plt" file and put the data in the container3d Reg.
std::string file_name="test_2D.plt";
std::cout<<"The dimensions of the RegularVector2dField2d are "<<Reg.dim1()<<", "<<Reg.dim2()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 2513 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::generic_plt_to_RegularVector3dField3d ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
const int  zone_loaded = 1 
)

Read a slip::RegularVector3dField3d from a binary tecplot file even if data are not properly sorted. This function is slower than plt_to_RegularVector3dField3d().

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2013/11/20
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
titleTitle of the tecplot frame.
zonenameName of the tecplot zone.
varnamesName of all the variables.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_sort_3D.plt" file, put the data in the container3d Reg and get the title, zone name and variable names.
std::string file_name="test_sort_3D.plt", title, zonename;
std::vector<std::string> varnames;
generic_plt_to_RegularVector3dField3d(file_name, Reg, title, zonename, varnames);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<varnames.size(); ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the RegularVector3dField3d are "<<Reg.dim1()<<", "<<Reg.dim2()<<", "<<Reg.dim3()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 1374 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::generic_plt_to_RegularVector3dField3d ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
const int  zone_loaded = 1 
)

Read a slip::RegularVector3dField3d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_sort_3D.plt" file and put the data in the container3d Reg.
std::string file_name="test_sort_3D.plt";
std::cout<<"The dimensions of the RegularVector3dField3d are "<<Reg.dim1()<<", "<<Reg.dim2()<<", "<<Reg.dim3()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 1548 of file tecplot_binaries.hpp.

template<typename Container2d , typename RandomAccessIterator1 >
void slip::get_diagonal ( const Container2d &  container,
RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
const int  diag_number = 0 
)

Get the diagonal diag_number of a 2d container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
containerA 2d container
diag_firstRandomAccessIterator to the first element of the diagonal.
diag_lastRandomAccessIterator to one past-the-end element of the diagonal.
diag_numbernumber of the diagonal:
  • 0 the diagonal (default value)
  • a negative number corresponds to a lower diagonal
  • a positive number corresponds to an upper diagonal
Precondition
container.dim1() == container.dim2()
std::abs(diag_number) < container.dim1()
(diag_last - diag_first) <= container.dim1()
Example:
slip::iota(AA.begin(),AA.end(),1.0);
std::cout<<"AA ="<<std::endl;
std::cout<<AA<<std::endl;
slip::get_diagonal(AA,diag0.begin(),diag0.end());
std::cout<<"main diagonal:\n"<<diag0<<std::endl;
slip::get_diagonal(AA,diag1.begin(),diag1.end(),1);
std::cout<<"first upper diagonal:\n"<<diag1<<std::endl;
slip::get_diagonal(AA,diagm1.begin(),diagm1.end(),-1);
std::cout<<"first lower diagonal:\n"<<diagm1<<std::endl;
slip::get_diagonal(AA,diag2.begin(),diag2.end(),2);
std::cout<<"second upper diagonal:\n"<<diag2<<std::endl;
slip::get_diagonal(AA,diagm2.begin(),diagm2.end(),-2);
std::cout<<"second lower diagonal:\n"<<diagm2<<std::endl;

Definition at line 3370 of file linear_algebra.hpp.

template<typename T >
int slip::get_tecplot_type ( )

Convert the type of a variable to an integer using Tecplot conventions.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2014/03/19
Parameters
aThe variable to get the Tecplot type.
Example:
std::cout<<"The Tecplot type for double is : "<<get_tecplot_type<double>()<<std::endl;

Definition at line 112 of file tecplot_binaries.hpp.

template<typename Type >
void slip::getpars_DLT ( const slip::Matrix< Type > &  P,
slip::Matrix< Type > &  Mat 
)

Get calibration parameters using the DLT.

Author
Markus Jehle <jehle_markus_AT_yahoo.de>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Gomit Guillaume <gomit.guillaume_AT_univ-poitiers.fr>
Version
0.0.1
Date
2013/02/13
Since
1.2.0
Parameters
PMatrix containing the input data.
Mat3x4-Matrix containing the calibration parameters
Remarks
Format: $(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Definition at line 187 of file camera_algo.hpp.

template<typename Type >
void slip::getpars_DLT_norm ( const slip::Matrix< Type > &  P,
slip::Matrix< Type > &  Mat 
)

Get calibration parameters using the DLT.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Gomit Guillaume <gomit.guillaume_AT_univ-poitiers.fr>
Since
1.2.0
Parameters
PMatrix containing the input data.
Mat3x4-Matrix containing the calibration parameters.
Remarks
Format: $(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Definition at line 262 of file camera_algo.hpp.

template<typename Type >
void slip::getpars_Faugeras ( const slip::Matrix< Type > &  P,
slip::Matrix< Type > &  Mat 
)

Get calibration parameters using the Faugeras-Algorithm.

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Gomit Guillaume <gomit.guillaume_AT_univ-poitiers.fr>
Version
0.0.1
Date
2008/07/18
Since
1.2.0
Parameters
PMatrix containing the input data.
Mat3x4-Matrix containing the calibration parameters
Remarks
Format: $(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Todo:
optimize pseudo inverse...

Definition at line 297 of file camera_algo.hpp.

template<typename Type >
void slip::getpars_SoloffUV ( const slip::Matrix< Type > &  P,
slip::MultivariatePolynomial< Type, 3 > &  Pol_x,
slip::MultivariatePolynomial< Type, 3 > &  Pol_y 
)

Get calibration parameters using a polynomial fit (computation "by hand")

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Gomit Guillaume <gomit.guillaume_AT_univ-poitiers.fr>
Version
0.0.1
Date
2008/07/18
Since
1.2.0
Parameters
PMatrix containing the input data.
Pol_x1st MultivariatePolynomial containing the calibration parameters
Pol_y2nd MultivariatePolynomial containing the calibration parameters
Remarks
Format:

$(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Definition at line 413 of file camera_algo.hpp.

template<typename Type >
void slip::getpars_SoloffXY ( const slip::Matrix< Type > &  P,
slip::MultivariatePolynomial< Type, 3 > &  Pol_x,
slip::MultivariatePolynomial< Type, 3 > &  Pol_y 
)

Get calibration parameters using a polynomial fit (computation "by hand")

Author
Damien Calluaud <damien.calluaud_AT_univ-poitiers.fr>
Version
0.0.1
Date
2009/10/12
Since
1.2.0
Parameters
PMatrix containing the input data.
Pol_x1st MultivariatePolynomial containing the calibration parameters
Pol_y2nd MultivariatePolynomial containing the calibration parameters
Remarks
Format:

$(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Definition at line 501 of file camera_algo.hpp.

template<typename Real >
void slip::givens_sin_cos ( const Real &  xi,
const Real &  xk,
Real &  sin,
Real &  cos 
)
inline

Computes the Givens sinus and cosinus.

\[ R = \left( \begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta\\ \end{array}\right) \]

\[ \cos \theta = \frac{xi}{\sqrt{xi^2+xk^2}} \]

\[ \sin \theta = \frac{-xk}{\sqrt{xi^2+xk^2}} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/13
Since
1.0.0
Version
0.0.1
Parameters
xivalue at index i.
xkvalue at index k.
sinGivens sinus
cosGivens cosinus.
Complexity: 5 flops + 1 std::sqrt

Definition at line 10720 of file linear_algebra.hpp.

template<class RandomAccessIterator , class RandomAccessIterator2d , class InnerProduct >
void slip::gram_matrix ( RandomAccessIterator  init_base_first,
RandomAccessIterator  init_base_end,
RandomAccessIterator2d  matrix_upper_left,
RandomAccessIterator2d  matrix_bottom_right,
InnerProduct  inner_prod 
)

Compute the Gram matrix from a base.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
init_base_firstRandomAccessIterator to the first element of the Base to process.
init_base_endRandomAccessIterator to one past the last element of the Base to process.
matrix_upper_leftRandomAccessIterator2d to the first element of the Gram matrix.
matrix_bottom_rightRandomAccessIterator2d to one past the last element of the Gram matrix.
inner_prodBinaryFunction traducing the InnerProduct to use.
Precondition
Input containers must have the same sizes
The element within the container must have the +=, - , / by InnerProduct Result operators defined
Computes the Gram matrix of a given base.
The input base iterator init_base_first point to the first base Element. You can specify your own inner product on the base elements inheriting from a BinaryFunction. For example like this example code wich define the slip::Vector<T> inner product.
template<class T> struct inner_prod : public std::binary_function<slip::Vector<T>, slip::Vector<T>,T>
{
inner_prod(){}
T operator() (const slip::Vector<T>& x, const slip::Vector<T>& y)
{
slip::Vector<T> z = x * y;
return z.sum();
}
};
Example:
e1[0] = 1.0; e1[1] = 1.0; e1[2] = 1.0;
e2[0] = 1.0; e2[1] = -1.0; e2[2] = 1.0;
e3[0] = 1.0; e3[1] = 1.0; e3[2] = -1.0;
std::vector<slip::Vector<double> > init_base(3);
init_base[0] = e1;
init_base[1] = e2;
init_base[2] = e3;
std::cout<<"Initial Base "<<std::endl;
for(std::size_t i = 0; i < init_base.size();++i)
{
std::cout<<init_base[i]<<std::endl;
}
std::vector<slip::Vector<double> > ortho_base(3);
init_base.end(),
ortho_base.begin(),
ortho_base.end(),
inner_prod<double>());
std::cout<<"Orthonormalized Base "<<std::endl;
for(std::size_t i = 0; i < ortho_base.size();++i)
{
std::cout<<ortho_base[i]<<std::endl;
}
std::cout<<"Base verification"<<std::endl;
slip::Matrix<double> Mortho(ortho_base.size(),ortho_base.size());
slip::gram_matrix(ortho_base.begin(),ortho_base.end(),
Mortho.upper_left(),Mortho.bottom_right(),
inner_prod<double>());
std::cout<<Mortho<<std::endl;

Definition at line 521 of file gram_schmidt.hpp.

template<class RandomAccessIterator , class InnerProduct >
void slip::gram_schmidt_normalization ( RandomAccessIterator  init_base_first,
RandomAccessIterator  init_base_end,
RandomAccessIterator  ortho_base_first,
RandomAccessIterator  ortho_base_end,
InnerProduct  inner_prod 
)

Gram-Schmidt orthonormalization algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
init_base_firstRandomAccessIterator to the first element of the Base to process.
init_base_endRandomAccessIterator to one past the last element of the Base to process.
ortho_base_firstRandomAccessIterator to the first element of the resulting Base.
ortho_base_endRandomAccessIterator to one past the last element of the resulting Base.
inner_prodBinaryFunction traducing the InnerProduct to use.
Precondition
Input containers must have the same sizes
The element within the container must have the +=, - , / by InnerProduct Result operators defined
Generic Gram-Schmidt orthonormalization algorithm.
The input base iterator init_base_first point to the first base Element. You can specify your own inner product on the base elements inheriting from a BinaryFunction. For example like this example code wich define the slip::Vector<T> inner product.
template<class T> struct inner_prod : public std::binary_function<slip::Vector<T>, slip::Vector<T>,T>
{
inner_prod(){}
T operator() (const slip::Vector<T>& x, const slip::Vector<T>& y)
{
slip::Vector<T> z = x * y;
return z.sum();
}
};

Definition at line 125 of file gram_schmidt.hpp.

template<class RandomAccessIterator , class InnerProduct >
void slip::gram_schmidt_orthogonalization ( RandomAccessIterator  init_base_first,
RandomAccessIterator  init_base_end,
RandomAccessIterator  ortho_base_first,
RandomAccessIterator  ortho_base_end,
InnerProduct  inner_prod 
)

Gram-Schmidt orthogonalization algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
init_base_firstRandomAccessIterator to the first element of the Base to process.
init_base_endRandomAccessIterator to one past the last element of the Base to process.
ortho_base_firstRandomAccessIterator to the first element of the resulting Base.
ortho_base_endRandomAccessIterator to one past the last element of the resulting Base.
inner_prodBinaryFunction traducing the InnerProduct to use.
Precondition
Input containers must have the same sizes
The element within the container must have the +=, - , / by InnerProduct Result operators defined
Generic Gram-Schmidt orthogonalization algorithm.
The input base iterator init_base_first point to the first base Element. You can specify your own inner product on the base elements inheriting from a BinaryFunction. For example like this example code wich define the slip::Vector<T> inner product.
template<class T> struct inner_prod : public std::binary_function<slip::Vector<T>, slip::Vector<T>,T>
{
inner_prod(){}
T operator() (const slip::Vector<T>& x, const slip::Vector<T>& y)
{
slip::Vector<T> z = x * y;
return z.sum();
}
};

Definition at line 252 of file gram_schmidt.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::gram_schmidt_qr ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Q_up,
MatrixIterator2  Q_bot,
MatrixIterator3  R_up,
MatrixIterator3  R_bot,
const typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type  tol 
)
inline

(modified) Gram-Schmidt qr decomposition.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/19
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
Q_up2D iterator on the upper_left element of Q container
Q_bot2D iterator on the bottom_right element of Q container
R_up2D iterator on the upper_left element of R container
R_bot2D iterator on the bottom_right element of R container
toltolerance of the process
Remarks
The process stop when RQ is upper_triangular according to the tolerance tol.
Precondition
(A_up - A_bot)[0] == (Q_up - Q_bot)[0]
(A_up - A_bot)[1] == (Q_up - Q_bot)[1]
(A_up - A_bot)[1] == (R_up - R_bot)[0]
(A_up - A_bot)[1] == (R_up - R_bot)[1]
(A_up - A_bot)[0] == (A_up - A_bot)[1]

Definition at line 211 of file linear_algebra_qr.hpp.

template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void slip::gram_schmidt_qr ( const Matrix1 &  A,
Matrix2 &  Q,
Matrix3 &  R,
const typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  tol 
)
inline

(modified) Gram-Schmidt qr decomposition.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/19
Since
1.0.0
Version
0.0.1
Parameters
AInput squared Matrix.
QQ matrix.
RR matrix.
toltolerance of the process
Remarks
The process stop when RQ is upper_triangular according to the tolerance tol.
Precondition
A.rows() == A.cols()
A.rows() == Q.rows()
A.cols() == Q.cols()
A.cols() == R.rows()
A.cols() == R.cols()

Definition at line 270 of file linear_algebra_qr.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::hermite_nd_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Hermite multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Hermite Polynomials:

\[ P_{k+1}(x) = 2xP_k(x)-2kP_{k-1}(x)\]

.

Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Remarks
This code is inspired from the file boost/math/special_functions/legendre.hpp (http://www.boost.org/)
Example:
//Generate x1 2d Hermite basis
mh00.powers[0] = 0;
mh00.powers[1] = 0;
ph0.insert(mh00,1.0);
mh10.powers[0] = 1;
mh10.powers[1] = 0;
ph1.insert(mh10,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > hermite_x1_basis_2d;
hermite_x1_basis_2d.push_back(ph0);
hermite_x1_basis_2d.push_back(ph1);
for(unsigned l = 1; l < 10; ++l)
{
hermite_x1_basis_2d.push_back(slip::hermite_nd_next<slip::MultivariatePolynomial<double,2> >(l,ph1,hermite_x1_basis_2d[l],hermite_x1_basis_2d[l-1]));
}
for(unsigned l = 0; l < hermite_x1_basis_2d.size(); ++l)
{
std::cout<<hermite_x1_basis_2d[l]<<std::endl;
}

Definition at line 526 of file polynomial_algo.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::hermite_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Hermite polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Hermite Polynomials:

\[ P_{k+1}(x) = 2xP_k(x)-2kP_{k-1}(x)\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/07
Version
0.0.1
Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Returns
Pk+1
Remarks
This code is inspired from the file boost/math/special_functions/legendre.hpp (http://www.boost.org/)
Example:
std::vector<slip::Polynomial<double> > hermite_basis;
//creation of hermite polynomial basis
P12[0] = 0.0;
hermite_basis.push_back(P02);
hermite_basis.push_back(P12);
for(unsigned k = 1; k < 10; ++k)
{
hermite_basis.push_back(slip::hermite_next<slip::Polynomial<double> >(k, P1, hermite_basis[k], hermite_basis[k-1]));
}
for(std::size_t k = 0; k < hermite_basis.size(); ++k)
{
std::cout<<hermite_basis[k]<<std::endl;
}

Definition at line 476 of file polynomial_algo.hpp.

template<class Matrix1 , class Vector1 , class Matrix2 >
void slip::hermitian_eigen ( const Matrix1 &  A,
Vector1 &  EigenValues,
Matrix2 &  EigenVectors 
)
inline

Eigen Values Computation of an hermitian semi-definite positive matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/23
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
EigenValuesVector containing the real eigenvalue
EigenVectorsContainer2d containing the eigenvectors
Remarks
The eigen vectors may be negated as SVD is not unique
Example:
std::cout<<"Meig = \n"<<Meig<<std::endl;
slip::hermitian_eigen(Meig,MEigVal,MEigVect);
std::cout<<"MEigVal = \n"<<MEigVal<<std::endl;
std::cout<<"MEigVect = \n"<<MEigVect<<std::endl;

Definition at line 124 of file linear_algebra_eigen.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
std::iterator_traits<RandomAccessIterator1>::value_type slip::hermitian_inner_product ( RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2  first2,
typename std::iterator_traits< RandomAccessIterator1 >::value_type  init 
)
inline

Computes the hermitian inner-product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
first1iterator to the beginning of the first sequence (X)
last1iterator to the end of the first sequence (X)
first2iterator to the beginning of the second sequence (Y)
initinitial value.
Returns
hermitian_inner_product of two ranges.
Precondition
[first1, last1) must be valid.
[first2, first2 + (last1-first1)) must be valid.
Complexity:
Exactly last1 - first1 applications of each binary operation.
Example:
typedef std::complex<double> TC;
TC xic[] = {TC(1,1),TC(2,1),TC(2,3)};
slip::Array<TC> Xic(Mic.cols(),xic);
std::cout<<"Xic = "<<std::endl;
std::cout<<Xic<<std::endl;
TC yic[] = {TC(2,1),TC(1,3),TC(2,4)};
slip::Array<TC> Yic(Mic.cols(),yic);
std::cout<<"Yic = "<<std::endl;
std::cout<<Yic<<std::endl;
std::cout<<"Xic^H Yic = "<<std::endl;
std::cout<<slip::hermitian_inner_product(Xic.begin(),Xic.end(),
Yic.begin(),TC(0,0))<<std::endl;

Definition at line 271 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::hermitian_transpose ( const Matrix1 &  M,
Matrix2 &  TM 
)
inline

Computes the hermitian transpose of a matrix $ \overline{M}^{T} $ which is the transpose of the conjugate.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/06/24
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
TMresult of the transposition
Precondition
M, TM must have the double bracket element accessor
Matrix are supposed to be allocated first
M.rows() == TM.cols()
M.cols() == TM.rows()

Definition at line 2476 of file linear_algebra.hpp.

template<typename Matrix >
void slip::hilbert ( Matrix &  A)
inline

Replaces A with the Hilbert matrix:

\[h_{ij} = \frac{1}{i+j+1}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
Remarks
Fill the matrix A according to its size
Example:

Definition at line 3717 of file linear_algebra.hpp.

template<typename InputIterator , typename RandomAccessIterator >
void slip::histogram ( InputIterator  first,
InputIterator  last,
RandomAccessIterator  histo_first,
RandomAccessIterator  histo_last,
typename std::iterator_traits< InputIterator >::value_type  minval,
typename std::iterator_traits< InputIterator >::value_type  maxval,
typename std::iterator_traits< InputIterator >::value_type  step = 1 
)
inline

Simple histogram algorithm (uniform step)

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/08
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator of the container to histogram
lastpast-the-end InputIterator of the container to histogram
histo_firstbegin RandomAccessIterator of the histogram container
histo_lastpast-the-end RandomAccessIterator of the histogram container
minvalMinimum value of the histogram
maxvalMaximum value of the histogram
stepStep of the histogram. Default value is 1.
Precondition
(histo_last - histo_first) == (max_val - min_val + 1)/step
step > 0
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
slip::histogram(M.begin(),M.end(),Histo.begin(),Histo.end(),0,30,3);

Definition at line 113 of file histo.hpp.

template<typename InputIterator , typename RandomAccessIterator , typename Predicate >
void slip::histogram_if ( InputIterator  first,
InputIterator  last,
RandomAccessIterator  histo_first,
RandomAccessIterator  histo_last,
Predicate  pred,
typename std::iterator_traits< InputIterator >::value_type  minval,
typename std::iterator_traits< InputIterator >::value_type  maxval,
typename std::iterator_traits< InputIterator >::value_type  step = 1 
)
inline

Simple histogram algorithm (uniform step) according to a predicate.

Author
Mouahmed Hammoud <hammoud_AT_sic.univ-poitiers.fr> : conceptor
Date
2009/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator of the container to histogram
lastpast-the-end InputIterator of the container to histogram
histo_firstbegin RandomAccessIterator of the histogram container
histo_lastpast-the-end RandomAccessIterator of the histogram container
predpredicate function.
minvalMinimum value of the histogram
maxvalMaximum value of the histogram
stepStep of the histogram. Default value is 1.
Precondition
(histo_last - histo_first) == (max_val - min_val + 1)/step
step > 0
Example:
bool myPredicate (const double& val)
{
return (val > 3);
}
std::fill(M.begin(),M.begin()+5,2.0);
std::fill(M.begin()+5,M.begin()+10,3.0);
std::fill(M.begin()+10,M.begin()+18,4.0);
slip::Vector<int> Histo_if(25);
slip::Vector<int> Histo_if(25);
slip::histogram_if(M.begin(),M.end(),
Histo_if.begin(),Histo_if.end(),
myPredicate,
0,24);
std::cout<<"Histo_if(0,24,mypredicate : val > 3) = \n"<<Histo_if<<std::endl;

Definition at line 318 of file histo.hpp.

template<typename InputIterator , typename RandomAccessIterator , typename MaskIterator >
void slip::histogram_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
RandomAccessIterator  histo_first,
RandomAccessIterator  histo_last,
typename std::iterator_traits< InputIterator >::value_type  minval,
typename std::iterator_traits< InputIterator >::value_type  maxval,
typename std::iterator_traits< InputIterator >::value_type  step = 1,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Simple histogram algorithm (uniform step) according to a mask sequence.

Author
Mouahmed Hammoud <hammoud_AT_sic.univ-poitiers.fr> : conceptor
Date
2009/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstbegin InputIterator of the container to histogram
lastpast-the-end InputIterator of the container to histogram
mask_firstAn InputIterator on the mask
histo_firstbegin RandomAccessIterator of the histogram container
histo_lastpast-the-end RandomAccessIterator of the histogram container
minvalMinimum value of the histogram
maxvalMaximum value of the histogram
stepStep of the histogram. Default value is 1.
valueMask value.
Precondition
(histo_last - histo_first) == (max_val - min_val + 1)/step
step > 0
Example:
slip::iota(M.begin(),M.begin()+5,2.0,0.0);
slip::iota(M.begin()+5,M.begin()+10,3.0,0.0);
slip::iota(M.begin()+10,M.begin()+18,4.0,0.0);
std::cout<<"M = \n"<<M<<std::endl;
slip::Matrix<int> MaskValue(5,5);
std::fill(MaskValue.begin(),MaskValue.begin()+12,1);
std::fill(MaskValue.begin()+12,MaskValue.begin()+21,2);
std::cout<<"MaskValue=\n"<<MaskValue<<std::endl;
slip::Vector<int> Histo_mask(25);
slip::histogram_mask(M.begin(),M.end(),
MaskValue.begin(),
Histo_mask.begin(),Histo_mask.end(),0,24,1);
std::cout<<"Histo_mask(0,24,1) mask_value = 1 : \n"<<Histo_mask<<std::endl;
slip::histogram_mask(M.begin(),M.end(),
MaskValue.begin(),
Histo_mask.begin(),Histo_mask.end(),0,24,1,2);
std::cout<<"Histo_mask(0,24,1) mask_value = 2 : \n"<<Histo_mask<<std::endl;

Definition at line 208 of file histo.hpp.

template<class RandomAccessIterator2d1 , class RandomAccessIterator2d2 , class RandomAccessIterator2d3 >
void slip::hmatrix_matrix_multiplies ( RandomAccessIterator2d1  M1_up,
RandomAccessIterator2d1  M1_bot,
RandomAccessIterator2d2  M2_up,
RandomAccessIterator2d2  M2_bot,
RandomAccessIterator2d3  result_up,
RandomAccessIterator2d3  result_bot 
)
inline

Computes the hermitian left multiplication of a matrix:

\[R = M1^H M2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M1_upRandomAccessIterator2d to the upper_left matrix M1 element.
M1_botRandomAccessIterator2d to the bottom_right matrix M1 element.
M2_upRandomAccessIterator2d to the upper_left matrix M2 element.
M2_botRandomAccessIterator2d to the bottom_right matrix M2 element.
result_upRandomAccessIterator to the upper_left result matrix element.
result_upRandomAccessIterator to the bottom_right result matrix element.
Precondition
(M1_bot-M1_up)[0] == (M2_bot-M2_up)[0]
(result_bot-result_up)[0] == (M1_bot-M1_up)[1]
(result_bot-result_up)[1] == (M2_bot-M2_up)[1]
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
slip::iota(M1c.begin(),M1c.end(),
std::complex<double>(1.0,1.0),
std::complex<double>(1.0,1.0));
slip::iota(M2c.begin(),M2c.end(),
std::complex<double>(1.0,1.0),
std::complex<double>(1.0,1.0));
slip::hmatrix_matrix_multiplies(M1c.upper_left(),M1c.bottom_right(),
M2c.upper_left(),M2c.bottom_right(),
M3c.upper_left(),M3c.bottom_right());
std::cout<<"M1c = \n"<<M1c<<std::endl;
std::cout<<"M2c = \n"<<M2c<<std::endl;
std::cout<<"M3c = \n"<<M3c<<std::endl;

Definition at line 1289 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::hmatrix_matrix_multiplies ( const Matrix1 &  M1,
const Matrix2 &  M2,
Matrix3 &  Result 
)
inline

Computes the hermitian left multiplication of a matrix:

\[R = M1^H M2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M1The first Matrix container.
M2The second Matrix container.
ResultThe container which contains the result of the multiplication
Precondition
M1.rows == M2.rows()
M1.cols == Result.rows()
M2.cols == Result.cols()
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
slip::iota(M1c.begin(),M1c.end(),
std::complex<double>(1.0,1.0),
std::complex<double>(1.0,1.0));
slip::iota(M2c.begin(),M2c.end(),
std::complex<double>(1.0,1.0),
std::complex<double>(1.0,1.0));
std::cout<<"M1c = \n"<<M1c<<std::endl;
std::cout<<"M2c = \n"<<M2c<<std::endl;
std::cout<<"M3c = \n"<<M3c<<std::endl;

Definition at line 1359 of file linear_algebra.hpp.

template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void slip::hmatrix_vector_multiplies ( RandomAccessIterator2d  M_up,
RandomAccessIterator2d  M_bot,
RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
RandomAccessIterator2  R_first,
RandomAccessIterator2  R_last 
)
inline

Computes the hermitian matrix left multiplication of a vector:

\[R = M^H V\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M_upRandomAccessIterator2d to the upper_left matrix element.
M_botRandomAccessIterator2d to the bottom_right matrix element.
V_firstRandomAccessIterator to the first element of the Vector.
V_lastRandomAccessIterator to one-past-the-end element of the vector.
R_firstRandomAccessIterator to the first element of the Vector R.
R_lastRandomAccessIterator to one-past-the-end element of the vector R.
Precondition
(M_bot-M_up)[0] == (V_last-V_first)
Remarks
Works with real and complex data.
Example:
slip::iota(M1r.begin(),M1r.end(),1.0);
slip::Vector<double> V1r(M1r.rows());
slip::iota(V1r.begin(),V1r.end(),1.0);
slip::Vector<double> V2r(M1r.cols());
slip::hmatrix_vector_multiplies(M1r.upper_left(),M1r.bottom_right(),
V1r.begin(),V1r.end(),
V2r.begin(),V2r.end());
std::cout<<"M1r = \n"<<M1r<<std::endl;
std::cout<<"V1r = \n"<<V1r<<std::endl;
std::cout<<"V2r = M^TV1r\n"<<V2r<<std::endl;

Definition at line 1403 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::hmatrix_vector_multiplies ( const Matrix &  M,
const Vector1 &  V,
Vector2 &  R 
)
inline

Computes the hermitian matrix left multiplication of a vector:

\[R = M^H V\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
MMatrix M.
VVector V.
RResulting vector R.
Precondition
M.rows() == V.size()
Remarks
Works with real and complex data.
Example:
slip::iota(M1r.begin(),M1r.end(),1.0);
slip::Vector<double> V1r(M1r.rows());
slip::iota(V1r.begin(),V1r.end(),1.0);
slip::Vector<double> V2r(M1r.cols());
std::cout<<"M1r = \n"<<M1r<<std::endl;
std::cout<<"V1r = \n"<<V1r<<std::endl;
std::cout<<"V2r = M^TV1r\n"<<V2r<<std::endl;

Definition at line 1460 of file linear_algebra.hpp.

template<typename VectorIterator1 , typename VectorIterator2 >
void slip::housegen ( VectorIterator1  a_begin,
VectorIterator1  a_end,
VectorIterator2  u_begin,
VectorIterator2  u_end,
typename std::iterator_traits< VectorIterator1 >::value_type &  nu 
)
inline

Compute the Householder vector u of a vector a.

Given a vector a, compute the vector u of the matrix of Householder $ H=I-2uu^H $ such that $ (I -u*u^H)a=\nu * e1 $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr> :
Date
2009/01/21
Since
1.0.0
Version
0.0.1
Parameters
a_beginbegin iterator of the vector to rotate
a_endend iterator of the vector to rotate
u_beginbegin iterator of the householder vector
u_endend iterator of the the householder vector
nu$(I -u*u^H)a=\nu *e1 $
Precondition
(a_end - a_begin) == (u_end - u_begin)
Remarks
Algorithm 2.1 from "Matrix Algorithms" Vol II G. W. Stewart
Works with real and complex data.
Example:
slip::iota(Xh.begin(),Xh.end(),5.0,-1.0);
std::cout<<"Xh = \n"<<Xh<<std::endl;
slip::Vector<double> Vh(Xh.size());
double nu = 0.0;
slip::housegen(Xh.begin(),Xh.end(),Vh.begin(),Vh.end(),nu);
std::cout<<"Vh = \n"<<Vh<<std::endl;
std::cout<<"nu = \n"<<nu<<std::endl;

Definition at line 10981 of file linear_algebra.hpp.

template<typename Matrix1 >
void slip::householder_hessenberg ( Matrix1 &  M)
inline

Householder Hessenberg reduction of the square matrix M. The result is overwritten in M. The Hessenberg decomposition is $Q * H * Q^H = M$.

  • where Q is a square unitary matrix: $Q^H * Q = I$
  • H is upper Hessenberg: $ i \ge j+1 \Rightarrow H_{i,j} = 0$
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2008/10/28
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    M2D Container.
    Precondition
    M.rows() == M.cols()
    Complexity: (M.cols()-1)*(10*M.rows()*M.cols()) + (M.rows()*M.rows())/2
    Remarks
    Works with real and complex data.
    Example:
    std::cout<<"HH = \n"<<HH<<std::endl;
    std::cout<<"HH = \n"<<HH<<std::endl;

Definition at line 11212 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::householder_hessenberg ( const Matrix1 &  M,
Matrix2 &  H 
)
inline

Householder Hessenberg reduction of the square matrix M. The Hessenberg decomposition is $Q * H * Q^H = M$.

  • where Q is a square unitary matrix: $Q^H * Q = I$
  • H is upper Hessenberg: $ i \ge j+1 \Rightarrow H_{i,j} = 0$
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2008/10/28
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    M2D Container of the input Matrix.
    H2D Container of the Hessenberg matrix.
    Precondition
    M.rows() == M.cols()
    M.rows() == H.rows()
    M.cols() == H.cols()
    Remarks
    Works with real and complex data.
    Complexity: (M.cols()-1)*(10*M.rows()*M.cols()) + (M.rows()*M.rows())/2
    Example:
    std::cout<<"HH = \n"<<HH<<std::endl;
    std::cout<<"HH = \n"<<HH<<std::endl;
    std::cout<<"Hh = \n"<<Hh<<std::endl;

Definition at line 11279 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void slip::householder_hessenberg ( const Matrix1 &  M,
Matrix2 &  H,
Matrix3 &  Q 
)
inline

Householder Hessenberg reduction of the square matrix M. The Hessenberg decomposition is $Q * H * Q^H = M$.

Definition at line 11337 of file linear_algebra.hpp.

template<typename Matrix1 , typename Vector >
void slip::householder_qr ( Matrix1 &  M,
Vector &  V0 
)
inline

in place Householder QR decomposition M = QR

\[ M = Q \times R \]

\[ Q \times Q^{t} = I \]

Q is a rotation matrix and R is an upper triangular matrix

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>: conceptor
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
M2D Container.
V0Vector which contains the first value of householder vectors
Precondition
M.rows() == M.cols()
V0.size() == M.rows()

Definition at line 301 of file linear_algebra_qr.hpp.

template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void slip::householder_qr ( const Matrix1 &  M,
Matrix2 &  Q,
Matrix3 &  R 
)
inline

Computes the QR decomposition of a matrix M :

\[ M = Q \times R \]

\[ Q \times Q^{t} = I \]

Q is a rotation matrix and R is an upper triangular matrix.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/24
Since
1.0.0
Version
0.0.1
Parameters
M2D container for M
Q2D container for Q
R2D container for R
Precondition
M.rows() == Q.rows() == Q.cols() == R.rows()
M.cols() == R.cols()
Example:
std::cout<<" Mc before \n"<<std::endl;
std::cout<< Mc <<std::endl;
slip::Matrix<T> Qc(Mc.rows(),Mc.rows());
slip::Matrix<T> Rc(Mc.rows(),Mc.cols());
std::cout<<" Qc \n"<<std::endl;
std::cout<< Qc <<std::endl;
std::cout<<" Rc \n"<<std::endl;
std::cout<< Rc <<std::endl;
std::cout<<" Mc after \n"<<std::endl;
std::cout<< Mc <<std::endl;

Definition at line 378 of file linear_algebra_qr.hpp.

template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void slip::hvector_matrix_multiplies ( RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
RandomAccessIterator2d  M_up,
RandomAccessIterator2d  M_bot,
RandomAccessIterator2  result_first,
RandomAccessIterator2  result_last 
)
inline

Computes the hermitian left multiplication:

\[R = V^H M\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the first element of the Vector.
V_lastRandomAccessIterator to one-past-the-end element of the vector.
M_upRandomAccessIterator2d to the upper_left matrix element.
M_botRandomAccessIterator2d to the bottom_right matrix element.
result_firstRandomAccessIterator to the first element of the Vector R.
result_lastRandomAccessIterator to one-past-the-end element of the vector R.
Precondition
(M_bottom_right - M_upper_left)[0] == (V_last - V_first)
(M_bottom_right - M_upper_left)[1] == (result_last - result_first)
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dc[] = {TC(1,1),TC(0,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2),TC(1,2)};
slip::Matrix<TC> Mcc(3,4,dc);
slip::iota(Vcc.begin(),Vcc.end(),std::complex<double>(1.0,1.0));
std::cout<<"Vcc = "<<std::endl;
std::cout<<Vcc<<std::endl;
slip::hvector_matrix_multiplies(Vcc.begin(),Vcc.end(),
Mcc.upper_left(),Mcc.bottom_right(),
Vrcc.begin(),Vrcc.end());
std::cout<<"Vrcc = "<<std::endl;
std::cout<<Vrcc<<std::endl;

Definition at line 1078 of file linear_algebra.hpp.

template<class Vector1 , class Matrix , class Vector2 >
void slip::hvector_matrix_multiplies ( const Vector1 &  V,
const Matrix &  M,
Vector2 &  R 
)
inline

Computes the hermitian left multiplication:

\[R = V^H M\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
VVector V.
MMatrix M.
RResulting vector R.
Precondition
M.rows() == V.size()
M.cols() == R.size()
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dc[] = {TC(1,1),TC(0,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2),TC(1,2)};
slip::Matrix<TC> Mcc(3,4,dc);
slip::iota(Vcc.begin(),Vcc.end(),std::complex<double>(1.0,1.0));
std::cout<<"Vcc = "<<std::endl;
std::cout<<Vcc<<std::endl;
std::cout<<"Vrcc = "<<std::endl;
std::cout<<Vrcc<<std::endl;

Definition at line 1143 of file linear_algebra.hpp.

template<class InputIter , class OutputIter >
void slip::idct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the Discrete Cosinus Transform III (backward) of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$
Example:
...
tt b2[8];
slip::idct(b,b+8,b2);
for(int i = 0; i < 8; ++i)
std::cout<<b2[i]<<" ";
std::cout<<std::endl<<std::endl;

Definition at line 3029 of file FFT.hpp.

template<typename Matrix >
Matrix slip::identity ( const std::size_t  nr,
const std::size_t  nc 
)
inline

Returns an identity matrix which dimensions are nr*nc.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/15
Since
1.0.0
Version
0.0.1
Parameters
nrNumber of rows.
ncNumber of columns.
Example:

Definition at line 3608 of file linear_algebra.hpp.

template<typename MatrixIterator >
void slip::identity ( MatrixIterator  A_up,
MatrixIterator  A_bot 
)
inline

Set a 2d range to the identity matrix.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/15
Since
1.0.0
Version
0.0.1
Parameters
A_up
A_bot
Example:
slip::identity(M.upper_left(),M.bottom_right());

Definition at line 3639 of file linear_algebra.hpp.

template<typename Matrix >
void slip::identity ( Matrix &  A)
inline

Replaces A with the identity matrix.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/15
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
Example:

Definition at line 3672 of file linear_algebra.hpp.

template<class InputIter , class OutputIter >
void slip::ifft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the inverse fft of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate throw the input data
in_endA BidirectionalIterator at the end of the input data
out_beginA BidirectionalIterator to iterate throw the output data
Precondition
size(in) == size(out).
input data have to be std::complex
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
slip::Array<cx> b2(N,cx(0));
slip::ifft(b.begin(),b.end(),b2.begin());

Definition at line 2507 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::ifft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the ifft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be std::complex
the 2d range must have the same sizes
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
//ifft2d
slip::ifft2d(IFFT.upper_left(),IFFT.bottom_right(),IOut.upper_left());
for(size_t i = 0; i < IOut.dim1(); ++i)
for(size_t j = 0; j < IOut.dim2(); ++j)
INorm[i][j] = std::abs(IOut[i][j]);
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_ifft.png");
Examples:
fft2d.cpp.

Definition at line 2629 of file FFT.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::ifft2d ( Matrix1 &  datain,
Matrix2 &  dataout 
)
inline

Computes the fft2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
//ifft2d
slip::ifft2d(IFFT,IOut);
for(size_t i = 0; i < IOut.dim1(); ++i)
for(size_t j = 0; j < IOut.dim2(); ++j)
INorm[i][j] = std::abs(IOut[i][j]);
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_ifft.png");

Definition at line 2753 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::ifft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the ifft3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be std::complex
the 3d range must have the same sizes
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix3d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),Czero);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
slip::ifft3d(OFFT.front_upper_left(),OFFT.back_bottom_right(),OC.front_upper_left());
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
{
Out[z][i][j] = std::abs(OC[z][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);
Out.write_raw("volume_ifft.vol");

Definition at line 2852 of file FFT.hpp.

template<typename Volume1 , typename Volume2 >
void slip::ifft3d ( Volume1 &  datain,
Volume2 &  dataout 
)
inline

Computes the fft3d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix3d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),Czero);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
slip::ifft3d(OFFT,OC);
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
{
Out[z][i][j] = std::abs(OC[z][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);
Out.write_raw("volume_ifft.vol");

Definition at line 2955 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::ifft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the ifft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the input data have to be std::complex
the 4d range must have the same sizes
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix4d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
slip::ifft4d(OFFT.first_front_upper_left(),OFFT.last_back_bottom_right(),OC.first_front_upper_left());
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
{
Out[t][k][i][j] = std::abs(OC[t][k][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);

Definition at line 3921 of file FFT.hpp.

template<typename HyperVolume1 , typename HyperVolume2 >
void slip::ifft4d ( const HyperVolume1 &  datain,
HyperVolume2 &  dataout 
)
inline

Computes the fft4d of a container.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be std::complex
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix4d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
slip::ifft4d(OFFT,OC);
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
{
Out[t][k][i][j] = std::abs(OC[t][k][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);

Definition at line 4075 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::ifftw ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the fftw backward of a container (from fftw3.h).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/01
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
the input data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1733 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::ifftw2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the ifftw2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be std::complex
the 2d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1881 of file FFT.hpp.

template<typename InputMatrix , typename OutputMatrix >
void slip::ifftw2d ( InputMatrix &  datain,
OutputMatrix &  dataout 
)
inline

Computes the ifftw2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/04/03
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
datin and dataout must have the same size
the input data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1957 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::ifftw3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the ifftw3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be std::complex
the 3d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 2194 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::ifftw3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the ifftw3d of a container 3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 2304 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::ifftw4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the ifftw4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the input data have to be std::complex
the 4d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 3636 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::ifftw4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the ifftw4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain.slabs() == dataout.slabes()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 3765 of file FFT.hpp.

template<class Matrix1 , class Matrix2 >
void slip::imag ( const Matrix1 &  C,
Matrix2 &  I 
)
inline

Extract the imaginary Matrix of a complex Matrix. $ I_{ij} = \mathcal{I}(C_{ij}) $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/06
Since
1.0.0
Version
0.0.1
Parameters
CComplex Matrix container
Iresult of the imag
Precondition
Matrix are supposed to be allocated first
I.rows() == C.rows()
I.cols() == C.cols()
Example:
Sshc(0,0) = std::complex<double>(0.0,1.0);
Sshc(0,1) = std::complex<double>(0.5,-0.5);
Sshc(0,2) = std::complex<double>(1.0,-1.2);
Sshc(1,0) = std::complex<double>(-0.5,-0.5);
Sshc(1,1) = std::complex<double>(0.0,2.0);
Sshc(1,2) = std::complex<double>(0.2,-0.3);
Sshc(2,0) = std::complex<double>(-1.0,-1.2);
Sshc(2,1) = std::complex<double>(-0.2,-0.3);
Sshc(2,2) = std::complex<double>(0.0,3.0);
std::cout<<"Sshc = \n"<<Sshc<<std::endl;
slip::Matrix<double> imagSshc(3,3);
slip::imag(Sshc,realSshc);
std::cout<<"imagSshc = \n"<<imagSshc<<std::endl;

Definition at line 2684 of file linear_algebra.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::infinite_norm ( InputIterator  first,
InputIterator  last 
)
inline

Computes the infinite norm $\max_i{|x_i|}$ of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
the infinite norm of the range.
Precondition
[first, last) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
std::cout<<slip::infinite_norm<float>(M.begin(),M.end())<<std::endl;

Definition at line 568 of file norms.hpp.

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.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predA predicate.
Returns
Precondition
[first, last) is a valid range
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(M.begin(),M.end(),1.0,1.0)
std::cout<<slip::infinite_norm_if<float>(M.begin(),M.end(),lt5Predicate<float>)<<std::endl;

Definition at line 672 of file norms.hpp.

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) 
)
inline

Computes the infinite norm $\max_i{|x_i|}$ of a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
the infinite norm of the range.
Precondition
[first, last) is a valid range
[mask_first, (last-first)) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
float d[] = {0,1,1,0,0,1};
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<slip::infinite_norm_mask<float>(M.begin(),M.end(),Mask.begin(),1)<<std::endl

Definition at line 614 of file norms.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
std::iterator_traits<RandomAccessIterator1>::value_type slip::inner_product ( RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2  first2,
typename std::iterator_traits< RandomAccessIterator1 >::value_type  init = typename std::iterator_traits<RandomAccessIterator1>::value_type() 
)
inline

Computes the inner_product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
first1iterator to the beginning of the first sequence (X)
last1iterator to the end of the first sequence (X)
first2iterator to the beginning of the second sequence (Y)
initinitial value (zero by default).
Returns
inner_product of two ranges.
Precondition
[first1, last1) must be valid.
[first2, first2 + (last1-first1)) must be valid.
Remarks
Calls hermitian_inner_product if data are complex
Complexity:
Exactly last1 - first1 applications of each binary operation.
Example:
typedef std::complex<double> TC;
TC xic[] = {TC(1,1),TC(2,1),TC(2,3)};
slip::Array<TC> Xic(Mic.cols(),xic);
std::cout<<"Xic = "<<std::endl;
std::cout<<Xic<<std::endl;
TC yic[] = {TC(2,1),TC(1,3),TC(2,4)};
slip::Array<TC> Yic(Mic.cols(),yic);
std::cout<<"Yic = "<<std::endl;
std::cout<<Yic<<std::endl;
std::cout<<"Xic^H Yic = "<<std::endl;
std::cout<<slip::inner_product(Xic.begin(),Xic.end(),
Yic.begin(),TC(0,0))<<std::endl;
Examples:
color_edge_detection.cpp, and test_algo.cpp.

Definition at line 323 of file linear_algebra.hpp.

template<typename Vector1 , typename Vector2 >
Vector1::value_type slip::inner_product ( const Vector1 &  V1,
const Vector2 &  V2 
)
inline

Computes the inner_product of two ranges X and Y:

\[ \overline{X}^TY = X^HY\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
V1First Vector.
V2Second Vector.
Returns
inner_product of the two Vectors.
Precondition
V1.size() >= V2.size()
Remarks
Calls hermitian_inner_product if data are complex
Complexity:
Exactly last1 - first1 applications of each binary operation.
Example:
typedef std::complex<double> TC;
TC xic[] = {TC(1,1),TC(2,1),TC(2,3)};
slip::Array<TC> Xic(Mic.cols(),xic);
std::cout<<"Xic = "<<std::endl;
std::cout<<Xic<<std::endl;
TC yic[] = {TC(2,1),TC(1,3),TC(2,4)};
slip::Array<TC> Yic(Mic.cols(),yic);
std::cout<<"Yic = "<<std::endl;
std::cout<<Yic<<std::endl;
std::cout<<"Xic^H Yic = "<<std::endl;
std::cout<<slip::inner_product(Xic,Yic)<<std::endl;

Definition at line 381 of file linear_algebra.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _Predicate , typename _Tp >
_Tp slip::inner_product_if ( _InputIterator1  first1,
_InputIterator1  last1,
_InputIterator2  first2,
_Tp  init,
_Predicate  pred 
)

Compute inner product of two ranges according to a Predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1Start of range 1.
last1End of range 1.
first2Start of range 2.
initStarting value to add other values to.
predPredicate.
Returns
The final inner product.
Precondition
[first1,last1) must be valid.
[first2, first2 + (last1-first1)) must be valid.
Description:
Starting with an initial value of init, multiplies successive elements from the two ranges according to the predicate pred and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.
Example:
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
}
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<slip::inner_product_if(v1.begin(),v1.end(),
v2.begin(),
int(1),
lt5Predicate<int>)<<std::endl;

Definition at line 275 of file stl_numeric_ext.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 , typename _Predicate >
_Tp slip::inner_product_if ( _InputIterator1  first1,
_InputIterator1  last1,
_InputIterator2  first2,
_Tp  init,
_BinaryOperation1  binary_op1,
_BinaryOperation2  binary_op2,
_Predicate  pred 
)

Compute inner product of two ranges according to a Predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1Start of range 1.
last1End of range 1.
first2Start of range 2.
initStarting value to add other values to.
binary_op1Function object to accumulate with.
binary_op2Function object to apply to pairs of input values.
predPredicate.
Returns
The final inner product.
Precondition
[first1,last1) must be valid.
[first2, first2 + (last1-first1)) must be valid.
Description:
Starting with an initial value of init, applies binary_op2 to successive elements from the two ranges according to the Predicate pred and accumulates each result into the accumulated value using binary_op1. The values in the ranges are processed in order.
Example:
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
}
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<slip::inner_product_if(v1.begin(),v1.end(),
v2.begin(),
int(1),
std::plus<int>(),
std::multiplies<int>(),
lt5Predicate<int>)<<std::endl;

Definition at line 341 of file stl_numeric_ext.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _Tp >
_Tp slip::inner_product_mask ( _InputIterator1  first1,
_InputIterator1  last1,
_MaskIterator  mask_first,
_InputIterator2  first2,
_Tp  init,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Compute inner product of two ranges according to a mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1Start of range 1.
last1End of range 1.
mask_firstStart of the mask range.
first2Start of range 2.
initStarting value to add other values to.
valuetrue value of the mask range. Default is 1.
Returns
The final inner product.
Precondition
[first1,last1) must be valid.
[mask_first, mask_first + (last1-first1)) must be valid.
Description:
Starting with an initial value of init, multiplies successive elements from the two ranges according to the mask range and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.
Example:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
std::cout<<"mask = "<<mask<<std::endl;
std::cout<<slip::inner_product_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),int(1))<<std::endl;
std::cout<<slip::inner_product_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),int(1),int(2))<<std::endl;

Definition at line 128 of file stl_numeric_ext.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 >
_Tp slip::inner_product_mask ( _InputIterator1  first1,
_InputIterator1  last1,
_MaskIterator  mask_first,
_InputIterator2  first2,
_Tp  init,
_BinaryOperation1  binary_op1,
_BinaryOperation2  binary_op2,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Compute inner product of two ranges according to a mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1Start of range 1.
last1End of range 1.
mask_firstStart of the mask range.
first2Start of range 2.
initStarting value to add other values to.
binary_op1Function object to accumulate with.
binary_op2Function object to apply to pairs of input values.
valuetrue value of the mask range. Default is 1.
Returns
The final inner product.
Precondition
[first1,last1) must be valid.
[first2, first2 + (last1-first1)) must be valid.
[mask_first, mask_first + (last1-first1)) must be valid.
Description:
Starting with an initial value of init, applies binary_op2 to successive elements from the two ranges according to the mask range and accumulates each result into the accumulated value using binary_op1. The values in the ranges are processed in order.
Example:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
std::cout<<"mask = "<<mask<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[8] = 2;
std::cout<<"maskint = "<<maskint<<std::endl;
std::cout<<slip::inner_product_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
int(1),
std::plus<int>(),
std::multiplies<int>())<<std::endl;
std::cout<<slip::inner_product_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
int(1),
std::plus<int>(),
std::multiplies<int>(),
int(2))<<std::endl;

Definition at line 207 of file stl_numeric_ext.hpp.

template<class Matrix1 , class Matrix2 >
void slip::inverse ( const Matrix1 &  M,
const std::size_t  nr1,
const std::size_t  nc1,
Matrix2 &  IM,
const std::size_t  nr2,
const std::size_t  nc2 
)
inline

Computes the inverse of a matrix using gaussian elimination.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/14
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
nr1The number of rows of M
nc1The number of columns of M
IMresult of the inversion
nr2The number of rows of IM
nc2The number of columns of IM
Precondition
M, IM must have the double bracket element accessor
Matrix are supposed to be allocated first
nr1 == nc1
nr2 == nc2
nr1 == nr2

Definition at line 4963 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::inverse ( const Matrix1 &  M,
Matrix2 &  IM 
)
inline

Computes the inverse of a matrix using gaussian elimination.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/14
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
IMresult of the inversion
Precondition
M, IM must have cols() and rows() methods
M, IM must have the double bracket element accessor
Matrix are supposed to be allocated first
M.cols() == M.rows()
IM.rows() == IM.cols()
M.rows() == IM.rows()
Example:
std::size_t size2 = 500;
slip::Matrix<double> M3(size2,size2);
slip::Matrix<double> IM3(size2,size2);
slip::Matrix<double> testinv(size2,size2);
std::generate(M3.begin(),M3.end(),std::rand);
slip::inverse(M3,IM3);
slip::multiplies(M3,IM3,testinv);

Definition at line 5083 of file linear_algebra.hpp.

template<typename Type >
slip::Point2d<Type> slip::invert_distortion_model ( const slip::Point2d< Type > &  pd,
const slip::Vector< Type > &  p 
)

Inverts distortion model using the Newton-method.

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Gomit Guillaume <gomit.guillaume_AT_univ-poitiers.fr>
Version
0.0.2
Date
2012/07/04
Since
1.2.0
Parameters
pdslip::Point2d (distorted camera coordinates)
pVector containing all camera parameters (size of 23)
Returns
slip::Point2d (undistorted camera coordinates)

Definition at line 696 of file camera_algo.hpp.

template<class ForwardIterator , class T >
void slip::iota ( ForwardIterator  first,
ForwardIterator  last,
value,
step = T(1) 
)
inline

Iota assigns sequential increasing values based on a predefined step to a range. That is, it assigns value to *first, value + step to *(first + 1) and so on. In general, each iterator i in the range [first,last) is assigned value + step * (i - first).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
valueInit value.
stepStep between two values. Default step is 1.
Example:
//fill a matrix with 0.0 0.05 0.10...
slip::Matrix<double> Miota(4,5,0.0);
slip::iota(Miota.begin(),Miota.end(),0.0,0.05);
std::cout<<Miota<<std::endl;
Precondition
[first,last) is a valid range.
Remarks
Inspired from the iota prototype of the Standard Template Library.
Examples:
matrix_math_op.cpp, regularvector2dfield2d_op.cpp, regularvector3dfield3d_op.cpp, and test_graph.cpp.

Definition at line 2087 of file arithmetic_op.hpp.

template<class ForwardIterator , typename MaskIterator , class T >
void slip::iota_mask ( ForwardIterator  first,
ForwardIterator  last,
MaskIterator  mask_first,
value,
step = T(1),
typename std::iterator_traits< MaskIterator >::value_type  value_mask = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Iota_mask sequential increasing values based on a predefined step to a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valueInit value.
stepStep between two values. Default step is 1.
value_mask"True" value of the mask. Default is 1.
Example:
mask[2] = 1;
mask[4] = 1;
mask[8] = 1;
std::cout<<Miota<<std::endl;
slip::iota_mask(Miota.begin(),Miota.end(),
mask.begin(),
1.0,0.05,
int(1));
std::cout<<Miota<<std::endl;
Precondition
[first,last) is a valid range.

Definition at line 2131 of file arithmetic_op.hpp.

template<typename MatrixIterator1 >
bool slip::is_band_matrix ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename MatrixIterator1::size_type  lower_band_width,
const typename MatrixIterator1::size_type  upper_band_width,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is a band matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
lower_band_widthLower band width.
upper_band_widthUpper band width.
tol
Returns
true if the matrix i > j + lower_band_width and j > i - upper_band_width=> std::abs(Aij) < tol, false else.
Precondition
lower_band_width >= 0
upper_band_width >= 0
upper_band_width < (A_bot - A_up)[0]
lower_band_width < (A_bot - A_up)[0]
Example:

Definition at line 4266 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_band_matrix ( const Matrix &  A,
const typename Matrix::size_type  lower_band_width,
const typename Matrix::size_type  upper_band_width,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is symmetric.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
lower_band_widthLower band width.
upper_band_widthUpper band width.
tol
Returns
true if the matrix is symmetric, false else.
Example:

Definition at line 4333 of file linear_algebra.hpp.

template<typename T >
bool slip::is_complex ( const T &  val)

Test if an element is complex.

Author
Benoit Tremblais tremb.nosp@m.lais.nosp@m.@sic..nosp@m.univ.nosp@m.-poit.nosp@m.iers.nosp@m..fr : conceptor
Date
2009/02/21
Since
1.0.0
Parameters
val.Value to evaluate.
Returns
true if val is complex. false else
Example:
std::complex<float> c(2.0,1.0);
float f = 4.0;
std::cout<<"is_complex("<<c<<") = "<<slip::is_complex(c)<<std::endl;
std::cout<<"is_complex("<<f<<") = "<<slip::is_complex(f)<<std::endl;

Definition at line 179 of file linear_algebra_traits.hpp.

template<typename MatrixIterator1 >
bool slip::is_diagonal ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is diagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is diagonal, false else.
Example:
std::cout<<"fill main diagonal with 1.0 :"<<std::endl;
std::cout<<slip::is_diagonal(AA.upper_left(),AA.bottom_right())<<std::endl;

Definition at line 3899 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_diagonal ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is diagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is diagonal, false else.
Example:
std::cout<<"fill main diagonal with 1.0 :"<<std::endl;
std::cout<<slip::is_diagonal(AA)<<std::endl;

Definition at line 3952 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_hermitian ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is hermitian.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is hermitian, false else.
Example:
std::cout<<"Hilbert matrix = "<<std::endl;
std::cout<<H<<std::endl;
std::cout<<slip::is_hermitian(H.upper_left(),H.bottom_right())<<std::endl;
std::cout<<slip::is_hermitian(H.upper_left(),H.bottom_right(),1.0E-6)<<std::endl;

Definition at line 3986 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_hermitian ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is hermitian.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is hermitian, false else.
Example:
std::cout<<"Hilbert matrix = "<<std::endl;
std::cout<<H<<std::endl;
std::cout<<slip::is_hermitian(H)<<std::endl;
std::cout<<slip::is_hermitian(H,1.0E-6)<<std::endl;

Definition at line 4040 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_identity ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is identity.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is identity, false else.
Example:
std::cout<<slip::is_identity(M,1.0e-6)<<std::endl;

Definition at line 3848 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_lower_bidiagonal ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is lower_bidiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower_bidiagonal
Example:

Definition at line 4470 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_lower_bidiagonal ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is lower bidiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower bidiagonal, false else.
Example:

Definition at line 4495 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_lower_hessenberg ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is lower_hessenberg.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower_hessenberg
Example:

Definition at line 4575 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_lower_hessenberg ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is lower hessenber.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower hessenber, false else.
Example:

Definition at line 4601 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_lower_triangular ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is lower_triangular.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower triangular, false else.
Example:

Definition at line 4679 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_lower_triangular ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is lower triangular.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is lower triangular, false else.
Example:

Definition at line 4703 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_null_diagonal ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
int  diag_number,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix has a nul diagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container.
A_bot2D iterator on the bottom_right element of A container.
diag_numberdigonal number.
tolTolerance (epsilon by default).
Returns
true if the matrix is nul diagonal, false else.
Example:

Definition at line 4730 of file linear_algebra.hpp.

template<typename T >
bool slip::is_real ( const T &  val)

Test if an element is real.

Author
Benoit Tremblais tremb.nosp@m.lais.nosp@m.@sic..nosp@m.univ.nosp@m.-poit.nosp@m.iers.nosp@m..fr : conceptor
Date
2009/02/21
Since
1.0.0
Parameters
val.Value to evaluate.
Returns
true if val is real, false else.
Example:
std::complex<float> c(2.0,1.0);
float f = 4.0;
std::cout<<"is_real("<<c<<") = "<<slip::is_real(c)<<std::endl;
std::cout<<"is_real("<<f<<") = "<<slip::is_real(f)<<std::endl;

Definition at line 128 of file linear_algebra_traits.hpp.

template<typename MatrixIterator1 >
bool slip::is_skew_hermitian ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is skew hermitian.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is skew hermitian, false else.
Example:
Sshc(0,0) = std::complex<double>(0.0,1.0);
Sshc(0,1) = std::complex<double>(0.5,-0.5);
Sshc(0,2) = std::complex<double>(1.0,-1.2);
Sshc(1,0) = std::complex<double>(-0.5,-0.5);
Sshc(1,1) = std::complex<double>(0.0,2.0);
Sshc(1,2) = std::complex<double>(0.2,-0.3);
Sshc(2,0) = std::complex<double>(-1.0,-1.2);
Sshc(2,1) = std::complex<double>(-0.2,-0.3);
Sshc(2,2) = std::complex<double>(0.0,3.0);
std::cout<<"Sshc = \n"<<Sshc<<std::endl;
if(slip::is_skew_hermitian(Sshc.upper_left(),Sshc.bottom_right()))
{
std::cout<<"Sshc is skew hermitian"<<std::endl;
}
else
{
std::cout<<"Sshc is not skew hermitian"<<std::endl;
}

Definition at line 4084 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_skew_hermitian ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is skew hermitian.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is skew hermitian, false else.
Example:
Sshc(0,0) = std::complex<double>(0.0,1.0);
Sshc(0,1) = std::complex<double>(0.5,-0.5);
Sshc(0,2) = std::complex<double>(1.0,-1.2);
Sshc(1,0) = std::complex<double>(-0.5,-0.5);
Sshc(1,1) = std::complex<double>(0.0,2.0);
Sshc(1,2) = std::complex<double>(0.2,-0.3);
Sshc(2,0) = std::complex<double>(-1.0,-1.2);
Sshc(2,1) = std::complex<double>(-0.2,-0.3);
Sshc(2,2) = std::complex<double>(0.0,3.0);
std::cout<<"Sshc = \n"<<Sshc<<std::endl;
{
std::cout<<"Sshc is skew hermitian"<<std::endl;
}
else
{
std::cout<<"Sshc is not skew hermitian"<<std::endl;
}

Definition at line 4150 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_squared ( const Matrix &  A)
inline

Test if a matrix is squared.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
Returns
true if the matrix is squared, false else.
Example:
std::cout<<slip::is_squared(M)<<std::endl;

Definition at line 3800 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_squared ( MatrixIterator1  A_up,
MatrixIterator1  A_bot 
)
inline

Test if a matrix is squared.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
Returns
true if the matrix is squared, false else.
Example:
slip::Box2d<int> box(1,1,3,3);
std::cout<<slip::is_squared(M.upper_left(box),M.bottom_right(box))<<std::endl;

Definition at line 3823 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_symmetric ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is symmetric.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is symmetric, false else.
Example:
Sh(0,0) = 1.0; Sh(0,1) = 0.5; Sh(0,2) = -1.2;
Sh(1,0) = 0.5; Sh(1,1) = 2.0; Sh(1,2) = -0.3;
Sh(2,0) = -1.2; Sh(2,1) = -0.3; Sh(2,2) = 3.0;
if(slip::is_symmetric(Sh.upper_left(),Sh.bottom_right()))
{
std::cout<<"Sh is symmetric"<<std::endl;
}
else
{
std::cout<<"Sh is not symmetric"<<std::endl;
}

Definition at line 4189 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_symmetric ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is symmetric.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is symmetric, false else.
Example:
Sh(0,0) = 1.0; Sh(0,1) = 0.5; Sh(0,2) = -1.2;
Sh(1,0) = 0.5; Sh(1,1) = 2.0; Sh(1,2) = -0.3;
Sh(2,0) = -1.2; Sh(2,1) = -0.3; Sh(2,2) = 3.0;
{
std::cout<<"Sh is symmetric"<<std::endl;
}
else
{
std::cout<<"Sh is not symmetric"<<std::endl;
}

Definition at line 4229 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_tridiagonal ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is tridiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tol
Returns
true if the matrix is tridiagonal
Example:

Definition at line 4364 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_tridiagonal ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is tridiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tol
Returns
true if the matrix is tridiagonal, false else.
Example:

Definition at line 4390 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_upper_bidiagonal ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is upper_bidiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tol
Returns
true if the matrix is upper_bidiagonal
Example:

Definition at line 4418 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_upper_bidiagonal ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is upper bidiagonal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is upper bidiagonal, false else.
Example:

Definition at line 4442 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_upper_hessenberg ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is upper_hessenberg.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/22
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is upper_hessenberg
Example:

Definition at line 4521 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_upper_hessenberg ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is upper hessenber.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is upper hessenber, false else.
Example:

Definition at line 4547 of file linear_algebra.hpp.

template<typename MatrixIterator1 >
bool slip::is_upper_triangular ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
const typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator1 >::value_type >::value_type  tol = slip::epsilon<typename std::iterator_traits<MatrixIterator1>::value_type>() 
)
inline

Test if a matrix is upper_triangular.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
tolTolerance (epsilon by default).
Returns
true if the matrix is upper_triangular, false else.
Example:

Definition at line 4628 of file linear_algebra.hpp.

template<typename Matrix >
bool slip::is_upper_triangular ( const Matrix &  A,
const typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  tol = slip::epsilon<typename Matrix::value_type>() 
)
inline

Test if a matrix is upper triangular.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
AMatrix container
tolTolerance (epsilon by default).
Returns
true if the matrix is upper triangular, false else.
Example:

Definition at line 4653 of file linear_algebra.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::KullbackLeibler_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the Kullback-Leibler "distance" of two ranges : $ \sum_i (s_i log2(s_i/b_i))$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
Kullback-Leibler "distance" distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::KullbackLeibler_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1780 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::KullbackLeibler_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)
inline

Computes the Kullback-Leibler "distance" of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
Kullback-Leibler "distance" distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::KullbackLeibler_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1878 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::KullbackLeibler_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the Kullback-Leibler "distance" of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} (s_i log2(s_i/b_i))$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
Kullback-Leibler "distance" distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::KullbackLeibler_distance_mask<float>(M1.begin(),M1.end(),,Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1823 of file compare.hpp.

template<typename T , typename InputIterator >
T slip::kurtosis ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the kurtosis of a range

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities:

  • Laplace distribution: 6
  • Hyperbolic secant distribution: 5
  • Logistic distribution: 4.2
  • Normal distribution: 3
  • Raised cosine distribution: 2.406258...
  • Wigner semi circled distribution: 2
  • Uniform distribution: 1.8
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2006/07/29
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    meanThe mean of the container itself.
    Returns
    The value of the kurtosis of the container.
    Precondition
    [first,last) must be valid.
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    double mean = slip::mean<double>(M.begin(),M.end());
    std::cout<<slip::kurtosis(M.begin(),M.end(),mean)<<std::endl;

Definition at line 666 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::kurtosis_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the kurtosis of a range using a predicate

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities:

  • Laplace distribution: 6
  • Hyperbolic secant distribution: 5
  • Logistic distribution: 4.2
  • Normal distribution: 3
  • Raised cosine distribution: 2.406258...
  • Wigner semi circled distribution: 2
  • Uniform distribution: 1.8
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    meanThe mean of the range itself using the predicate.
    preda predicate function
    Returns
    The value of the kurtosis of the range using the predicate.
    Precondition
    [first,last) must be valid.
    Example:
    //definition of the predicate less than 10
    bool myPredicate (const double& val)
    {
    return (val<10);
    }
    //construction of the array
    slip::iota(M.begin(),M.end(),1,1);
    double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
    std::cout<<slip::kurtosis_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 3061 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::kurtosis_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the kurtosis of a range over a mask

\[\frac{n \sum_i (x_i-\overline{x})^4}{\left(\sum_i (x_i-\overline{x})^2\right)^2}\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails. Here are some common value of kurtosis for unimodal and symmetric densities:

  • Laplace distribution: 6
  • Hyperbolic secant distribution: 5
  • Logistic distribution: 4.2
  • Normal distribution: 3
  • Raised cosine distribution: 2.406258...
  • Wigner semi circled distribution: 2
  • Uniform distribution: 1.8
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    mask_firstAn InputIterator on the mask
    meanThe mean of the range itself over the mask.
    valueMask value.
    Returns
    The value of the kurtosis of the range over the mask.
    Precondition
    [first,last) must be valid.
    Range and the Mask must have the same dimensions
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    slip::Array2d<int> ValuedMask(4,5,2);
    for(std::size_t i = 0; i < M.dim1(); ++i)
    {
    ValuedMask[i][0]= 0;
    }
    for(std::size_t j = 0; j < M.dim2(); ++j)
    {
    ValuedMask[0][j]=0;
    }
    double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
    std::cout<<slip::kurtosis_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1907 of file statistics.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::L1_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the L1 distance of two ranges : $ \sum_i |s_i - b_i|$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
L1 distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L1_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1313 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::L1_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the L1 distance of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
L1 distance between the two ranges
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L1_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1412 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::L1_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the L1 distance of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} |s_i - b_i|$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
L1 distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> M1(2,3,f1);
slip::Matrix<float> M2(2,3,f2);
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::L1_distance_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1355 of file compare.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::L1_norm ( InputIterator  first,
InputIterator  last 
)
inline

Computes the L1 norm $ \sum_i{|x_i|}$ of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
the L1 norm of the range.
Precondition
[first, last) is a valid range
Value_T is Assignable
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
std::cout<<slip::L1_norm<float>(M.begin(),M.end())<<std::endl;

Definition at line 446 of file norms.hpp.

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.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predA predicate.
Returns
Precondition
[first, last) is a valid range
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(M.begin(),M.end(),1.0,1.0)
std::cout<<slip::L1_norm_if<float>(M.begin(),M.end(),lt5Predicate<float>)<<std::endl;

Definition at line 530 of file norms.hpp.

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) 
)
inline

Computes the L1 norm $ \sum_i{|x_i|}$ of a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
the infinite norm of the range.
Precondition
[first, last) is a valid range
[mask_first, (last-first)) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
float d[] = {0,1,1,0,0,1};
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<slip::L1_norm_mask<float>(M.begin(),M.end(),Mask.begin(),1)<<std::endl

Definition at line 483 of file norms.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::L22_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the square euclidian distance of two ranges: $ \sum_i (s_i - b_i)^2$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
square Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L22_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1059 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::L22_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the square eucludian distance of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
square Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L22_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1156 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::L22_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the square eucludian distance of two ranges according to a mask sequence : $ \sum_{i / mask_i = value} (s_i - b_i)^2$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
square Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::L22_distance_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1101 of file compare.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::L22_norm ( InputIterator  first,
InputIterator  last 
)
inline

Computes the L22 norm ( $\sum_i x_i^2$) of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
the L22 norm of the range.
Precondition
[first, last) is a valid range
Value_T is Assignable
If x is an object of type Value_T, y and z are objects of InputIterator's value type, then x + y * z is defined
The type of x + y * z is convertible to Value_T
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
std::cout<<slip::L22_norm<float>(M.begin(),M.end())<<std::endl;

Definition at line 112 of file norms.hpp.

template<typename InputIterator >
slip::lin_alg_traits<typename std::iterator_traits<InputIterator>::value_type>::value_type slip::L22_norm_cplx ( InputIterator  first,
InputIterator  last 
)
inline

Computes the L22 norm $ \sum_i \bar{z_i}z_i$ of a complex container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/02/28
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
a real value corresponding to the L22 norm.
Precondition
[first, last) is a valid range
Example:
slip::iota(M.begin(),M.end(),std::complex<float>(1.0,1.0),
std::complex<float>(1.0,0.5));
std::cout<<M<<std::endl;
std::cout<<slip::L22_norm_cplx(M.begin(),M.end())<<std::endl

Definition at line 3105 of file linear_algebra.hpp.

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.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predA predicate.
Returns
Precondition
[first, last) is a valid range
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(M.begin(),M.end(),1.0,1.0)
std::cout<<slip::L22_norm_if<float>(M.begin(),M.end(),lt5Predicate<float>)<<std::endl;

Definition at line 197 of file norms.hpp.

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) 
)
inline

Computes the L22 norm $ \sum_i x_i^2$ of a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
Precondition
[first, last) is a valid range
[mask_first, (last-first)) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
float d[] = {0,1,1,0,0,1};
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<slip::L22_norm_mask<float>(M.begin(),M.end(),Mask.begin(),1)<<std::endl

Definition at line 149 of file norms.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::L2_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the Euclidian distance of two ranges : $ \sqrt{\sum_i (s_i - b_i)^2}$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
Euclidian distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L2_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1197 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::L2_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the eucludian distance of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::L2_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1281 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::L2_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the eucludian distance of two ranges according to a mask sequence : $ \sqrt{\sum_{i / mask_i = value} (s_i - b_i)^2}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
Euclidian distance between two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f2);
std::cout<<slip::L2_distance_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1234 of file compare.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::L2_norm ( InputIterator  first,
InputIterator  last 
)
inline

Computes the L2 norm $ \sqrt{\sum_i x_i^2}$ of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/10
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
the L2 norm of the range.
Precondition
[first, last) is a valid range
Value_T is Assignable
If x is an object of type Value_T, y and z are objects of InputIterator's value type, then x + y * z is defined
The type of x + y * z is convertible to Value_T
Note
Calls std::sqrt(slip::L22_norm<Value_T>(first,last));
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
std::cout<<slip::L2_norm<float>(M.begin(),M.end())<<std::endl;

Definition at line 242 of file norms.hpp.

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.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predA predicate.
Returns
Precondition
[first, last) is a valid range
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(M.begin(),M.end(),1.0,1.0)
std::cout<<slip::L2_norm_if<float>(M.begin(),M.end(),lt5Predicate<float>)<<std::endl;

Definition at line 312 of file norms.hpp.

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) 
)
inline

Computes the Euclidean norm $ \sqrt{\sum_i x_i^2}$ of a range according to a mask sequence.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Precondition
[first, last) is a valid range
[mask_first, (last-first)) is a valid range
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
float d[] = {0,1,1,0,0,1};
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<slip::L2_norm_mask<float>(M.begin(),M.end(),Mask.begin(),1)<<std::endl

Definition at line 274 of file norms.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::laguerre_nd_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Laguerre multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Laguere Polynomials:

\[ P_{k+1}(x) = \frac{(2k+1 - x)P_k(x)-kP_{k-1}(x)}{k+1}\]

.

Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Remarks
This code is inspired from the file boost/math/special_functions/legendre.hpp (http://www.boost.org/)
Example:
//Generate x1 2d Laguerre basis
mh00.powers[0] = 0;
mh00.powers[1] = 0;
ph0.insert(mh00,1.0);
mh10.powers[0] = 1;
mh10.powers[1] = 0;
ph1.insert(mh10,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > hermite_x1_basis_2d;
hermite_x1_basis_2d.push_back(ph0);
hermite_x1_basis_2d.push_back(ph1);
for(unsigned l = 1; l < 10; ++l)
{
hermite_x1_basis_2d.push_back(slip::hermite_nd_next<slip::MultivariatePolynomial<double,2> >(l,ph1,hermite_x1_basis_2d[l],hermite_x1_basis_2d[l-1]));
}
for(unsigned l = 0; l < hermite_x1_basis_2d.size(); ++l)
{
std::cout<<hermite_x1_basis_2d[l]<<std::endl;
}

Definition at line 701 of file polynomial_algo.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::laguerre_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Laguerre polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Laguerre Polynomials:

\[ P_{k+1}(x) = \frac{(2k+1 - x)P_k(x)-kP_{k-1}(x)}{k+1}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/07
Version
0.0.1
Since
1.4.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Returns
Pk+1
Remarks
This code is inspired from the file boost/math/special_functions/laguerre.hpp (http://www.boost.org/)
Example:
mla00.powers[0] = 0;
mla00.powers[1] = 0;
pla0.insert(mla00,1.0);
pla1.insert(mla00,1.0);
mla10.powers[0] = 1;
mla10.powers[1] = 0;
pla1.insert(mla10,-1.0);
plax.insert(mla10,1.0);
std::cout<<"plax = "<<plax<<std::endl;
std::vector<slip::MultivariatePolynomial<double,2> > laguerre_x1_basis_2d;
laguerre_x1_basis_2d.push_back(pla0);
laguerre_x1_basis_2d.push_back(pla1);
for(unsigned l = 1; l < 10; ++l)
{
laguerre_x1_basis_2d.push_back(slip::laguerre_nd_next<slip::MultivariatePolynomial<double,2> >(l,plax,laguerre_x1_basis_2d[l],laguerre_x1_basis_2d[l-1]));
}
for(unsigned l = 0; l < laguerre_x1_basis_2d.size(); ++l)
{
std::cout<<laguerre_x1_basis_2d[l]<<std::endl;
}

Definition at line 649 of file polynomial_algo.hpp.

template<typename Container2d >
void slip::LDLT_decomposition ( Container2d &  A)

in place LU decomposition for symmetric matrix

\[A = LDL^T\]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Since
1.0.0
Version
0.0.1
Parameters
Aa unit lower triangular matrix.
Description:
  • L is a lower triangular matrix
  • L is stored in the lower triangular part of A
  • D is stored in the diagonal of A
Complexity: n^3/6 flops
Note
Works only on real matrices.

Definition at line 9633 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 , typename Vector1 , typename Matrix3 >
void slip::LDLT_decomposition ( const Matrix1 &  A,
Matrix2 &  L,
Vector1 &  D,
Matrix3 &  LT 
)

in place LU decomposition for symmetric matrix

\[A = LDL^T\]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Since
1.0.0
Version
0.0.1
Parameters
AThe matrix to decompose.
LThe lower triangular matrix.
DThe diagonal matrix.
LTThe transposed matrix of L.
Description:
  • L is a lower triangular matrix
Note
Works only on real matrices.

Definition at line 9683 of file linear_algebra.hpp.

template<typename Matrix1 , typename Vector1 , typename Vector2 >
void slip::LDLT_solve ( const Matrix1 &  A,
Vector1 &  X,
const Vector2 &  B 
)

LDLT solve of system AX = B with A a square symmetric Matrix. $ A = LDL^T$ with L a lower triangular matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/06
Since
1.0.0
Version
0.0.1
Parameters
A2D container.
X1D container.
B1D container.
Complexity:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!REPLACE 1E-06 by precision

Definition at line 9738 of file linear_algebra.hpp.

template<typename Matrix , typename SizeType , typename Real >
void slip::left_givens ( Matrix &  M,
const SizeType &  row1,
const SizeType &  row2,
const Real &  sinus,
const Real &  cosinus,
const SizeType &  col1,
const SizeType &  col2 
)
inline

Apply left Givens rotation multiplication.

Perform a left multiplication of a matrix M with the transpose Givens matrix on the row1 and row2 between the indices col1 and col2.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptator
Date
2008/10/14
Since
1.0.0
Version
0.0.1
Parameters
Mthe Container to multiply
row1the first row involved in the computation.
row2the second row involved in the computation.
sinusGivens sinus.
cosinusGivens cosinus.
col1the first column index.
col2the second column index.
Precondition
row1 and row2 must be within the Matrix indices range.
col1 and col2 must be within the Matrix indices range.
row1 should be less than row2.
col1 should be less than col2.
Complexity: 6 (col2-col1 + 1) flops

Definition at line 10798 of file linear_algebra.hpp.

template<typename Matrix1 , typename Vector1 , typename Matrix2 >
void slip::left_householder_accumulate ( const Matrix1 &  M,
const Vector1 &  V0,
Matrix2 &  Q 
)
inline

Computes Q = Q1Q2...Qn from the inplace Householder QR decomposition.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
M2D Container.
V0The Vector of the initial value of householder vectors
QThe accumulated matrix Q.

Definition at line 11154 of file linear_algebra.hpp.

template<typename RandomAccessIterator , typename MatrixIterator1 >
void slip::left_householder_update ( RandomAccessIterator  V_first,
RandomAccessIterator  V_last,
MatrixIterator1  M_up,
MatrixIterator1  M_bot 
)
inline

Left multiplies the Householder matrix P with the matrix M:

\[ M = (I - vv^H)M \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the beginning of the sequence (V)
V_lastRandomAccessIterator to one-past-the end of the sequence (V)
M_up2D iterator on the upper_left element of M.
M_bot2D iterator on the bottom_right_left element of M.
Complexity: 5*M.rows()*M.cols() for real data, 6*M.rows()*M.cols() for complex data
Remarks
Works with real and complex data.
Example:
slip::iota(Mh.begin(),Mh.end(),1.0);
std::cout<<"Mh = \n"<<Mh<<std::endl;
double nu = 0.0;
slip::housegen(Mh.col_begin(0),Mh.col_end(0),Vh2.begin(),Vh2.end(),nu);
std::cout<<"Vh2 = \n"<<Vh2<<std::endl;
std::cout<<"nu = "<<nu<<std::endl;
slip::left_householder_update(Vh2.begin(),Vh2.end(),
Mh.upper_left(),Mh.bottom_right());
std::cout<<"Mh = \n"<<Mh<<std::endl;

Definition at line 11111 of file linear_algebra.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::legendre_nd_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Legendre multivariate polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Legendre Polynomials of both the first and second kinds:

\[ \frac{(2k+1)xPk(x)-kP_{k-1}}{k+1}\]

.

Since
1.0.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Remarks
This code is inspired from the file boost/math/special_functions/legendre.hpp (http://www.boost.org/)
Example:
//creation of the two initial polynomial
m01.powers[0] = 0;
m01.powers[1] = 0;
p0.insert(m01,1.0);
m11.powers[0] = 1;
m11.powers[1] = 0;
p1.insert(m11,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > basis_nd;
basis_nd.push_back(p0);
basis_nd.push_back(p1);
for(unsigned l = 1; l < 10; ++l)
basis_nd.push_back(slip::legendre_nd_next<slip::MultivariatePolynomial<double,2> >(l, p1, basis_nd[l], basis_nd[l-1]));

Definition at line 133 of file polynomial_algo.hpp.

template<typename Poly , typename Poly1 , typename Poly2 , typename Poly3 >
Poly slip::legendre_next ( std::size_t  k,
Poly1  x,
Poly2  Pk,
Poly3  Pkm1 
)
inline

Implements the three term recurrence relation for the Legendre polynomials, this function can be used to create a sequence of orthogonal polynomial, and for rising k. This recurrence relation holds for Legendre Polynomials of both the first and second kinds:

\[ \frac{(2k+1)xPk(x)-kP_{k-1}}{k+1}\]

.

Since
1.0.0
Parameters
kThe degree of the last polynomial calculated.
xThe x polynomial.
PkThe value of the polynomial evaluated at degree k.
Pkm1The value of the polynomial evaluated at degree k-1.
Remarks
This code is inspired from the file boost/math/special_functions/legendre.hpp (http://www.boost.org/)
Example:
//creation of the two initial polynomial
P1[0] = 0.0;
std::vector<slip::Polynomial<double> > basis;
//creation of Legendre polynomial basis
basis.push_back(P0);
basis.push_back(P1);
for(unsigned k = 1; k < 10; ++k)
basis.push_back(my_legendre_next<slip::Polynomial<double> >(k, P1, basis[k], basis[k-1]));

Definition at line 172 of file polynomial_algo.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::Linf_distance ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the Linfinite distance of two ranges : $ sup \{|s_i - b_i|\}$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
Linf distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Linf_distance<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1636 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::Linf_distance_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the Linfinite distance of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
Linf distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Linf_distance_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1735 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::Linf_distance_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the Linfinite distance of two ranges according to a mask sequence : $ sup_{mask_i = value} \{|s_i - b_i|\}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
Linf distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::Linf_distance_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1679 of file compare.hpp.

template<typename T , typename RandomAccessIterator >
T slip::LM_chi2 ( RandomAccessIterator  first,
RandomAccessIterator  last 
)

Computes Chi2 for Lebvenberg Marquardt algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Parameters
firstRandomAccessIterator to the first element of the data.
lastRandomAccessIterator to one-past-the-end element of the data.

Definition at line 242 of file levenberg_marquardt.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::log ( const kvector< T, N > &  V)
related

Definition at line 1575 of file KVector.hpp.

template<typename T >
Vector<T> slip::log ( const Vector< T > &  V)
related

Definition at line 2143 of file Vector.hpp.

template<typename T >
Signal<T> slip::log ( const Signal< T > &  V)
related

Definition at line 2156 of file Signal.hpp.

template<typename T >
Matrix<T> slip::log ( const Matrix< T > &  M)
related

Definition at line 4022 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::log ( const HyperVolume< T > &  M)
related
Examples:
fft2d.cpp, and test_math.cpp.

Definition at line 5146 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::log ( const Matrix4d< T > &  M)
related

Definition at line 5155 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::log ( const Matrix3d< T > &  M)
related

Definition at line 5796 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::log ( const Volume< T > &  M)
related

Definition at line 6113 of file Volume.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::log10 ( const kvector< T, N > &  V)
related

Definition at line 1611 of file KVector.hpp.

template<typename T >
Vector<T> slip::log10 ( const Vector< T > &  V)
related

Definition at line 2179 of file Vector.hpp.

template<typename T >
Signal<T> slip::log10 ( const Signal< T > &  V)
related

Definition at line 2192 of file Signal.hpp.

template<typename T >
Matrix<T> slip::log10 ( const Matrix< T > &  M)
related

Definition at line 4058 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::log10 ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5182 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::log10 ( const Matrix4d< T > &  M)
related

Definition at line 5191 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::log10 ( const Matrix3d< T > &  M)
related

Definition at line 5832 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::log10 ( const Volume< T > &  M)
related

Definition at line 6149 of file Volume.hpp.

unsigned int slip::log2 ( unsigned int  x)
inline

Calculates the log2 of an integer.

Parameters
xUnsigned integer to reverse
Returns
log2(x)
Precondition
x != 0

Definition at line 135 of file FFT.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::lower_band_solve ( MatrixIterator  L_up,
MatrixIterator  L_bot,
int  p,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision 
)
inline

Solve the linear system L*X=B when L is p lower banded

\[ \left( \begin{array}{ccccccc} l_{1,1} & 0&\cdots&\cdots&\cdots&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&&&&\vdots\\ \vdots&&\ddots&\ddots&&&\vdots\\ l_{p+1,1}&&&\ddots&\ddots&&\vdots\\ 0&\ddots&&&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&&&l_{n-1,n-1}&0\\ 0&\cdots&0&l_{n,n-q}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
pWidth of the lower band.
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
L must be lower triangular
(L_bot - L_up)[0] == (L_bot - L_up)[1]
(L_bot - L_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
p < int((L_bot - L_up)[0])
Remarks
If L is singular an exception will be raised.
Works with real and complex data.
Complexity: np - p^2/2 flops
Example:
slip::hilbert(Glband);
slip::fill_diagonal(Glband,0.0,1);
slip::fill_diagonal(Glband,0.0,2);
slip::fill_diagonal(Glband,0.0,3);
slip::fill_diagonal(Glband,0.0,4);
slip::fill_diagonal(Glband,0.0,-4);
slip::fill_diagonal(Glband,0.0,-3);
double blband[] = {22.0,7.0,4.5,1.0,2.0};
slip::Vector<double> Blband(5,blband);
std::cout<< "Glband : " <<std::endl;
std::cout<< Glband <<std::endl;
std::cout<< "Blband : " <<std::endl;
std::cout<< Blband <<std::endl;
slip::lower_band_solve(Glband.upper_left(),Glband.bottom_right(),
2,
Xlband.begin(),Xlband.end(),
Blband.begin(),Blband.end(),1.0e-06);
std::cout<< "Xlband : \n" <<Xlband<<std::endl;
std::cout<< "Check: "<<std::endl;
slip::matrix_vector_multiplies(Glband,Xlband,Blband2);
std::cout<< "Blband2 : \n" <<Blband2<<std::endl;

Definition at line 7273 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::lower_bidiagonal_inv ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

Invert a lower bidiagonal matrix:

\[ \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ l_{1} & d_{2} & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
low_diag_firstRandomAccessIterator to the beginning of the first lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (low_diag_last - low_diag_first + 1)
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (diag_last - diag_first)
Complexity: 3n^2 - 2n flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double lb_diag[] = {1.0,2.0,3.0,4.0};
double lb_low[] = {2.0,2.0,1.0};
slip::Vector<double> LB_diag(4,lb_diag);
slip::Vector<double> LB_low(3,lb_low);
slip::Matrix<double> LB(LB_diag.size(),LB_diag.size());
slip::set_diagonal(LB_diag.begin(),LB_diag.end(),LB);
slip::set_diagonal(LB_low.begin(),LB_low.end(),LB,-1);
std::cout<<"LB = \n"<<LB<<std::endl;
slip::Matrix<double> LBinv(LB.rows(),LB.cols());
slip::lower_bidiagonal_inv(LB_diag.begin(),LB_diag.end(),
LB_low.begin(),LB_low.end(),
LBinv.upper_left(),LBinv.bottom_right());
std::cout<<"LBinv = \n"<<LBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> LBLBinv(LB.rows(),LB.cols());
std::cout<<"LBLBinv = \n"<<LBLBinv<< std::endl;

Definition at line 8182 of file linear_algebra.hpp.

template<typename Container2d1 , typename Container2d2 >
void slip::lower_bidiagonal_inv ( const Container2d1 &  A,
Container2d2 &  Ainv,
typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Container2d1::value_type>::value_type(1.0E-6) 
)

Invert a lower bidiagonal matrix:

\[ \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ l_{1} & d_{2} & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
A2d container of the matrix to invert.
Ainv2d container of the matrix the inverse matrix.
precision1.0E-6 by default.
Precondition
A.dim1() == A.dim2()
Ainv.dim1() == Ainv.dim2()
Complexity: 3n^2 - 2n flops + (2n - 1) flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double lb_diag[] = {1.0,2.0,3.0,4.0};
double lb_low[] = {2.0,2.0,1.0};
slip::Vector<double> LB_diag(4,lb_diag);
slip::Vector<double> LB_low(3,lb_low);
slip::Matrix<double> LB(LB_diag.size(),LB_diag.size());
slip::set_diagonal(LB_diag.begin(),LB_diag.end(),LB);
slip::set_diagonal(LB_low.begin(),LB_low.end(),LB,-1);
std::cout<<"LB = \n"<<LB<<std::endl;
slip::Matrix<double> LBinv(LB.rows(),LB.cols());
std::cout<<"LBinv = \n"<<LBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> LBLBinv(LB.rows(),LB.cols());
std::cout<<"LBLBinv = \n"<<LBLBinv<< std::endl;

Definition at line 8259 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::lower_bidiagonal_solve ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

solve Ax = B with A lower bidiagonal

\[ \left( \begin{array}{ccccc} dl_1 & 0&\cdots&\cdots&0\\ ll_1 & dl_2 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&dl_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the first element of thediagonal.
diag_lastRandomAccessIterator to one-past-the-end element of the diagonal.
low_diag_firstRandomAccessIterator to the first element of the lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end element of the lower diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
precision1.0E-6 by default.
Precondition
low_diag_last != low_diag_first
(low_diag_last - low_diag_first) == (X_last - X_first - 1)
(low_diag_last - low_diag_first) == (B_last - B_first - 1)
Complexity: 3n - 2 flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular.
Example:
double lb_diag[] = {1.0,2.0,3.0,4.0};
double lb_low[] = {2.0,2.0,1.0};
double b_lb[] = {3.0,2.0,1.0};
slip::Vector<double> LB_diag(4,lb_diag);
slip::Vector<double> LB_low(3,lb_low);
slip::Matrix<double> LB(LB_diag.size(),LB_diag.size());
slip::set_diagonal(LB_diag.begin(),LB_diag.end(),LB);
slip::set_diagonal(LB_low.begin(),LB_low.end(),LB,-1);
std::cout<<"LB = \n"<<LB<<std::endl;
slip::Vector<double> B_lb(4,b_lb);
slip::lower_bidiagonal_inv(LB_diag.begin(),LB_diag.end(),
LB_low.begin(),LB_low.end(),
X_lb.begin(),X_lb.end(),
B_lb.begin(),B_lb.end());
std::cout<<"X_lb = \n"<<X_lb<< std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"X_lb2 = \n"<<X_lb2<< std::endl;

Definition at line 8101 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 >
void slip::lower_triangular_inv ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Ainv_up,
MatrixIterator2  Ainv_bot,
typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename MatrixIterator1::value_type>::value_type(1.0E-6) 
)
inline

Invert a lower triangular Matrix

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
Ainv_up2D iterator corresponding to the upper_left element of the inverse matrix.
Ainv_bot2D iterator corresponding to one past-the-end bottom_right of the inverse matrix.
precision1.0E-6 by default.
Precondition
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1];
(A_bot - A_up)[0] == (Ainv_bot - Ainv_up)[0]
(A_bot - A_up)[1] == (Ainv_bot - Ainv_up)[1]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular
Complexity: n^3 flops
Example:
double dlow[] = {2.0, 0.0, 0.0, 1.0, 5.0, 0.0, 7.0, 9.0, 8.0};
slip::Array2d<double> Alow(3,3,dlow);
slip::Array2d<double> invAlow(3,3);
std::cout<<"Alow \n="<<Alow<<std::endl;
slip::lower_triangular_inv(Alow.upper_left(),Alow.bottom_right(),
invAlow.upper_left(),invAlow.bottom_right(),
1.0e-6);
std::cout<<"invAlow \n="<<invAlow<<std::endl;
slip::matrix_matrix_multiplies(Alow,invAlow,IAlow);
std::cout<<"Alow invAlow = \n"<<IAlow<<std::endl;

Definition at line 6212 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::lower_triangular_inv ( const Matrix1 &  A,
Matrix2 &  Ainv,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Matrix1::value_type>::value_type(1.0E-6) 
)
inline

Invert a lower triangular Matrix

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
AThe matrix to invert.
AinvThe inverted matrix.
precision1.0E-6 by default.
Precondition
A.rows() == A.cols()
Ainv.rows() == Ainv.cols()
A.rows() == Ainv.rows()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular
Complexity: n^3 flops
Example:
double dlow[] = {2.0, 0.0, 0.0, 1.0, 5.0, 0.0, 7.0, 9.0, 8.0};
slip::Array2d<double> Alow(3,3,dlow);
slip::Array2d<double> invAlow(3,3);
std::cout<<"Alow \n="<<Alow<<std::endl;
slip::lower_triangular_inv(Alow,invAlow,1.0e-6);
std::cout<<"invAlow \n="<<invAlow<<std::endl;
slip::matrix_matrix_multiplies(Alow,invAlow,IAlow);
std::cout<<"Alow invAlow = \n"<<IAlow<<std::endl;

Definition at line 6285 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::lower_triangular_solve ( MatrixIterator  L_up,
MatrixIterator  L_bot,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision 
)
inline

Solve the linear system L*X=B when L is lower triangular

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
L must be lower triangular
(L_bot - L_up)[0] == (L_bot - L_up)[1]
(L_bot - L_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
Remarks
If L is singular an exception will be raised.
Works with real and complex data.
Complexity: n^2 flops
Example:
double dlow[] = {2.0, 0.0, 0.0, 1.0, 5.0, 0.0, 7.0, 9.0, 8.0};
slip::Array2d<double> Alow(3,3,dlow);
std::cout<<"Alow ="<<std::endl;
std::cout<<Alow<<std::endl;
double blow[] = {6.0,2.0,5.0};
slip::Array<double> Blow(3,blow);
std::cout<<"Blow ="<<std::endl;
std::cout<<Blow<<std::endl;
slip::lower_triangular_solve(Alow.upper_left(),Alow.bottom_right(),
Xlow.begin(),Xlow.end(),
Blow.begin(),Blow.end(),10E-6);
std::cout<<"Xlow = "<<Xlow<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Alow * Xlow = "<<std::endl;
std::cout<<Blow2<<std::endl;

Definition at line 6048 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::lower_triangular_solve ( const Matrix &  L,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  precision 
)
inline

Solve the linear system L*X=B when L is lower triangular

\[ \left( \begin{array}{cccc} l_{1,1} & 0&\cdots&0\\ l_{2,1} & l_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&l_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
L2D container
X1D container
B1D container
precision
Complexity: n^2 flops
Remarks: This algorihtm is also called forward substitution
algorithm.
Precondition
L must be lower triangular
L.rows() == L.cols()
L.cols() == X.size()
X.size() == B.size()
Remarks
If L is singular an exception will be raised.
Works with real and complex data.
Example:
double dlow[] = {2.0, 0.0, 0.0, 1.0, 5.0, 0.0, 7.0, 9.0, 8.0};
slip::Array2d<double> Alow(3,3,dlow);
std::cout<<"Alow ="<<std::endl;
std::cout<<Alow<<std::endl;
double blow[] = {6.0,2.0,5.0};
slip::Array<double> Blow(3,blow);
std::cout<<"Blow ="<<std::endl;
std::cout<<Blow<<std::endl;
slip::lower_triangular_solve(Alow,Xlow,Blow,10E-6);
std::cout<<"Xlow = "<<Xlow<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Alow * Xlow = "<<std::endl;
std::cout<<Blow2<<std::endl;

Definition at line 6153 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Vector >
int slip::lu ( const Matrix1 &  M,
Matrix2 &  LU,
Vector &  Indx 
)
inline

Computes the LU decomposition according to rows permutations of a matrix using Crout method

\[ \left( \begin{array}{cccc} m_{1,1} & \cdots&\cdots&m_{1,n}\\ \vdots&&&\vdots\\ \vdots&&&\vdots\\ m_{n,1}&\cdots&\cdots&m_{n,n}\\ \end{array}\right) = \left( \begin{array}{cccc} 1&0&\cdots&0\\ l_{2,1}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ 0&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \]

LU is composed of L and U as following:

\[ LU = \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ l_{2,1}&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ l_{n,1}&\cdots&l_{n,n-1}&u_{n,n}\\ \end{array}\right) \]

Indx is a vector that records the row permutations effected by the partial pivoting.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr: adapt to complex
Date
2009/03/02
Since
1.0.0
Version
0.0.2
Parameters
MMatrix container
LUMatrix container lower and upper matrix in the same container
IndxVector container for permutation matrix (integer)
Returns
+1 if row interchanges was even, -1 if odd
Precondition
M.rows() == M.cols()
LU.rows() == LU.cols()
M.rows() == LU.rows()
Indx.size() == M.rows()
Remarks
Works with real and complex data.
Raise an exception if M is a singular matrix.
Complexity:
Example:
std::size_t size=5;
slip::Matrix<double> M(size,size);
slip::Matrix<double> LU(size,size);
slip::Vector<double> P(size,size);
std::generate(M.begin(),M.end(),std::rand);
std::cout<<std::endl;
std::cout <<"M = \n"<<M<<std::endl;
slip::lu(M,LU,P);
std::cout <<"LU =\n"<<LU<<std::endl;
std::cout <<"P =\n"<<P<<std::endl;

Definition at line 5164 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
int slip::lu ( const Matrix1 &  M,
Matrix2 &  L,
Matrix2 &  U,
Matrix2 &  P 
)
inline

Computes the LU decomposition according to rows permutations of a matrix using Crout method

\[ \left( \begin{array}{cccc} m_{1,1} & \cdots&\cdots&m_{1,n}\\ \vdots&&&\vdots\\ \vdots&&&\vdots\\ m_{n,1}&\cdots&\cdots&m_{n,n}\\ \end{array}\right) = P \left( \begin{array}{cccc} 1&0&\cdots&0\\ l_{2,1}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ 0&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \]

LU is composed of L and U as following:

\[ LU = \left( \begin{array}{cccc} u_{1,1}&\cdots&\cdots&u_{1,n}\\ l_{2,1}&\ddots&&\vdots\\ \vdots&\ddots&\ddots&\vdots\\ l_{n,1}&\cdots&l_{n,n-1}&u_{n,n}\\ \end{array}\right) \]

P is a permutation matrix needed in case of partial pivoting during the algorithm.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/11/16
Since
1.0.0
Version
0.0.2
Parameters
MMatrix container
LMatrix container for lower triangular
UMatrix container for upper triangular
PMatrix container for permutation matrix
Returns
+1 if row interchanges was even, -1 if odd
Precondition
M.rows() == M.cols()
L.rows() == L.cols()
U.rows() == U.cols()
M.rows() == L.rows()
M.rows() == U.rows()
P.rows() == P.cols()
P.cols() == L.rows()
Remarks
Works with real and complex data.
Raise an exception if M is a singular matrix.
Complexity:
Example:
std::size_t size=5;
slip::Matrix<double> M(size,size);
slip::Matrix<double> L(size,size);
slip::Matrix<double> U(size,size);
slip::Matrix<double> P(size,size);
slip::Matrix<double> LU(size,size);
slip::Matrix<double> PLU(size,size);
std::generate(M.begin(),M.end(),std::rand);
std::cout<<std::endl;
std::cout <<"M = \n"<<M<<std::endl;
slip::lu(M,L,U,P);
std::cout <<"L =\n"<<L<<std::endl;
std::cout <<"U =\n"<<U<<std::endl;
std::cout <<"P =\n"<<P<<std::endl;
std::cout <<"P =\n"<<P<<std::endl;
std::cout <<"PLU =\n"<<PLU<<std::endl;

Definition at line 5353 of file linear_algebra.hpp.

template<class Matrix1 >
Matrix1::value_type slip::lu_det ( const Matrix1 &  M)
inline

Computes the determinant of a matrix using LU decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/12/08
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
Returns
T determinant of the matrix M.
Precondition
M.rows() == M.cols()
Remarks
Works with real and complex data.
Will raise an exception if M is singular.
Example:
double ddet[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0};
slip::Matrix<double> Mdet(3,3,ddet);
std::cout<<"Mdet =\n"<<Mdet<<std::endl;
std::cout <<"lu_det(Mdet) = "<<lu_det(Mdet)<<std::endl;

Definition at line 5619 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::lu_inv ( const Matrix1 &  M,
Matrix2 &  IM 
)
inline

Computes the inverse of a matrix using LU decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/14
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
IMresult of the inversion
Precondition
M.rows() == M.cols()
IM.rows() == IM.cols()
M.rows() == IM.rows()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular.
Complexity:
Example:
std::size_t size = 5;
slip::Matrix<double> M(size,size);
slip::Matrix<double> IM(size,size);
slip::Matrix<double> MxIM(size,size);
std::generate(M.begin(),M.end(),std::rand);
std::cout<<"M = \n"<<M<<std::endl;
slip::lu_inv(M,IM);
std::cout<<"IM = \n"<<IM<<std::endl;
std::cout <<"M x IM = \n"<<std::endl<< MxIM<<std::endl;

Definition at line 5558 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 , class Vector3 >
void slip::lu_solve ( const Matrix  LU,
const std::size_t  nr,
const std::size_t  nc,
const Vector1 &  Indx,
const std::size_t  nv1,
const Vector2 &  B,
const std::size_t  nv2,
Vector3 &  X,
const std::size_t  nv3 
)
inline

Solve Linear Equation using LU decomposition.

Solve : A.X=B This function need results from lu method to works

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/21
Since
1.0.0
Version
0.0.1
Parameters
LUMatrix container comes from lu method (A in the equation)
nrThe number of rows of LU
ncThe number of columns of LU
IndxPermutation vector comes from UDecomposition method
nv1he number of rows of Indx
BVector to match
nv2he number of rows of B
XResult Vector
nv3he number of rows of X
Precondition
Matrix must have the double bracket element accessor
Matrix are supposed to be allocated first
Vector must have the simple bracket element accessor
Vector are supposed to be allocated first
nr == nc
nv1 == nv2
nv2 == nv3
nr == nv1

Definition at line 5421 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::lu_solve ( const Matrix &  A,
Vector1 &  X,
const Vector2 &  B 
)
inline

Solve Linear Equation AX = B using LU decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/21
Since
1.0.0
Version
0.0.1
Parameters
AThe Matrix of the linear system.
XResult Vector.
BThe vector B of the linear system.
Precondition
A.rows() == A.cols()
A.cols() == X.size()
B.size() == X.size()
Remarks
Works with real and complex data.
Raise an exception if the matrix A is singular.
Complexity:
Example:
double ddet[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0};
slip::Matrix<double> Mdet(3,3,ddet);
std::cout<<"Mdet \n"<<Mdet<<std::endl;
double bdet[] ={1.0, 2.0, 3.0};
slip::Vector<double> Bdet(3,bdet);
std::cout<<"Bdet \n"<<Bdet<<std::endl;
slip::lu_solve(Mdet,Xdet,Bdet);
std::cout<<"Xdet \n"<<Xdet<<std::endl;
std::cout<<"Check: "<<std::endl;
std::cout<<"Bdet2 \n"<<Bdet2<<std::endl;

Definition at line 5495 of file linear_algebra.hpp.

template<typename Function , typename Real , typename DerivativeFunction >
void slip::marquardt ( Function &  fun,
DerivativeFunction &  df,
slip::Vector< Real > &  par,
slip::Vector< Real > &  r,
Real &  calchi2,
const int  maxiter = 10000,
const Real  eps = static_cast<Real>(1e-6) 
)

Optimization of function using the Levenberg-Marquardt algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Guillaume Gomit <tremblais_AT_sic.univ-poitiers.fr>
Parameters
funfunction to optimize.
dfDerivative Function.
parVector of paramameters.
rResidual vector.
chi2Residual result.
maxiterMax number of iterations.
epsCriteria of convergence.
Remarks
Simple implementation of the levendberg Marquardt algorithm. Use at your own risk...
Example:
//definition of a fonction
template <typename Type>
struct funLM_ex1 : public std::unary_function <slip::Vector<Type>,slip::Vector<Type> >
{
typedef funLM_ex1<Type> self;
funLM_ex1(const slip::Vector<Type>& x, const slip::Vector<Type>& y) :
x_(x),
r_(slip::Vector<Type>(x.size())),
y_(y)
{
assert(x.size() == y.size());
}
slip::Vector<Type>& operator() (const slip::Vector<Type>& pt) // define the function
{
for(std::size_t i = 0; i < x_.size(); ++i)
{
r_[i]= y_[i] - (pt[0]*exp(-pt[1]*x_[i]) + pt[2]);
}
return r_;
}
slip::Vector<Type> r_; //residue ||y - f(x,pk)||
slip::Vector<Type> y_; //y = f(x,p)
};
//....
typedef double Type;
std::size_t n = 40;
slip::iota(x.begin(),x.end(),Type(0.0));
for(std::size_t i = 0; i < n; ++i)
{
//p[0] = 5.0, p[1] = 0.1, p[2] = 1.0
y[i]=(5.0*exp(-0.1*x[i]) + 1.0);
}
std::cout<<"y = \n"<<y<<std::endl;
slip::add_gaussian_noise(y.begin(),y.end(),y.begin(),0.0,0.01);
std::cout<<"y with noise = \n"<<y<<std::endl;
funLM_ex1<Type> fun(x,y);
//parameters vector
p[0] = 1.0;
p[1] = 0.0;
p[2] = 0.0;
//residue vector
slip::LMDerivFunctor<funLM_ex1<Type>, Type> df(fun,n,p.size());
Type chi2 = 0.0;
slip::marquardt(fun,df,p,r,chi2);
std::cout<<"estimated p = \n"<<p<<std::endl;
std::cout<<"r = \n"<<r<<std::endl;
std::cout<<"chi2 = "<<chi2<<std::endl;

Definition at line 330 of file levenberg_marquardt.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::matrix_matrix_multiplies ( MatrixIterator1  M1_up,
MatrixIterator1  M1_bot,
MatrixIterator2  M2_up,
MatrixIterator2  M2_bot,
MatrixIterator3  R_up,
MatrixIterator3  R_bot 
)
inline

Computes the matrix matrix multiplication of 2 2d ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/19
Since
1.0.0
Version
0.0.1
Parameters
M1_up2D iterator on the upper_left element of M1 container
M1_bot2D iterator on the bottom_right element of M1 container
M2_up2D iterator on the upper_left element of M2 container
M2_bot2D iterator on the bottom_right element of M2 container
R_up2D iterator on the upper_left element of R container
R_bot2D iterator on the bottom_right element of R container
Remarks
Works with real and complex data.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::iota(M2.begin(),M2.end(),0.0);
std::cout<<"M2 = "<<std::endl;
std::cout<<M2<<std::endl;
slip::matrix_matrix_multiplies(M.upper_left(),M.bottom_right(),
M2.upper_left(),M2.bottom_right(),
MxM2.upper_left(),MxM2.bottom_right());
std::cout<<"M x M2 = "<<std::endl;
std::cout<<MxM2<<std::endl;

Definition at line 1621 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::matrix_matrix_multiplies ( const Matrix1 &  M1,
const Matrix2 &  M2,
Matrix3 &  Result 
)
inline

Computes the multiplication of a two Matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M1The first Matrix container.
M2The second Matrix container.
ResultThe container which contains the result of the multiplication
Precondition
M1 must have row_begin iterators.
M2 must have col_begin iterators.
M1, M2 and Result must have the double bracket accessor
M1, M2 and Result should contain data of the same value type
M1.cols == M2.rows()
M1.rows == Result.rows()
M2.cols == Result.cols()
Remarks
Works with real and complex data.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::iota(M2.begin(),M2.end(),0.0);
std::cout<<"M2 = "<<std::endl;
std::cout<<M2<<std::endl;
std::cout<<"M x M2 = "<<std::endl;
std::cout<<MxM2<<std::endl;

Definition at line 1688 of file linear_algebra.hpp.

template<class RandomAccessIterator2d1 , class RandomAccessIterator2d2 >
void slip::matrix_matrixt_multiplies ( RandomAccessIterator2d1  M1_up,
RandomAccessIterator2d1  M1_bot,
RandomAccessIterator2d2  Res_up,
RandomAccessIterator2d2  Res_bot 
)
inline

Computes the multiplication of a matrix with its transposate A^T $ Res = A \times A^T $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2013/02/14
Since
1.2.0
Version
0.0.1
Parameters
M1_up2d iterator on the upper_left element of the M1 matrix
M1_bot2d iterator on the bottom_right element of the M1 matrix
Res_up2d iterator on the upper_left element of the Res matrix
Res_bot2d iterator on the bottom_right element of the Res matrix
Precondition
(Res_bot-Res_up)[0] == (M1_bot-M1_up)[0])
(Res_bot-Res_up)[1] == (M1_bot-M1_up)[0])
Example:
const std::size_t rows = 5;
const std::size_t cols = 6;
slip::Matrix<double> A(rows,cols);
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::Matrix<double> AAT(rows,rows);
A.bottom_right(),
AAT.upper_left(),
AAT.bottom_right());
std::cout<<"AAT = \n"<<AAT<<std::endl;

Definition at line 2047 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::matrix_matrixt_multiplies ( const Matrix1 &  M1,
Matrix2 &  result 
)
inline

Computes the multiplication of A and its transposate AT $ Res = A \times A^T $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2013/02/14
Since
1.2.0
Version
0.0.1
Parameters
M1Matrix
resultresult = AA^T
Precondition
result.rows()==M1.rows()
result.cols()==M1.rows()
Example:
const std::size_t rows = 5;
const std::size_t cols = 6;
slip::Matrix<double> A(rows,cols);
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::Matrix<double> AAT(rows,rows);
std::cout<<"AAT = \n"<<AAT<<std::endl;

Definition at line 2103 of file linear_algebra.hpp.

template<class RandomAccessIterator2d1 , class T , class RandomAccessIterator2d2 >
void slip::matrix_scalar_multiplies ( RandomAccessIterator2d1  M_upper_left,
RandomAccessIterator2d1  M_bottom_right,
const T &  scal,
RandomAccessIterator2d2  R_upper_left,
RandomAccessIterator2d2  R_bottom_right 
)
inline

Computes the multiplication of a Matrix by a scalar R = M*scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
M_upper_leftRandomAccessIterator2d to the upper_left matrix element.
M_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
R_upper_leftRandomAccessIterator2d to the upper_left matrix element.
R_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
scalScalar value.
Precondition
(M_bottom_right - M_upper_left)[0] == (R_bottom_right - R_upper_left)[0]
(M_bottom_right - M_upper_left)[1] == (R_bottom_right - R_upper_left)[1]
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::Matrix<float> Mscal1(3,4);
float scal = 3.3;
slip::matrix_scalar_multiplies(M.upper_left(),M.bottom_right(),
scal,
Mscal1.upper_left(), Mscal1.bottom_right());
std::cout<<"Mscal1 = M * "<<scal<<std::endl;
std::cout<<Mscal1<<std::endl;

Definition at line 856 of file linear_algebra.hpp.

template<class Matrix1 , class T , class Matrix2 >
void slip::matrix_scalar_multiplies ( const Matrix1 &  M,
const T &  scal,
Matrix2 &  R 
)
inline

Computes the multiplication of a Matrix by a scalar R = M*scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
MMatrix.
scalScalar value.
RResulting matrix
Precondition
M.rows() == R.rows()
M.cols() == R.cols()
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::Matrix<float> Mscal1(3,4);
float scal = 3.3;
std::cout<<"Mscal1 = M * "<<scal<<std::endl;
std::cout<<Mscal1<<std::endl;

Definition at line 910 of file linear_algebra.hpp.

template<class RandomAccessIterator2d1 , class T , class RandomAccessIterator2d2 >
void slip::matrix_shift ( RandomAccessIterator2d1  M_upper_left,
RandomAccessIterator2d1  M_bottom_right,
const T &  lambda,
RandomAccessIterator2d2  R_upper_left,
RandomAccessIterator2d2  R_bottom_right 
)
inline

Computes

\[ R = A - \lambda I_n\]

with In the identity matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/20
Since
1.0.0
Version
0.0.1
Parameters
M_upper_leftRandomAccessIterator2d to the upper_left matrix element.
M_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
lambdaScalar.
R_upper_leftRandomAccessIterator2d to the upper_left matrix element.
R_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
Precondition
(M_bottom_right - M_upper_left)[0] == (M_bottom_right - M_upper_left)[1]
(M_bottom_right - M_upper_left)[0] == (R_bottom_right - R_upper_left)[0]
(M_bottom_right - M_upper_left)[1] == (R_bottom_right - R_upper_left)[1]
Remarks
Works with real and complex data.
Example:
slip::iota(Mshift.begin(),Mshift.end(),1.0);
std::cout<<"Mshift = "<<std::endl;
std::cout<<Mshift<<std::endl;
slip::Matrix<double> Mshift2(4,4);
slip::matrix_shift(Mshift.upper_left(),Mshift.bottom_right(),
2.2,
Mshift2.upper_left(),Mshift2.bottom_right());
std::cout<<"Mshift - 2.2 I4= "<<std::endl;
std::cout<<Mshift2<<std::endl;

Definition at line 2146 of file linear_algebra.hpp.

template<class RandomAccessIterator2d1 , class T >
void slip::matrix_shift ( RandomAccessIterator2d1  M_upper_left,
RandomAccessIterator2d1  M_bottom_right,
const T &  lambda 
)
inline

Computes

\[ A = A - \lambda I_n\]

with In the identity matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/20
Since
1.0.0
Version
0.0.1
Parameters
M_upper_leftRandomAccessIterator2d to the upper_left matrix element.
M_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
lambdaScalar.
Precondition
(M_bottom_right - M_upper_left)[0] == (M_bottom_right - M_upper_left)[1]
Remarks
Works with real and complex data.
Example:
slip::iota(Mshift.begin(),Mshift.end(),1.0);
std::cout<<"Mshift = "<<std::endl;
std::cout<<Mshift<<std::endl;
slip::Matrix<double> Mshift2(4,4);
slip::matrix_shift(Mshift.upper_left(),Mshift.bottom_right(),
2.2);
std::cout<<"Mshift - 2.2 I4= "<<std::endl;
std::cout<<Mshift2<<std::endl;

Definition at line 2206 of file linear_algebra.hpp.

template<class Matrix1 , class T , class Matrix2 >
void slip::matrix_shift ( const Matrix1 &  A,
const T &  lambda,
Matrix2 &  R 
)
inline

Computes

\[ R = A - \lambda I_n\]

with In the identity matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/20
Version
0.0.1
Since
1.0.0
Parameters
AThe input matrix.
lambdascalar.
Routput matrix.
Precondition
(M.rows() == M.cols())
(M.rows() == R.rows())
(M.cols() == R.cols())
Remarks
Works with real and complex data.
Example:
slip::iota(Mshift.begin(),Mshift.end(),1.0);
std::cout<<"Mshift = "<<std::endl;
std::cout<<Mshift<<std::endl;
slip::Matrix<double> Mshift2(4,4);
slip::matrix_shift(Mshift,2.2,Mshift2);
std::cout<<"Mshift - 2.2 I4= "<<std::endl;
std::cout<<Mshift2<<std::endl;

Definition at line 2259 of file linear_algebra.hpp.

template<class Matrix , class T >
void slip::matrix_shift ( Matrix &  A,
const T &  lambda 
)
inline

Computes

\[ A = A - \lambda I_n\]

with In the identity matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/20
Since
1.0.0
Version
0.0.1
Parameters
AThe input/output matrix.
lambdascalar.
Precondition
(M.row() == M.cols())
Remarks
Works with real and complex data.
Example:
slip::iota(Mshift.begin(),Mshift.end(),1.0);
std::cout<<"Mshift = "<<std::endl;
std::cout<<Mshift<<std::endl;
slip::matrix_shift(Mshift,2.2);
std::cout<<"Mshift - 2.2 I4= "<<std::endl;
std::cout<<Mshift<<std::endl;

Definition at line 2295 of file linear_algebra.hpp.

template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void slip::matrix_vector_multiplies ( RandomAccessIterator2d  M_upper_left,
RandomAccessIterator2d  M_bottom_right,
RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2  result_first,
RandomAccessIterator2  result_last 
)
inline

Computes the multiplication of a Matrix and a Vector: Result=MV.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
M_upper_leftRandomAccessIterator2d to the upper_left matrix element.
M_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
first1RandomAccessIterator to the first element of the Vector.
last1RandomAccessIterator to one-past-the-end element of the vector.
result_firstRandomAccessIterator to the first element of the result vector.
result_lastRandomAccessIterator to one-past-the-end element of the result vector.
Precondition
(M_bottom_right - M_upper_left)[0] == (last1 - first1)
(M_bottom_right - M_upper_left)[1] == (result_last - result_first)
Matrix and Vector must have the same data type.
Complexity: 2*M.rows()*M.cols() flops
Remarks
Works with real and complex matrix.
Example:
slip::iota(M.begin(),M.end(),0.0);
slip::iota(V.begin(),V.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V<<std::endl;
slip::matrix_vector_multiplies(M.upper_left(),M.bottom_right(),
V.begin(),V.end(),
MxV.begin(),MxV.end());
std::cout<<"MxV = "<<std::endl;
std::cout<<MxV<<std::endl;

Definition at line 963 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::matrix_vector_multiplies ( const Matrix &  M,
const Vector1 &  V,
Vector2 &  Result 
)
inline

Computes the multiplication of a Matrix and a Vector: Result=MV.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
MThe Matrix container.
VThe Vector container.
ResultThe container which contains the result of the multiplication
Precondition
M must have row_begin iterators.
V must be compatible with the Container concept of the STL.
M.cols() == V.size()
Result.size() == M.rows()
Matrix and Vector must have the same data type.
Remarks
Works with real and complex matrix.
Complexity: 2*M.rows()*M.cols() flops
Example:
slip::iota(M.begin(),M.end(),0.0);
slip::iota(V.begin(),V.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V<<std::endl;
std::cout<<"MxV = "<<std::endl;
std::cout<<MxV<<std::endl;

Definition at line 1030 of file linear_algebra.hpp.

template<class Matrix , typename VectorIterator >
void slip::MatrixHouseholder ( Matrix &  H,
VectorIterator  V_begin,
VectorIterator  V_end 
)
inline

Computes the Householder matrix of a vector V :

\[ H = I - \frac{2 \times V \times V^{t*}}{V^{t*} \times V} \]

If V is an householder vector of a matrix M then $ H \times M $ is a matrix with zeros on the first column (except the first element).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/16
Since
1.0.0
Version
0.0.1
Parameters
Ha 2d container for the householder matrix
V_beginiterator on the first element of V
V_enditerator on the last element of V
Precondition
VectorIterator have to be RandomAccessIterator.
NbRows(H) == NbCols(H)
NbRows(H) == SizeOf(V)

Definition at line 674 of file linear_algebra_qr.hpp.

template<typename T , std::size_t N>
T& slip::max ( kvector< T, N > &  V1)
related

Definition at line 1428 of file KVector.hpp.

template<typename T >
T& slip::max ( const Vector< T > &  V1)
related

Definition at line 2006 of file Vector.hpp.

template<typename T >
T& slip::max ( const Signal< T > &  V1)
related

Definition at line 2019 of file Signal.hpp.

template<typename T >
T& slip::max ( const GrayscaleImage< T > &  M1)
related

Returns the max element of a GrayscaleImage.

Parameters
M1the GrayscaleImage
Returns
the max element
Examples:
test_math.cpp, and test_numeric_limits.cpp.

Definition at line 3704 of file GrayscaleImage.hpp.

template<typename T >
T& slip::max ( const Matrix< T > &  M1)
related

Definition at line 3885 of file Matrix.hpp.

template<typename T >
T& slip::max ( const HyperVolume< T > &  M1)
related

Definition at line 5057 of file HyperVolume.hpp.

template<typename T >
T& slip::max ( const Matrix4d< T > &  M1)
related

Definition at line 5066 of file Matrix4d.hpp.

template<typename T >
T& slip::max ( const Matrix3d< T > &  M1)
related

Definition at line 5707 of file Matrix3d.hpp.

template<typename T >
T& slip::max ( const Volume< T > &  M1)
related

Definition at line 6024 of file Volume.hpp.

template<typename Real >
Real slip::max_brockett_maragos_minus ( const Real  gplus,
const Real  gminus 
)
inline

Definition at line 1057 of file derivatives.hpp.

template<typename Real >
Real slip::max_brockett_maragos_plus ( const Real  gplus,
const Real  gminus 
)
inline

Definition at line 1047 of file derivatives.hpp.

template<typename _ForwardIterator , typename Predicate >
_ForwardIterator slip::max_element_if ( _ForwardIterator  first,
_ForwardIterator  last,
Predicate  pred 
)

Return the maximum element in a range according to a predicate or last if the predicate is never verified.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predPredicate.
Returns
Iterator referencing the first instance of the largest value
Precondition
[first,last) must be valid.
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
std::cout<<M<<std::endl;
std::cout<<*(slip::max_element_if(M.begin(),M.end(),lt5Predicate<float>))<<std::endl;

Definition at line 483 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _Compare , typename Predicate >
_ForwardIterator slip::max_element_if_compare ( _ForwardIterator  first,
_ForwardIterator  last,
Predicate  pred,
_Compare  comp 
)

Return the maximum element in a range using comparison functor according to a predicate or return last if the predicate is never verified.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predPredicate.
compComparison functor.
Returns
Iterator referencing the first instance of the largest value
Precondition
[first,last) must be valid.
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
bool compare(const T val1, const T val2)
{
return (val1<val2);
}
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
std::cout<<M<<std::endl;
std::cout<<*(slip::max_element_if_compare(M.begin(),M.end(),lt5Predicate<float>,compare<float>))<<std::endl;

Definition at line 603 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _MaskIterator >
_ForwardIterator slip::max_element_mask ( _ForwardIterator  first,
_ForwardIterator  last,
_MaskIterator  mask_first,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Return the maximum element in a range according to a mask sequence or return last if no value verify the mask.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
Iterator referencing the first instance of the largest value
Precondition
[first,last) must be valid.
[mask_first,mask_first2 + (last-first)) must be valid
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
slip::Array2d<int> Mask(2,3,d);
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<*(slip::max_element_mask(M.begin(),M.end(),Mask.begin(),1))<<std::endl;

Definition at line 428 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _MaskIterator , typename _Compare >
_ForwardIterator slip::max_element_mask_compare ( _ForwardIterator  first,
_ForwardIterator  last,
_MaskIterator  mask_first,
_Compare  comp,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Return the maximum element in a range using comparison functor according to a mask sequence or return last if no value verify the mask.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
mask_firstAn input iterator.
compComparison functor.
valuetrue value of the mask range. Default is 1.
Returns
Iterator referencing the first instance of the largest value
Precondition
[first,last) must be valid.
[mask_first,mask_first + (last-first)) must be valid.
template<typename T>
bool compare(const T val1, const T val2)
{
return (val1<val2);
}
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
slip::Array2d<int> Mask(2,3,d);
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<*(slip::max_element_mask_compare(M.begin(),M.end(),Mask.begin(),compare<float>,1))<<std::endl;

Definition at line 541 of file stl_algo_ext.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::maximum ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the maximum of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//computes the bitwise maximum of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::maximum(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 1081 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::maximum_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the maximum of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
// maximum of two Array2d according to a Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::maximum_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1222 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::maximum_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the maximum of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// addtion of two Array2d
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::maximum_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::maximum_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1157 of file arithmetic_op.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::mean ( InputIterator  first,
InputIterator  last 
)
inline

Computes the mean value of a range

\[ \frac{1}{n}\sum_i x_i\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
The mean value of the container.
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::mean<float>(M.begin(),M.end())<<std::endl;

Definition at line 314 of file statistics.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T slip::mean_abs_diff ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the mean absolute difference of two range of size N: $(1/ N)\sum_i^N |xi - yi|$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
mean absolute value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Value_T must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::mean_abs_diff<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 653 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::mean_abs_diff_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the mean absolute difference of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
mean absolute value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::mean_abs_diff_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 756 of file compare.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Value_T slip::mean_abs_diff_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the mean absolute difference of two ranges of size N according to a mask sequence : $(1/ N_{mask})\sum_{i / mask_i = value} |xi - yi|$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
mean absolute value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::mean_abs_diff_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 698 of file compare.hpp.

template<typename Value_T , typename InputIterator , typename Predicate >
Value_T slip::mean_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the mean value of a range using a predicate

\[ \frac{1}{n}\sum_i x_i\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
preda predicate function
Returns
The mean value of the range using a predicate.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::mean_if<double>(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 2652 of file statistics.hpp.

template<typename Value_T , typename InputIterator , typename MaskIterator >
Value_T slip::mean_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the mean value of a range over a mask

\[ \frac{1}{n}\sum_i x_i\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
mask_firstAn InputIterator on the mask
valueMask value.
Returns
The mean value of the range over the mask.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);

Definition at line 1479 of file statistics.hpp.

template<typename DataT , typename MeanT >
MeanT slip::mean_next ( const int  n,
const MeanT &  prev_mean,
const DataT &  xnp1 
)

Recursive mean algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/04/24
Since
1.2.0
Version
0.0.1
Parameters
nCurrent element index.
prev_meanPrevious mean value.
xnp1Next value of the serie.
Returns
the next mean value.
Example:
slip::iota(x.begin(),x.end(),1,1);
double mu = static_cast<double>(x[0]);
std::cout<<"mu = "<<mu<<std::endl;
for(int i = 1; i < 8; ++i)
{
mu = slip::mean_next(i,mu,x[i]);
std::cout<<"mu = "<<mu<<std::endl;
}

Definition at line 4089 of file statistics.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T slip::mean_square_diff ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the mean square of the pointwise difference of two ranges of size N: $ \frac{1}{N}\sum_i^N (xi - yi)^2 $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
mean square value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Value_T must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::mean_square_diff<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 507 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::mean_square_diff_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the mean square of the pointwise difference of two ranges according to a Predicate : $ \frac{1}{N_{pred}}\sum_{i / pred=true} (xi - yi)^2 $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
mean square value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::mean_square_diff_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 610 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::mean_square_diff_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the mean square of the pointwise difference of two ranges of size N according to a mask sequence : $ \frac{1}{N_{mask}}\sum_{i / mask_i = value} (xi - yi)^2 $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
mean square value of the differences of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::mean_square_diff_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 553 of file compare.hpp.

template<typename RandomAccessIterator >
std::iterator_traits<RandomAccessIterator>::value_type slip::median ( RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Computes the median value from a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/11/05
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median(M2.begin(),M2.end())<<std::endl;
Examples:
median_filter.cpp, median_filter_ind_safeN.cpp, median_filter_ind_unsafeN.cpp, median_filter_safe_generic.cpp, median_filter_safeN.cpp, and median_filter_unsafeN.cpp.

Definition at line 1080 of file statistics.hpp.

template<typename RandomAccessIterator , typename StrictWeakOrdering >
std::iterator_traits<RandomAccessIterator>::value_type slip::median ( RandomAccessIterator  first,
RandomAccessIterator  last,
StrictWeakOrdering  comp 
)
inline

Computes the median value from a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/11/05
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
compis a model of StrictWeakOrdering.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median(M2.begin(),M2.end(),std::less<float>())<<std::endl;

Definition at line 1110 of file statistics.hpp.

template<typename RandomAccessIterator , typename Size >
std::iterator_traits<RandomAccessIterator>::value_type slip::median_from_data_n ( RandomAccessIterator  first,
RandomAccessIterator  last,
Size  n 
)
inline

Computes the median value from a non sorted range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
nThe number of element in the range.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median_from_data_n(M2.begin(),M2.end(),9)<<std::endl;
Examples:
regularvector2dfield2d_op.cpp, and regularvector3dfield3d_op.cpp.

Definition at line 944 of file statistics.hpp.

template<typename RandomAccessIterator , typename Size , typename StrictWeakOrdering >
std::iterator_traits<RandomAccessIterator>::value_type slip::median_from_data_n ( RandomAccessIterator  first,
RandomAccessIterator  last,
Size  n,
StrictWeakOrdering  comp 
)
inline

Computes the median value from a non sorted range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
nThe number of element in the range.
compis a model of StrictWeakOrdering.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median_from_data_n(M2.begin(),M2.end(),9,std::less<float>())<<std::endl;

Definition at line 979 of file statistics.hpp.

template<typename InputIterator >
std::iterator_traits<InputIterator>::value_type slip::median_from_sorted_data ( InputIterator  first,
InputIterator  last 
)
inline

Computes the median value from a sorted range: returns *(first + (last - first) / 2)

  • (last - first) is even
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2006/07/29
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstA RandomAccessIterator.
    lastA RandomAccessIterator.
    Returns
    The median value of the range.
    Precondition
    [first,last) must be valid.
    The range must be sorted.
    (last - first) must return the number of element in the container

Definition at line 891 of file statistics.hpp.

template<typename InputIterator , typename Predicate >
std::iterator_traits<InputIterator>::value_type slip::median_from_sorted_data_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the median value from a sorted range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
preda predicate function
Returns
The Iterator to the median value of the range over a mask iterator.
Precondition
[first,last) must be valid.
The range must be sorted.
(last - first) must return the number of element in the range

Definition at line 3334 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator >
std::iterator_traits<InputIterator>::value_type slip::median_from_sorted_data_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the median value from a sorted range over a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
mask_firstAn InputIterator on the mask
valueMask value.
Returns
The Iterator to the median value of the range over a mask iterator.
Precondition
[first,last) must be valid.
The range must be sorted.
(last - first) must return the number of element in the range
Range and the Mask must have the same dimensions

Definition at line 2258 of file statistics.hpp.

template<typename RandomAccessIterator , typename Size >
std::iterator_traits<RandomAccessIterator>::value_type slip::median_from_sorted_data_n ( RandomAccessIterator  first,
Size  n 
)
inline

Computes the median value from a sorted range: returns *(first + n/2).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Version
0.0.1
Parameters
firstA RandomAccessIterator.
nThe number of element in the container.
Returns
The median value of the range.
Precondition
The range must be sorted.
The iterator must have the opertor+(std::size_t n) defined

Definition at line 913 of file statistics.hpp.

template<typename InputIterator , typename Predicate >
std::iterator_traits<InputIterator>::value_type slip::median_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the median value from a non sorted range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
preda predicate function
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::median_if(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 3387 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator >
std::iterator_traits<InputIterator>::value_type slip::median_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the median value from a non sorted range over a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
mask_firstAn InputIterator of the mask
valueMask value.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout<<slip::median_mask(M.begin(),M.end(),ValuedMask.begin(),2)<<std::endl;

Definition at line 2317 of file statistics.hpp.

template<typename RandomAccessIterator , typename SizeType >
std::iterator_traits<RandomAccessIterator>::value_type slip::median_n ( RandomAccessIterator  first,
RandomAccessIterator  last,
SizeType  n 
)
inline

Computes the median value from a range of size n.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/11/05
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
nSize of the range.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median_n(M2.begin(),M2.end(),9)<<std::endl;
Examples:
regularvector2dfield2d_op.cpp, and regularvector3dfield3d_op.cpp.

Definition at line 1140 of file statistics.hpp.

template<typename RandomAccessIterator , typename SizeType , typename StrictWeakOrdering >
std::iterator_traits<RandomAccessIterator>::value_type slip::median_n ( RandomAccessIterator  first,
RandomAccessIterator  last,
SizeType  n,
StrictWeakOrdering  comp 
)
inline

Computes the median value from a range of size n.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/11/05
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
nSize of the range.
compis a model of StrictWeakOrdering.
Returns
The median value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::median_n(M2.begin(),M2.end(),9,std::less<float>())<<std::endl;

Definition at line 1170 of file statistics.hpp.

template<typename T , std::size_t N>
T& slip::min ( kvector< T, N > &  V1)
related

Definition at line 1421 of file KVector.hpp.

template<typename T >
T& slip::min ( const Vector< T > &  V1)
related

Definition at line 1999 of file Vector.hpp.

template<typename T >
T& slip::min ( const Signal< T > &  V1)
related

Definition at line 2012 of file Signal.hpp.

template<typename T >
T& slip::min ( const GrayscaleImage< T > &  M1)
related

Returns the min element of a GrayscaleImage.

Parameters
M1the GrayscaleImage
Returns
the min element
Examples:
test_math.cpp, and test_numeric_limits.cpp.

Definition at line 3693 of file GrayscaleImage.hpp.

template<typename T >
T& slip::min ( const Matrix< T > &  M1)
related

Definition at line 3878 of file Matrix.hpp.

template<typename T >
T& slip::min ( const HyperVolume< T > &  M1)
related

Definition at line 5050 of file HyperVolume.hpp.

template<typename T >
T& slip::min ( const Matrix4d< T > &  M1)
related

Definition at line 5059 of file Matrix4d.hpp.

template<typename T >
T& slip::min ( const Matrix3d< T > &  M1)
related

Definition at line 5700 of file Matrix3d.hpp.

template<typename T >
T& slip::min ( const Volume< T > &  M1)
related

Definition at line 6017 of file Volume.hpp.

template<typename _ForwardIterator , typename Predicate >
_ForwardIterator slip::min_element_if ( _ForwardIterator  first,
_ForwardIterator  last,
Predicate  pred 
)

Return the minimum element in a range according to a predicate or return last if the predicate is never verified.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predPredicate.
Returns
Iterator referencing the first instance of the smallest value
Precondition
[first,last] must be valid.
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
std::cout<<M<<std::endl;
std::cout<<*(slip::min_element_if(M.begin(),M.end(),lt5Predicate<float>))<<std::endl;

Definition at line 754 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _Compare , typename Predicate >
_ForwardIterator slip::min_element_if_compare ( _ForwardIterator  first,
_ForwardIterator  last,
Predicate  pred,
_Compare  comp 
)

Return the minimum element in a range using comparison functor according to a predicate or return last if the predicate is never verified.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
predPredicate.
compComparison functor.
Returns
Iterator referencing the first instance of the smallest value
Precondition
[first,last) must be valid.
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
bool compare(const T val1, const T val2)
{
return (val1>val2);
}
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
std::cout<<M<<std::endl;
std::cout<<*(slip::min_element_if_compare(M.begin(),M.end(),lt5Predicate<float>,compare<float>))<<std::endl;

Definition at line 816 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _MaskIterator >
_ForwardIterator slip::min_element_mask ( _ForwardIterator  first,
_ForwardIterator  last,
_MaskIterator  mask_first,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Return the minimum element in a range according to a mask sequence or return last if no value verify the mask.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
mask_firstAn input iterator.
valuetrue value of the mask range. Default is 1.
Returns
Iterator referencing the first instance of the smallest value
Precondition
[first,last) must be valid.
[mask_first,mask_first + (last-first)) must be valid.
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
slip::Array2d<int> Mask(2,3,d);
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<*(slip::min_element_mask(M.begin(),M.end(),Mask.begin(),1))<<std::endl;

Definition at line 658 of file stl_algo_ext.hpp.

template<typename _ForwardIterator , typename _MaskIterator , typename _Compare >
_ForwardIterator slip::min_element_mask_compare ( _ForwardIterator  first,
_ForwardIterator  last,
_MaskIterator  mask_first,
_Compare  comp,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Return the minimum element in a range using comparison functor according to a mask sequence or return last if no value verify the mask.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/01/13
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
mask_firstAn input iterator.
compComparison functor.
valuetrue value of the mask range. Default is 1.
Returns
Iterator referencing the first instance of the smallest value
Precondition
[first,last) must be valid.
[mask_first,mask_first + (last-first)) must be valid.
bool compare(const T val1, const T val2)
{
return (val1>val2);
}
float f[] = {5.0,2.0,1.0,7.0,3.0,2.0};
int d[] = {1,0,1,1,1,0};
slip::Array2d<int> Mask(2,3,d);
std::cout<<M<<std::endl;
std::cout<<Mask<<std::endl;
std::cout<<*(slip::min_element_mask_compare(M.begin(),M.end(),Mask.begin(),compare<float>,1))<<std::endl;

Definition at line 717 of file stl_algo_ext.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::minimum ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the minimum of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//computes the bitwise minimum of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::minimun(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 891 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::minimum_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the minimum of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
// minimum two Array2d according to a Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::minimum_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1032 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::minimum_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the minimum of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// minimum of two Array2d
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::minimum_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::minimum_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 967 of file arithmetic_op.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::Minkowski_distance ( const std::size_t  n,
InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the Minkowski order n distance of two ranges : $ (\sum_i |s_i - b_i|^n)^\frac{1}{n}$ Use L1 and L2 distance for n=1 or 2.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/22
Since
1.0.0
Version
0.0.1
Parameters
norder of the minkowksi distance
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
Returns
Minksowksi distance between the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
n > 0
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Minkowski_distance<float>(3,M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 1457 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::Minkowski_distance_if ( const std::size_t  n,
InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)
inline

Computes the Minkowski order n distance of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
norder of the minkowksi distance
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
Minksowksi distance between the two ranges
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::Minkowski_distance_if<float>(3,M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1581 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::Minkowski_distance_mask ( const std::size_t  n,
InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the Minkowski order n distance of two ranges according to a mask sequence : $ (\sum_{i / mask_i = value} |s_i - b_i|^n)^\frac{1}{n}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
norder of the minkowksi distance
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
Minksowksi distance between the two ranges
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
n > 0
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::Minkowski_distance_mask<float>(3,M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 1512 of file compare.hpp.

template<typename Real >
Real slip::minmod ( const Real  gplus,
const Real  gminus 
)
inline

Definition at line 1027 of file derivatives.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::minus ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the difference of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//substraction of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::minus(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 315 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::minus_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the difference of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
// minus of two Array2d according to a Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::minus_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 458 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::minus_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the difference of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// difference of two Array2d according to a mask
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::minus_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::minus_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 392 of file arithmetic_op.hpp.

template<typename InputIterator1 , typename OutputIterator >
void slip::minus_scalar ( InputIterator1  __first1,
InputIterator1  __last1,
const typename std::iterator_traits< InputIterator1 >::value_type &  scalar,
OutputIterator  __result 
)
inline

Substracts a scalar to a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An InputIterator.
__last1An InputIterator.
scalarA scalar value.
__resultAn OutputIterator.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
//substracts 5 to M
slip::iota(M.begin(),M.end(),1,1);
slip::minus_scalar(M.begin(),M.end(),5,M3.begin());

Definition at line 1433 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void slip::minus_scalar_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Substracts a scalar to a range according to a Predicate.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
scalarA scalar value.
__resultAn output iterator.
__predA predicate.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
// substracts 5 to v1 according to the Predicate lt5Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::minus_scalar_if(v1.begin(),v1.end(),
5,
v3.begin(),
lt5Predicate<int>);
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1556 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void slip::minus_scalar_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Substracts a scalar to a range according to a mask sequence.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
scalarA scalar value.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
[__first1,__last1) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example1:
// substracts 5 to v1
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::minus_scalar_mask(v1.begin(),v1.end(),
mask.begin(),
5,
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::minus_scalar_mask(v1.begin(),v1.end(),
maskint.begin(),
5,
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1499 of file arithmetic_op.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::modified_gram_schmidt ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Q_up,
MatrixIterator2  Q_bot,
MatrixIterator3  R_up,
MatrixIterator3  R_bot 
)

Modified Gram-Schmidt orthogonalization algorithm on a matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
A_upRandomAccessIterator2d to the upper_left of the matrix A.
A_botRandomAccessIterator2d to the bottom_right of the matrix A.
Q_upRandomAccessIterator2d to the upper_left of the matrix Q.
Q_botRandomAccessIterator2d to the bottom_right of the matrix Q.
R_upRandomAccessIterator2d to the upper_left of the matrix R.
R_botRandomAccessIterator2d to the bottom_right of the matrix R.
Precondition
(A_up - A_bot)[0] == (Q_up - Q_bot)[0]
(A_up - A_bot)[1] == (Q_up - Q_bot)[1]
(A_up - A_bot)[1] == (R_up - R_bot)[0]
(A_up - A_bot)[1] == (R_up - R_bot)[1]
(A_up - A_bot)[0] >= (A_up - A_bot)[1]
Complexity: 2mn^2 with m = A number of rows and n = A number of columns.
Remarks
Works with real and complex data.
Example:
for(int i = 0; i < Arc.rows(); ++i)
{
for(int j = 0; j < Arc.cols(); ++j)
{
Arc[i][j] = std::complex<double>(4 + (i-j),(i-j));
}
}
std::cout<<"Arc = \n"<<Arc<<std::endl;
slip::modified_gram_schmidt(Arc.upper_left(),Arc.bottom_right(),
Qrc.upper_left(),Qrc.bottom_right(),
Rrc.upper_left(),Rrc.bottom_right());
std::cout<<"Qrc = \n"<<Qrc<<std::endl;
std::cout<<"Rrc = \n"<<Rrc<<std::endl;
std::cout<<"QrcTQrc = \n"<<QrcTQrc<<std::endl;
std::cout<<"QrcRrc = \n"<<QrcRrc<<std::endl;

Definition at line 390 of file gram_schmidt.hpp.

template<class RandomAccessIterator , class InnerProduct >
void slip::modified_gram_schmidt_normalization ( RandomAccessIterator  init_base_first,
RandomAccessIterator  init_base_end,
RandomAccessIterator  ortho_base_first,
RandomAccessIterator  ortho_base_end,
InnerProduct  inner_prod 
)

Modified Gram-Schmidt orthonormalization algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
init_base_firstRandomAccessIterator to the first element of the Base to process.
init_base_endRandomAccessIterator to one past the last element of the Base to process.
ortho_base_firstRandomAccessIterator to the first element of the resulting Base.
ortho_base_endRandomAccessIterator to one past the last element of the resulting Base.
inner_prodBinaryFunction traducing the InnerProduct to use.
Precondition
Input containers must have the same sizes
The element within the container must have the +=, - , / by InnerProduct Result operators defined
Generic modified Gram-Schmidt orthonormalization algorithm.
The input base iterator init_base_first point to the first base Element. You can specify your own inner product on the base elements inheriting from a BinaryFunction. For example like this example code wich define the slip::Vector<T> inner product.
template<class T> struct inner_prod : public std::binary_function<slip::Vector<T>, slip::Vector<T>,T>
{
inner_prod(){}
T operator() (const slip::Vector<T>& x, const slip::Vector<T>& y)
{
slip::Vector<T> z = x * y;
return z.sum();
}
};

Definition at line 189 of file gram_schmidt.hpp.

template<class RandomAccessIterator , class InnerProduct >
void slip::modified_gram_schmidt_orthogonalization ( RandomAccessIterator  init_base_first,
RandomAccessIterator  init_base_end,
RandomAccessIterator  ortho_base_first,
RandomAccessIterator  ortho_base_end,
InnerProduct  inner_prod 
)

Modified Gram-Schmidt orthogonalization algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/02/27
Since
1.0.0
Version
0.0.1
Parameters
init_base_firstRandomAccessIterator to the first element of the Base to process.
init_base_endRandomAccessIterator to one past the last element of the Base to process.
ortho_base_firstRandomAccessIterator to the first element of the resulting Base.
ortho_base_endRandomAccessIterator to one past the last element of the resulting Base.
inner_prodBinaryFunction traducing the InnerProduct to use.
Precondition
Input containers must have the same sizes
The element within the container must have the +=, - , / by InnerProduct Result operators defined
Generic modified Gram-Schmidt orthogonalization algorithm.
The input base iterator init_base_first point to the first base Element. You can specify your own inner product on the base elements inheriting from a BinaryFunction. For example like this example code wich define the slip::Vector<T> inner product.
template<class T> struct inner_prod : public std::binary_function<slip::Vector<T>, slip::Vector<T>,T>
{
inner_prod(){}
T operator() (const slip::Vector<T>& x, const slip::Vector<T>& y)
{
slip::Vector<T> z = x * y;
return z.sum();
}
};

Definition at line 312 of file gram_schmidt.hpp.

template<typename InputIterator1 , typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename OutputIterator >
void slip::multi_threshold ( InputIterator1  first,
InputIterator1  last,
RandomAccessIterator1  first_th,
RandomAccessIterator1  last_th,
RandomAccessIterator2  first_level,
RandomAccessIterator2  last_level,
OutputIterator  result_first,
OutputIterator  result_last 
)

multi_threshold algorithm It is equivalent to a quantification J[i] = Level[i] if T[i-1] < I[i] <= T[i]

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2010/11/02
Version
0.0.2
Parameters
firstInputIterator to the input data.
lastInputIterator to the input data.
first_thRandomAccessIterator to the threshold data.
last_thRandomAccessIterator to the threshold data.
first_levelInputIterator to the level data.
last_levelInputIterator to the level data.
result_firstOutputIterator to the output data.
result_lastOutputIterator to the output data.
Precondition
(last_th - first_th) == (last_level - first_level)
(last - first) == (result_last - result_first)
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
M[0][4] = 18.0;
M[3][3] = 2.0;
M[3][0] = 5.0;
M[1][2] = 20.0;
std::cout<<"M=\n"<<M<<std::endl;
int f1[]={5,10,15,20};
int f2[]={1,2,3,4};
slip::Array<int> level(4,f2);
std::cout<<"threshold = \n"<<threshold<<std::endl;
std::cout<<"level = \n"<<level<<std::endl;
slip::Array2d<double> M_res(M.rows(),M.cols());
slip::multi_threshold(M.begin(),M.end(),
threshold.begin(),threshold.end(),
level.begin(),level.end(),
M_res.begin(),M_res.end());
std::cout<<"M_res=\n"<<M_res<<std::endl;
Todo:
optimize

Definition at line 341 of file threshold.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::multiplies ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the pointwise product of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//bitwise multiplication of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::multiplies(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 508 of file arithmetic_op.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::multiplies ( const Matrix1 &  M1,
const std::size_t  nr1,
const std::size_t  nc1,
const Matrix2 &  M2,
const std::size_t  nr2,
const std::size_t  nc2,
Matrix3 &  Result,
const std::size_t  nr3,
const std::size_t  nc3 
)
inline

Computes the multiplication of two Matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/03
Since
1.0.0
Version
0.0.1
Parameters
M1The first Matrix container
nr1The number of rows of M1
nc1The number of columns of M1
M2The second Matrix container
nr2The number of rows of M2
nc2The number of columns of M2
ResultThe container which contains the result of the multiplication
nr3The number of rows of Result
nc3The number of columns of Result
Precondition
M1, M2 and M3 must have the double bracket element accessor
nc1 == nr2
nr1 == nr3
nc1 == nc3
Deprecated:
You should use slip::matrix_matrix_multiplies instead

Definition at line 1846 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::multiplies ( const Matrix1 &  M,
const std::size_t  nrm,
const std::size_t  ncm,
const Matrix2 &  V,
const std::size_t  nrv,
Matrix3 &  Result,
const std::size_t  nrr 
)
inline

Computes the multiplication of a Matrix with a Vector.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/23
Since
1.0.0
Version
0.0.1
Parameters
MThe Matrix container
nrmThe number of rows of M
ncmThe number of columns of M
VThe Vector container
nrvThe number of rows of V
ResultThe container which contains the result of the multiplication
nrrThe number of columns of Result
Precondition
M must have double bracket element accessor
V and Result must have simple bracket element accessor
ncm == nrv
nrv == nrr
Deprecated:
You should use slip::matrix_vector_multiplies instead

Definition at line 1896 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
void slip::multiplies ( const Matrix1 &  M1,
const Matrix2 &  M2,
Matrix3 &  Result 
)
inline

Computes the multiplication of two Matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/03
Since
1.0.0
Version
0.0.1
Parameters
M1first Matrix container
M2second Matrix container
Resultresult of the multiplication
Precondition
M1, M2 and M3 must have cols() and rows() methods
M1, M2 and M3 must have the double bracket element accessor
Matrix are supposed to be allocated first
M1.cols() == M2.rows()
M1.rows() == M3.rows()
M2.cols() == M3.cols()
Deprecated:
You should use slip::matrix_matrix_multiplies instead
Example:
slip::iota(M.begin(),M.end(),0.0,1.0);
slip::iota(M2.rbegin(),M2.rend(),0.0,1.0);
slip::multiplies(M,M2,Result);

Definition at line 1950 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::multiplies ( MatrixIterator1  A1_up,
MatrixIterator1  A1_bot,
MatrixIterator2  A2_up,
MatrixIterator2  A2_bot,
MatrixIterator3  Res_up,
MatrixIterator3  Res_bot 
)
inline

Computes the multiplication of two matrices $ Res = A_1 \times A_2 $.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/21
Since
1.0.0
Version
0.0.1
Parameters
A1_up2d iterator on the upper_left element of the A1 matrix
A1_bot2d iterator on the bottom_right element of the A1 matrix
A2_up2d iterator on the upper_left element of the A2 matrix
A2_bot2d iterator on the bottom_right element of the A2 matrix
Res_up2d iterator on the upper_left element of the Res matrix
Res_bot2d iterator on the bottom_right element of the Res matrix
Precondition
NbRows(Res) == NbRows(A1)
NbCols(Res) == NbCols(A2)
NbRows(A2) == NbCols(A1)
Deprecated:
You should use slip::matrix_matrix_multiplies instead

Definition at line 1987 of file linear_algebra.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::multiplies_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the pointwise product of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::multiplies_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 652 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::multiplies_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the pointwise product of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// Computes the pointwise product of two ranges of two Array2d according to a mask
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::multiplies_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::multiplies_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 585 of file arithmetic_op.hpp.

template<typename InputIterator1 , typename OutputIterator >
void slip::multiplies_scalar ( InputIterator1  __first1,
InputIterator1  __last1,
const typename std::iterator_traits< InputIterator1 >::value_type &  scalar,
OutputIterator  __result 
)
inline

Multiplies a range by a scalar.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An InputIterator.
__last1An InputIterator.
scalarA scalar value.
__resultAn OutputIterator.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
//multiplies M by 5
slip::iota(M.begin(),M.end(),1,1);
slip::multiplies_scalar(M.begin(),M.end(),5,M3.begin());

Definition at line 1597 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void slip::multiplies_scalar_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Multiplies a range by a scalar according to a Predicate.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
scalarA scalar value.
__resultAn output iterator.
__predA predicate.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
// multiplies v1 by 5 according to the Predicate lt5Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::multiplies_scalar_if(v1.begin(),v1.end(),
5,
v3.begin(),
lt5Predicate<int>);
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1721 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void slip::multiplies_scalar_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Multiplies a range by a scalar according to a mask sequence.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
scalarA scalar value.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
[__first1,__last1) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example1:
// multiplies v1 by 5
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::multiplies_scalar_mask(v1.begin(),v1.end(),
mask.begin(),
5,
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::multiplies_scalar_mask(v1.begin(),v1.end(),
maskint.begin(),
5,
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1663 of file arithmetic_op.hpp.

template<typename ForwardIterator >
void slip::n_max_elements ( ForwardIterator  first,
ForwardIterator  last,
std::vector< ForwardIterator > &  max,
const std::size_t  n = 1 
)

finds the n largest elements in the range [first, last).

Since
1.0.0
Parameters
firstInputIterator to the first element of the range.
lastInputIterator to one past-the-end element of the range.
maxstd::vector which contains the first iterators i in [first, last) such that the *i are the greatest one in [first, last). The elements are ordered by decreasing order.
nNumber of largest elements to find. Default value is 1.
Precondition
n <= slip::cardinal<std::size_t>(first,last)
n == max.size()
n > 0
Remarks
Call std::max_element(first,last) if n = 1.
Example:
int tab[] = {12,6,6,9,10,1,5,0,-1};
std::vector<int*> max(2);
slip::n_max_elements(tab,tab+9,max,2);
std::cout<<"---------------------"<<std::endl;
for(std::size_t i = 0; i < max.size();++i)
{
std::cout<<"max["<<i<<"] = "<<*(max[i])<<" ";
}
std::cout<<std::endl;
std::cout<<"---------------------"<<std::endl;

Definition at line 1268 of file statistics.hpp.

template<typename ForwardIterator >
void slip::n_min_elements ( ForwardIterator  first,
ForwardIterator  last,
std::vector< ForwardIterator > &  min,
const std::size_t  n = 1 
)

finds the n smallest elements in the range [first, last).

Since
1.0.0
Parameters
firstInputIterator to the first element of the range.
lastInputIterator to one past-the-end element of the range.
minstd::vector which contains the first iterators i in [first, last) such that the *i are the smallest one in [first, last). The elements are ordered by increasing order.
nNumber of smallest elements to find. Default value is 1.
Precondition
n <= slip::cardinal<std::size_t>(first,last)
n == min.size()
n > 0
Remarks
Call std::min_element(first,last) if n = 1.
Example:
int tab[] = {12,6,6,9,10,1,5,0,-1};
std::vector<int*> min(2);
slip::n_min_elements(tab,tab+9,min,2);
std::cout<<"---------------------"<<std::endl;
for(std::size_t i = 0; i < min.size();++i)
{
std::cout<<"min["<<i<<"] = "<<*(min[i])<<" ";
}
std::cout<<std::endl;
std::cout<<"---------------------"<<std::endl;

Definition at line 1326 of file statistics.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::ncc ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard normalized crosscorrelation between two sequences: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Postcondition
The result value must be in the range [-1.0,1.0]
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::normalized_crosscorrelation<float>(M.begin(),M.end(),M2.begin())<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::normalized_crosscorrelation<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 1378 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::ncc_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard normalized crosscorrelation between two sequences according to a Predicate: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i x_i^2 \sum_i y_i^2}} $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
\encode
\code
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean_if1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean_if2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::ncc_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean_if1,mean_if2)<<std::endl;

Definition at line 1473 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::ncc_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the standard normalized crosscorrelation between two sequences according to a mask sequence $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i x_i^2 \sum_i y_i^2}} $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
[first,last) must be valid.
The two sequences must of the same sizes.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::ncc_mask<float>(M1.begin(),M1.end(),M2.begin(),Mask.begin(),mean1,mean2,1)<<std::endl;

Definition at line 1426 of file correlation.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::negate ( InputIterator  __first1,
InputIterator  __last1,
OutputIterator  __result 
)
inline

Computes the negation of a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__resultAn OutputIterator.
Precondition
The input and result ranges must have the same value type.
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
Example:
//negation of a Array2
slip::iota(M.begin(),M.end(),1,1);
slip::plus(M.begin(),M.end(),M2.begin());

Definition at line 1930 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void slip::negate_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the pointwise negate of a ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The input and result range must have the same value type.
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range [__first1,__last1) or
Example:
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::negate_if(v1.begin(),v1.end(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 2043 of file arithmetic_op.hpp.

template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void slip::negate_mask ( InputIterator  __first1,
InputIterator  __last1,
MaskIterator  __mask_first,
OutputIterator  __result,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the negation of a range according to a mask range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/12/12
Since
1.0.0
Version
0.0.1
Parameters
__first1An InputIterator.
__last1An InputIterator.
__mask_firstAn InputIterator.
__resultAn OutputIterator.
valuetrue value of the mask range. Default is 1.
Precondition
The input and result ranges must have the same value type.
[__first1,__last1) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
Example1:
slip::iota(V1.begin(),V1.end(),10,2);
std::cout<<"V1 = "<<V1<<std::endl;
slip::Array<bool> mask(V1.size());
maskint[2] = 1;
maskint[4] = 1;
maskint[9] = 1;
slip::negate_mask(V1.begin(),V1.end(),
mask.begin(),
V3.begin());
std::cout<<"V3 = "<<V3<<std::endl;
Example2:
slip::iota(V1.begin(),V1.end(),10,2);
std::cout<<"V1 = "<<V1<<std::endl;
slip::Array<int> maskint(V1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::negate_mask(V1.begin(),V1.end(),
maskint.begin(),
V3.begin(),
int(2));
std::cout<<"V3 = "<<V3<<std::endl;

Definition at line 1992 of file arithmetic_op.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::normalized_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard normalized crosscorrelation between two sequences: $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Postcondition
The result value must be in the range [-1.0,1.0]
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::normalized_crosscorrelation<float>(M.begin(),M.end(),M2.begin())<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
float mean_motif = slip::mean<float>(Motif.begin(),Motif.end());
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
float meanI = slip::mean<float>(I.upper_left(box),I.bottom_right(box));
Result[i/8][j/8] = slip::normalized_crosscorrelation<float>(I.upper_left(box),I.bottom_right(box),Motif.begin(),meanI,mean_motif);
}
}

Definition at line 1179 of file correlation.hpp.

template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::normalized_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the normalized crosscorrelation between two Images.

Author
Denis Arrivault <denis.arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/30
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
Precondition
[in1_upper_left,in1_bottom_right) is valid
[in2_upper_left,in2_upper_left + (in1_bottom_right - in1_upper_left)) must be valid.
(out_bottom_right - out_upper_left) == (in1_bottom_right - in1_upper_left)
the value_type of the input sequences have to be real (not complex)

Definition at line 2207 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::normalized_crosscorrelation_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard normalized crosscorrelation between two sequences according to a Predicate: ** $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
\encode
\code
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean_if1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean_if2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::normalized_crosscorrelation_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean_if1,mean_if2)<<std::endl;

Definition at line 1305 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::normalized_crosscorrelation_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the standard normalized crosscorrelation between two sequences according to a mask sequence $ \frac{\sum_i (x_i-mean(x))(y_i-mean(y))}{\sqrt{\sum_i (x_i-mean(x))^2 \sum_i (y_i-mean(y))^2}} $.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::normalized_crosscorrelation_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),mean1,mean2,1)<<std::endl;

Definition at line 1238 of file correlation.hpp.

template<typename T , int N, typename InputIterator >
T slip::nth_moment ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the nth moment of a range

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of the nth moment.
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<double>(M.begin(),M.end());
std::cout<<slip::nth_moment(M.begin(),M.end(),mean)<<std::endl;

Definition at line 399 of file statistics.hpp.

template<typename T , int N, typename InputIterator , typename Predicate >
T slip::nth_moment_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the nth moment of a range using a predicate

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of the nth moment using the predicate.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::nth_moment_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 2707 of file statistics.hpp.

template<typename T , int N, typename InputIterator , typename MaskIterator >
T slip::nth_moment_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the nth moment of a range over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})^N\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of the nth moment over the mask.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::nth_moment_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1540 of file statistics.hpp.

template<int N, typename T >
T slip::nth_power ( x)
inline

Computes the nth power of an element $ x^n$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
xthe element to power
Returns
the nth power of x
Example:
std::cout<<" 2 power 8 = "<<slip::nth_power<8,double>(2.0)<<std::endl;

Definition at line 342 of file macros.hpp.

template<typename SubType >
bool slip::operator!= ( const Range< SubType > &  b1,
const Range< SubType > &  b2 
)
inline
Parameters
r1First range.
r2Second range.
Returns
true iff !(r1 == r2).

Definition at line 359 of file Range.hpp.

template<typename T >
bool slip::operator!= ( const Color< T > &  x,
const Color< T > &  y 
)
inline
Parameters
xfirst Color to compare
ysecond Color to compare return true if x != y
Precondition
x.dim() == y.dim()

Definition at line 718 of file Color.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator!= ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x != y
Precondition
x.dim() == y.dim()

Definition at line 497 of file Block4d.hpp.

template<typename T >
bool slip::operator!= ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true if !(x == y)

Definition at line 1448 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator!= ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true if !(x == y)

Definition at line 745 of file Block.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator!= ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x != y
Precondition
x.dim() == y.dim()

Definition at line 488 of file Block3d.hpp.

template<typename T >
bool slip::operator!= ( const Colormap< T > &  x,
const Colormap< T > &  y 
)
inline
Parameters
xA Colormap
yA Colormap of the same type of x
Returns
true if !(x == y)

Definition at line 1016 of file Colormap.hpp.

template<typename T , std::size_t N>
bool slip::operator!= ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true if !(x == y)

Definition at line 1630 of file KVector.hpp.

template<typename T >
bool slip::operator!= ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true if !(x == y)

Definition at line 5394 of file Matrix3d.hpp.

template<typename T >
bool slip::operator!= ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true if !(x == y)

Definition at line 1430 of file Polynomial.hpp.

template<std::size_t DIM>
bool slip::operator!= ( const Monomial< DIM > &  x,
const Monomial< DIM > &  y 
)
inline
Parameters
xA Monomial
yA Monomial of the same type of x
Returns
true if !(x == y)

Definition at line 283 of file MultivariatePolynomial.hpp.

template<typename T >
bool slip::operator!= ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true if !(x == y)

Definition at line 2198 of file Vector.hpp.

template<typename T >
bool slip::operator!= ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true if !(x == y)

Definition at line 2211 of file Signal.hpp.

template<typename T >
bool slip::operator!= ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true if !(x == y)

Definition at line 4768 of file Array4d.hpp.

template<typename T >
bool slip::operator!= ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true if !(x == y)

Definition at line 4739 of file HyperVolume.hpp.

template<typename T >
bool slip::operator!= ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true if !(x == y)

Definition at line 5713 of file Volume.hpp.

template<typename T >
bool slip::operator!= ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true if !(x == y)

Definition at line 5274 of file Array3d.hpp.

template<typename T >
bool slip::operator!= ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true if !(x == y)

Definition at line 4747 of file Matrix4d.hpp.

template<typename Block >
bool slip::operator!= ( const slip::GenericMultiComponent3d< Block > &  x,
const slip::GenericMultiComponent3d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent3d
yA GenericMultiComponent3d of the same type of x
Returns
true if !(x == y)
Precondition
x.size() == y.size()

Definition at line 7697 of file GenericMultiComponent3d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator!= ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true if !(x == y)

Definition at line 2384 of file Block2d.hpp.

template<typename Block >
bool slip::operator!= ( const GenericMultiComponent4d< Block > &  x,
const GenericMultiComponent4d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent4d
yA GenericMultiComponent4d of the same type of x
Returns
true if !(x == y)
Precondition
x.size() == y.size()

Definition at line 7357 of file GenericMultiComponent4d.hpp.

template<typename Block >
bool slip::operator!= ( const slip::GenericMultiComponent2d< Block > &  x,
const slip::GenericMultiComponent2d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent2d
yA GenericMultiComponent2d of the same type of x
Returns
true if !(x == y)
Precondition
x.size() == y.size()

Definition at line 4936 of file GenericMultiComponent2d.hpp.

template<typename T >
bool slip::operator!= ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true if !(x == y)

Definition at line 3247 of file Array2d.hpp.

template<typename T >
bool slip::operator!= ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true if !(x == y)
Precondition
x.size() == y.size()

Definition at line 3722 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator!= ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true if !(x == y)

Definition at line 4077 of file Matrix.hpp.

template<typename Container >
bool slip::operator!= ( const Pyramid< Container > &  x,
const Pyramid< Container > &  y 
)

Definition at line 906 of file Pyramid.hpp.

template<std::size_t DIM>
Monomial< DIM > slip::operator* ( const Monomial< DIM > &  monomial1,
const Monomial< DIM > &  monomial2 
)
inline

Monomial multiplication.

Parameters
monomial1A Monomial
monomial2A Monomial of the same type of monomial1
Returns
a Monomial

Definition at line 316 of file MultivariatePolynomial.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator* ( const ColorHyperVolume< T > &  M1,
const ColorHyperVolume< T > &  M2 
)
inline

pointwise multiplication of two ColorHyperVolume

Parameters
M1first ColorHyperVolume
M2second ColorHyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting ColorHyperVolume

Definition at line 777 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator* ( const ColorHyperVolume< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe scalar
Returns
resulting ColorHyperVolume

Definition at line 790 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator* ( const T &  val,
const ColorHyperVolume< T > &  M1 
)
inline

multiplication of a scalar to each element of a ColorHyperVolume

Parameters
valthe scalar
M1the ColorHyperVolume
Returns
resulting ColorHyperVolume

Definition at line 799 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator* ( const ColorHyperVolume< T > &  M1,
const slip::Color< T > &  val 
)
inline

multiplication of a Color block to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe Color block
Returns
resulting ColorHyperVolume

Definition at line 806 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator* ( const slip::Color< T > &  val,
const ColorHyperVolume< T > &  M1 
)
inline

multiplication of a Color block to each element of a ColorHyperVolume

Parameters
valthe Color block
M1the ColorHyperVolume
Returns
resulting ColorHyperVolume

Definition at line 815 of file ColorHyperVolume.hpp.

template<typename T >
ColorImage< T > slip::operator* ( const ColorImage< T > &  M1,
const ColorImage< T > &  M2 
)
inline

pointwise multiplication of two ColorImage

Parameters
M1first ColorImage
M2seconf ColorImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting ColorImage

Definition at line 991 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator* ( const ColorImage< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a ColorImage

Parameters
M1the ColorImage
valthe scalar
Returns
resulting ColorImage

Definition at line 1021 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator* ( const T &  val,
const ColorImage< T > &  M1 
)
inline

multiplication of a scalar to each element of a ColorImage

Parameters
valthe scalar
M1the ColorImage
Returns
resulting ColorImage

Definition at line 1031 of file ColorImage.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator* ( const DenseVector3dField2d< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe scalar
Returns
resulting DenseVector3dField2d

Definition at line 1095 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator* ( const Vector2d< T > &  V1,
const Vector2d< T > &  V2 
)
inline

Definition at line 636 of file Vector2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator* ( const T &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

multiplication of a scalar to each element of a DenseVector3dField2d

Parameters
valthe scalar
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1105 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator* ( const Vector2d< T > &  V1,
const T &  val 
)
inline

Definition at line 647 of file Vector2d.hpp.

template<typename T >
Vector2d<T> slip::operator* ( const T &  val,
const Vector2d< T > &  V1 
)
inline

Definition at line 657 of file Vector2d.hpp.

template<typename T >
Color<T> slip::operator* ( const Color< T > &  V1,
const Color< T > &  V2 
)
inline

Definition at line 658 of file Color.hpp.

template<typename T >
Color<T> slip::operator* ( const Color< T > &  V1,
const T &  val 
)
inline

Definition at line 668 of file Color.hpp.

template<typename T >
Color<T> slip::operator* ( const T &  val,
const Color< T > &  V1 
)
inline

Definition at line 678 of file Color.hpp.

template<typename T >
Vector3d<T> slip::operator* ( const Vector3d< T > &  V1,
const Vector3d< T > &  V2 
)
inline

Definition at line 690 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator* ( const Vector3d< T > &  V1,
const T &  val 
)
inline

Definition at line 703 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator* ( const T &  val,
const Vector3d< T > &  V1 
)
inline

Definition at line 713 of file Vector3d.hpp.

template<typename T >
Vector4d<T> slip::operator* ( const Vector4d< T > &  V1,
const Vector4d< T > &  V2 
)
inline

Definition at line 723 of file Vector4d.hpp.

template<typename T >
Vector4d<T> slip::operator* ( const Vector4d< T > &  V1,
const T &  val 
)
inline

Definition at line 736 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator* ( const DenseVector3dField2d< T > &  M1,
const DenseVector3dField2d< T > &  M2 
)
inline

pointwise multiplication of two DenseVector3dField2d

Parameters
M1first DenseVector3dField2d
M2seconf DenseVector3dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField2d

Definition at line 1189 of file DenseVector3dField2d.hpp.

template<typename T >
Vector4d<T> slip::operator* ( const T &  val,
const Vector4d< T > &  V1 
)
inline

Definition at line 746 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator* ( const DenseVector3dField2d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

multiplication of a Vector3d to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe Vector3d
Returns
resulting DenseVector3dField2d

Definition at line 1202 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator* ( const slip::Vector3d< T > &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

multiplication of a Vector3d to each element of a DenseVector3dField2d

Parameters
valthe Vector3d
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1212 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator* ( const DenseVector2dField2d< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe scalar
Returns
resulting DenseVector2dField2d

Definition at line 1265 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator* ( const T &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

multiplication of a scalar to each element of a DenseVector2dField2d

Parameters
valthe scalar
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1275 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator* ( const DenseVector3dField3d< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe scalar
Returns
resulting DenseVector3dField3d

Definition at line 1352 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator* ( const T &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

multiplication of a scalar to each element of a DenseVector3dField3d

Parameters
valthe scalar
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1362 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator* ( const DenseVector2dField2d< T > &  M1,
const DenseVector2dField2d< T > &  M2 
)
inline

pointwise multiplication of two DenseVector2dField2d

Parameters
M1first DenseVector2dField2d
M2seconf DenseVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector2dField2d

Definition at line 1359 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator* ( const DenseVector2dField2d< T > &  M1,
const slip::Vector2d< T > &  val 
)
inline

multiplication of a Vector2d to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe Vector2d
Returns
resulting DenseVector2dField2d

Definition at line 1372 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator* ( const slip::Vector2d< T > &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

multiplication of a Vector2d to each element of a DenseVector2dField2d

Parameters
valthe Vector2d
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1382 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator* ( const DenseVector3dField3d< T > &  M1,
const DenseVector3dField3d< T > &  M2 
)
inline

pointwise multiplication of two DenseVector3dField3d

Parameters
M1first DenseVector3dField3d
M2seconf DenseVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField3d

Definition at line 1448 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator* ( const DenseVector3dField3d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

multiplication of a Vector3d to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe Vector3d
Returns
resulting DenseVector3dField3d

Definition at line 1462 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator* ( const slip::Vector3d< T > &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

multiplication of a Vector3d to each element of a DenseVector3dField3d

Parameters
valthe Vector3d
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1472 of file DenseVector3dField3d.hpp.

template<typename T >
ColorImage<T> slip::operator* ( const ColorImage< T > &  M1,
const slip::Color< T > &  val 
)
inline

Definition at line 1003 of file ColorImage.hpp.

template<typename T >
ColorImage<T> slip::operator* ( const slip::Color< T > &  val,
const ColorImage< T > &  M1 
)
inline

Definition at line 1013 of file ColorImage.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator* ( const kvector< T, N > &  V1,
const kvector< T, N > &  V2 
)
inline

pointwise multiplication of two kvector

Parameters
V1The first kvector
V2The second kvector
Precondition
V1.size() == V2.size()
Returns
resulting kvector

Definition at line 1364 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator* ( const kvector< T, N > &  V,
const T &  val 
)
inline

multiplication of a scalar to each element of a kvector

Parameters
VThe kvector
valThe scalar
Returns
resulting kvector

Definition at line 1374 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator* ( const T &  val,
const kvector< T, N > &  V 
)
inline

multiplication of a scalar to each element of a kvector

Parameters
valThe scalar
VThe kvector
Returns
resulting kvector

Definition at line 1384 of file KVector.hpp.

template<typename T >
Vector< T > slip::operator* ( const Vector< T > &  V1,
const Vector< T > &  V2 
)
inline

pointwise multiplication of two Vector

Parameters
V1The first Vector
V2The second Vector
Precondition
V1.size() == V2.size()
Returns
resulting Vector

Definition at line 1947 of file Vector.hpp.

template<typename T >
Vector< T > slip::operator* ( const Vector< T > &  V,
const T &  val 
)
inline

multiplication of a scalar to each element of a Vector

Parameters
VThe Vector
valThe scalar
Returns
resulting Vector

Definition at line 1958 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator* ( const Signal< T > &  V1,
const Signal< T > &  V2 
)
inline

pointwise multiplication of two Signal

Parameters
V1The first Signal
V2The second Signal
Precondition
V1.size() == V2.size()
Returns
resulting Signal

Definition at line 1960 of file Signal.hpp.

template<typename T >
Vector< T > slip::operator* ( const T &  val,
const Vector< T > &  V 
)
inline

multiplication of a scalar to each element of a Vector

Parameters
valThe scalar
VThe Vector
Returns
resulting Vector

Definition at line 1968 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator* ( const Signal< T > &  V,
const T &  val 
)
inline

multiplication of a scalar to each element of a Signal

Parameters
VThe Signal
valThe scalar
Returns
resulting Signal

Definition at line 1971 of file Signal.hpp.

template<typename T >
Signal< T > slip::operator* ( const T &  val,
const Signal< T > &  V 
)
inline

multiplication of a scalar to each element of a Signal

Parameters
valThe scalar
VThe Signal
Returns
resulting Signal

Definition at line 1981 of file Signal.hpp.

template<typename T >
Polynomial<T> slip::operator* ( const Polynomial< T > &  V1,
const Polynomial< T > &  V2 
)
related

Definition at line 1368 of file Polynomial.hpp.

template<typename T >
Polynomial<T> slip::operator* ( const Polynomial< T > &  V1,
const T &  val 
)
related

Definition at line 1390 of file Polynomial.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator* ( const RegularVector2dField2d< T, GridT > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe scalar
Returns
resulting RegularVector2dField2d

Definition at line 1983 of file RegularVector2dField2d.hpp.

template<typename T >
Polynomial<T> slip::operator* ( const T &  val,
const Polynomial< T > &  V1 
)
related

Definition at line 1400 of file Polynomial.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator* ( const T &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

multiplication of a scalar to each element of a RegularVector2dField2d

Parameters
valthe scalar
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 1993 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator* ( const RegularVector2dField2d< T, GridT > &  M1,
const RegularVector2dField2d< T, GridT > &  M2 
)
inline

pointwise multiplication of two RegularVector2dField2d

Parameters
M1first RegularVector2dField2d
M2seconf RegularVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector2dField2d

Definition at line 2074 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator* ( const RegularVector2dField2d< T, GridT > &  M1,
const slip::Vector2d< T > &  val 
)
inline

multiplication of a Vector2d to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe Vector2d
Returns
resulting RegularVector2dField2d

Definition at line 2087 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator* ( const slip::Vector2d< T > &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

multiplication of a Vector2d to each element of a RegularVector2dField2d

Parameters
valthe Vector2d
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 2097 of file RegularVector2dField2d.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator* ( const MultivariatePolynomial< T, DIM > &  P1,
const MultivariatePolynomial< T, DIM > &  P2 
)
related

Definition at line 1778 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator* ( const MultivariatePolynomial< T, DIM > &  P1,
const T &  val 
)
related

Definition at line 1788 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator* ( const T &  val,
const MultivariatePolynomial< T, DIM > &  P1 
)
related

Definition at line 1798 of file MultivariatePolynomial.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator* ( const RegularVector3dField3d< T, GridT > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe scalar
Returns
resulting RegularVector3dField3d

Definition at line 2615 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator* ( const T &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

multiplication of a scalar to each element of a RegularVector3dField3d

Parameters
valthe scalar
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2625 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator* ( const RegularVector3dField3d< T, GridT > &  M1,
const RegularVector3dField3d< T, GridT > &  M2 
)
inline

pointwise multiplication of two RegularVector3dField3d

Parameters
M1first RegularVector3dField3d
M2seconf RegularVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector3dField3d

Definition at line 2707 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator* ( const RegularVector3dField3d< T, GridT > &  M1,
const slip::Vector3d< T > &  val 
)
inline

multiplication of a Vector3d to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe Vector3d
Returns
resulting RegularVector3dField3d

Definition at line 2719 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator* ( const slip::Vector3d< T > &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

multiplication of a Vector3d to each element of a RegularVector3dField3d

Parameters
valthe Vector3d
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2729 of file RegularVector3dField3d.hpp.

template<typename T >
GrayscaleImage< T > slip::operator* ( const GrayscaleImage< T > &  M1,
const GrayscaleImage< T > &  M2 
)
inline

pointwise multiplication of two GrayscaleImage

Parameters
M1first GrayscaleImage
M2seconf GrayscaleImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting GrayscaleImage

Definition at line 3632 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator* ( const GrayscaleImage< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a GrayscaleImage

Parameters
M1the GrayscaleImage
valthe scalar
Returns
resulting GrayscaleImage

Definition at line 3644 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator* ( const T &  val,
const GrayscaleImage< T > &  M1 
)
inline

multiplication of a scalar to each element of a GrayscaleImage

Parameters
valthe scalar
M1the GrayscaleImage
Returns
resulting GrayscaleImage

Definition at line 3654 of file GrayscaleImage.hpp.

template<typename T >
Matrix< T > slip::operator* ( const Matrix< T > &  M1,
const Matrix< T > &  M2 
)
inline

pointwise multiplication of two Matrix

Parameters
M1first Matrix
M2seconf Matrix
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix

Definition at line 3815 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator* ( const Matrix< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a Matrix

Parameters
M1the Matrix
valthe scalar
Returns
resulting Matrix

Definition at line 3827 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator* ( const T &  val,
const Matrix< T > &  M1 
)
inline

multiplication of a scalar to each element of a Matrix

Parameters
valthe scalar
M1the Matrix
Returns
resulting Matrix

Definition at line 3838 of file Matrix.hpp.

template<typename T >
HyperVolume< T > slip::operator* ( const HyperVolume< T > &  M1,
const HyperVolume< T > &  M2 
)
inline

pointwise multiplication of two HyperVolume

Parameters
M1first HyperVolume
M2seconf HyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting HyperVolume

Definition at line 4991 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator* ( const Matrix4d< T > &  M1,
const Matrix4d< T > &  M2 
)
inline

pointwise multiplication of two Matrix4d

Parameters
M1first Matrix4d
M2seconf Matrix4d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting Matrix4d

Definition at line 4999 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator* ( const HyperVolume< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a HyperVolume

Parameters
M1the HyperVolume
valthe scalar
Returns
resulting HyperVolume

Definition at line 5006 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator* ( const Matrix4d< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a Matrix4d

Parameters
M1the Matrix4d
valthe scalar
Returns
resulting Matrix4d

Definition at line 5014 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator* ( const T &  val,
const HyperVolume< T > &  M1 
)
inline

multiplication of a scalar to each element of a HyperVolume

Parameters
valthe scalar
M1the HyperVolume
Returns
resulting HyperVolume

Definition at line 5016 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator* ( const T &  val,
const Matrix4d< T > &  M1 
)
inline

multiplication of a scalar to each element of a Matrix4d

Parameters
valthe scalar
M1the Matrix4d
Returns
resulting Matrix4d

Definition at line 5024 of file Matrix4d.hpp.

template<typename T >
Matrix3d< T > slip::operator* ( const Matrix3d< T > &  M1,
const Matrix3d< T > &  M2 
)
inline

pointwise multiplication of two Matrix3d

Parameters
M1first Matrix3d
M2seconf Matrix3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix3d

Definition at line 5642 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator* ( const Matrix3d< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a Matrix3d

Parameters
M1the Matrix3d
valthe scalar
Returns
resulting Matrix3d

Definition at line 5656 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator* ( const T &  val,
const Matrix3d< T > &  M1 
)
inline

multiplication of a scalar to each element of a Matrix3d

Parameters
valthe scalar
M1the Matrix3d
Returns
resulting Matrix3d

Definition at line 5666 of file Matrix3d.hpp.

template<typename T >
Volume< T > slip::operator* ( const Volume< T > &  M1,
const Volume< T > &  M2 
)
inline

pointwise multiplication of two Volume

Parameters
M1first Volume
M2seconf Volume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Volume

Definition at line 5960 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator* ( const Volume< T > &  M1,
const T &  val 
)
inline

multiplication of a scalar to each element of a Volume

Parameters
M1the Volume
valthe scalar
Returns
resulting Volume

Definition at line 5974 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator* ( const T &  val,
const Volume< T > &  M1 
)
inline

multiplication of a scalar to each element of a Volume

Parameters
valthe scalar
M1the Volume
Returns
resulting Volume

Definition at line 5984 of file Volume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator+ ( const ColorHyperVolume< T > &  M1,
const ColorHyperVolume< T > &  M2 
)
inline

pointwise addition of two ColorHyperVolume

Parameters
M1first ColorHyperVolume
M2second ColorHyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting ColorHyperVolume

Definition at line 694 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator+ ( const ColorHyperVolume< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe scalar
Returns
resulting ColorHyperVolume

Definition at line 707 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator+ ( const T &  val,
const ColorHyperVolume< T > &  M1 
)
inline

addition of a scalar to each element of a ColorHyperVolume

Parameters
valthe scalar
M1the ColorHyperVolume
Returns
resulting ColorHyperVolume

Definition at line 716 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator+ ( const ColorHyperVolume< T > &  M1,
const slip::Color< T > &  val 
)
inline

addition of a Color block to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe Color block
Returns
resulting ColorHyperVolume

Definition at line 723 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator+ ( const slip::Color< T > &  val,
const ColorHyperVolume< T > &  M1 
)
inline

addition of a Color block to each element of a ColorHyperVolume

Parameters
valthe Color block
M1the ColorHyperVolume
Returns
resulting ColorHyperVolume

Definition at line 732 of file ColorHyperVolume.hpp.

template<typename T >
ColorImage< T > slip::operator+ ( const ColorImage< T > &  M1,
const ColorImage< T > &  M2 
)
inline

pointwise addition of two ColorImage

Parameters
M1first ColorImage
M2seconf ColorImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting ColorImage

Definition at line 894 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator+ ( const ColorImage< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a ColorImage

Parameters
M1the ColorImage
valthe scalar
Returns
resulting ColorImage

Definition at line 924 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator+ ( const T &  val,
const ColorImage< T > &  M1 
)
inline

addition of a scalar to each element of a ColorImage

Parameters
valthe scalar
M1the ColorImage
Returns
resulting ColorImage

Definition at line 934 of file ColorImage.hpp.

template<typename T >
Vector2d<T> slip::operator+ ( const Vector2d< T > &  V1,
const Vector2d< T > &  V2 
)
inline

Definition at line 574 of file Vector2d.hpp.

template<typename T >
Vector2d<T> slip::operator+ ( const Vector2d< T > &  V1,
const T &  val 
)
inline

Definition at line 585 of file Vector2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator+ ( const DenseVector3dField2d< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe scalar
Returns
resulting DenseVector3dField2d

Definition at line 1058 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator+ ( const T &  val,
const Vector2d< T > &  V1 
)
inline

Definition at line 595 of file Vector2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator+ ( const T &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

addition of a scalar to each element of a DenseVector3dField2d

Parameters
valthe scalar
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1068 of file DenseVector3dField2d.hpp.

template<typename T >
Color<T> slip::operator+ ( const Color< T > &  V1,
const Color< T > &  V2 
)
inline

Definition at line 602 of file Color.hpp.

template<typename T >
Color<T> slip::operator+ ( const Color< T > &  V1,
const T &  val 
)
inline

Definition at line 612 of file Color.hpp.

template<typename T >
Color<T> slip::operator+ ( const T &  val,
const Color< T > &  V1 
)
inline

Definition at line 622 of file Color.hpp.

template<typename T >
Vector3d<T> slip::operator+ ( const Vector3d< T > &  V1,
const Vector3d< T > &  V2 
)
inline

Definition at line 625 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator+ ( const Vector3d< T > &  V1,
const T &  val 
)
inline

Definition at line 637 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator+ ( const T &  val,
const Vector3d< T > &  V1 
)
inline

Definition at line 647 of file Vector3d.hpp.

template<typename T >
Vector4d<T> slip::operator+ ( const Vector4d< T > &  V1,
const Vector4d< T > &  V2 
)
inline

Definition at line 655 of file Vector4d.hpp.

template<typename T >
Vector4d<T> slip::operator+ ( const Vector4d< T > &  V1,
const T &  val 
)
inline

Definition at line 668 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator+ ( const DenseVector3dField2d< T > &  M1,
const DenseVector3dField2d< T > &  M2 
)
inline

pointwise addition of two DenseVector3dField2d

Parameters
M1first DenseVector3dField2d
M2seconf DenseVector3dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField2d

Definition at line 1124 of file DenseVector3dField2d.hpp.

template<typename T >
Vector4d<T> slip::operator+ ( const T &  val,
const Vector4d< T > &  V1 
)
inline

Definition at line 678 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator+ ( const DenseVector3dField2d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

addition of a Vector3d to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe Vector3d
Returns
resulting DenseVector3dField2d

Definition at line 1137 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator+ ( const slip::Vector3d< T > &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

addition of a Vector3d to each element of a DenseVector3dField2d

Parameters
valthe Vector3d
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1147 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator+ ( const DenseVector2dField2d< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe scalar
Returns
resulting DenseVector2dField2d

Definition at line 1228 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator+ ( const T &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

addition of a scalar to each element of a DenseVector2dField2d

Parameters
valthe scalar
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1238 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator+ ( const DenseVector3dField3d< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe scalar
Returns
resulting DenseVector3dField3d

Definition at line 1315 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator+ ( const T &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

addition of a scalar to each element of a DenseVector3dField3d

Parameters
valthe scalar
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1325 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator+ ( const DenseVector2dField2d< T > &  M1,
const DenseVector2dField2d< T > &  M2 
)
inline

pointwise addition of two DenseVector2dField2d

Parameters
M1first DenseVector2dField2d
M2seconf DenseVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector2dField2d

Definition at line 1294 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator+ ( const DenseVector2dField2d< T > &  M1,
const slip::Vector2d< T > &  val 
)
inline

addition of a Vector2d to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe Vector2d
Returns
resulting DenseVector2dField2d

Definition at line 1307 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator+ ( const slip::Vector2d< T > &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

addition of a Vector2d to each element of a DenseVector2dField2d

Parameters
valthe Vector2d
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1317 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator+ ( const DenseVector3dField3d< T > &  M1,
const DenseVector3dField3d< T > &  M2 
)
inline

pointwise addition of two DenseVector3dField3d

Parameters
M1first DenseVector3dField3d
M2seconf DenseVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField3d

Definition at line 1381 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator+ ( const DenseVector3dField3d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

addition of a Vector3d to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe Vector3d
Returns
resulting DenseVector3dField3d

Definition at line 1395 of file DenseVector3dField3d.hpp.

template<typename T >
ColorImage<T> slip::operator+ ( const ColorImage< T > &  M1,
const slip::Color< T > &  val 
)
inline

Definition at line 906 of file ColorImage.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator+ ( const slip::Vector3d< T > &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

addition of a Vector3d to each element of a DenseVector3dField3d

Parameters
valthe Vector3d
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1405 of file DenseVector3dField3d.hpp.

template<typename T >
ColorImage<T> slip::operator+ ( const slip::Color< T > &  val,
const ColorImage< T > &  M1 
)
inline

Definition at line 916 of file ColorImage.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator+ ( const kvector< T, N > &  V1,
const kvector< T, N > &  V2 
)
inline

pointwise addition of two kvector

Parameters
V1The first kvector
V2The second kvector
Precondition
V1.size() == V2.size()
Returns
resulting kvector

Definition at line 1308 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator+ ( const kvector< T, N > &  V,
const T &  val 
)
inline

addition of a scalar to each element of a kvector

Parameters
VThe kvector
valThe scalar
Returns
resulting kvector

Definition at line 1318 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator+ ( const T &  val,
const kvector< T, N > &  V 
)
inline

addition of a scalar to each element of a kvector

Parameters
valThe scalar
VThe kvector
Returns
resulting kvector

Definition at line 1328 of file KVector.hpp.

template<typename T >
Vector< T > slip::operator+ ( const Vector< T > &  V1,
const Vector< T > &  V2 
)
inline

pointwise addition of two Vector

Parameters
V1The first Vector
V2The second Vector
Precondition
V1.size() == V2.size()
Returns
resulting Vector

Definition at line 1888 of file Vector.hpp.

template<typename T >
Vector< T > slip::operator+ ( const Vector< T > &  V,
const T &  val 
)
inline

addition of a scalar to each element of a Vector

Parameters
VThe Vector
valThe scalar
Returns
resulting Vector

Definition at line 1900 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator+ ( const Signal< T > &  V1,
const Signal< T > &  V2 
)
inline

pointwise addition of two Signal

Parameters
V1The first Signal
V2The second Signal
Precondition
V1.size() == V2.size()
Returns
resulting Signal

Definition at line 1901 of file Signal.hpp.

template<typename T >
Vector< T > slip::operator+ ( const T &  val,
const Vector< T > &  V 
)
inline

addition of a scalar to each element of a Vector

Parameters
valThe scalar
VThe Vector
Returns
resulting Vector

Definition at line 1910 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator+ ( const Signal< T > &  V,
const T &  val 
)
inline

addition of a scalar to each element of a Signal

Parameters
VThe Signal
valThe scalar
Returns
resulting Signal

Definition at line 1913 of file Signal.hpp.

template<typename T >
Signal< T > slip::operator+ ( const T &  val,
const Signal< T > &  V 
)
inline

addition of a scalar to each element of a Signal

Parameters
valThe scalar
VThe Signal
Returns
resulting Signal

Definition at line 1923 of file Signal.hpp.

template<typename T >
Polynomial<T> slip::operator+ ( const Polynomial< T > &  V1,
const Polynomial< T > &  V2 
)
related

Definition at line 1312 of file Polynomial.hpp.

template<typename T >
Polynomial<T> slip::operator+ ( const Polynomial< T > &  V1,
const T &  val 
)
related

Definition at line 1322 of file Polynomial.hpp.

template<typename T >
Polynomial<T> slip::operator+ ( const T &  val,
const Polynomial< T > &  V1 
)
related

Definition at line 1332 of file Polynomial.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator+ ( const RegularVector2dField2d< T, GridT > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe scalar
Returns
resulting RegularVector2dField2d

Definition at line 1946 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator+ ( const T &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

addition of a scalar to each element of a RegularVector2dField2d

Parameters
valthe scalar
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 1956 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator+ ( const RegularVector2dField2d< T, GridT > &  M1,
const RegularVector2dField2d< T, GridT > &  M2 
)
inline

pointwise addition of two RegularVector2dField2d

Parameters
M1first RegularVector2dField2d
M2seconf RegularVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector2dField2d

Definition at line 2012 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator+ ( const RegularVector2dField2d< T, GridT > &  M1,
const slip::Vector2d< T > &  val 
)
inline

addition of a Vector2d to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe Vector2d
Returns
resulting RegularVector2dField2d

Definition at line 2024 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator+ ( const slip::Vector2d< T > &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

addition of a Vector2d to each element of a RegularVector2dField2d

Parameters
valthe Vector2d
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 2034 of file RegularVector2dField2d.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator+ ( const MultivariatePolynomial< T, DIM > &  P1,
const MultivariatePolynomial< T, DIM > &  P2 
)
related

Definition at line 1720 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator+ ( const MultivariatePolynomial< T, DIM > &  P1,
const T &  val 
)
related

Definition at line 1730 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator+ ( const T &  val,
const MultivariatePolynomial< T, DIM > &  P1 
)
related

Definition at line 1740 of file MultivariatePolynomial.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator+ ( const RegularVector3dField3d< T, GridT > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe scalar
Returns
resulting RegularVector3dField3d

Definition at line 2578 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator+ ( const T &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

addition of a scalar to each element of a RegularVector3dField3d

Parameters
valthe scalar
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2588 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator+ ( const RegularVector3dField3d< T, GridT > &  M1,
const RegularVector3dField3d< T, GridT > &  M2 
)
inline

pointwise addition of two RegularVector3dField3d

Parameters
M1first RegularVector3dField3d
M2seconf RegularVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector3dField3d

Definition at line 2644 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator+ ( const RegularVector3dField3d< T, GridT > &  M1,
const slip::Vector3d< T > &  val 
)
inline

addition of a Vector3d to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe Vector3d
Returns
resulting RegularVector3dField3d

Definition at line 2656 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator+ ( const slip::Vector3d< T > &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

addition of a Vector3d to each element of a RegularVector3dField3d

Parameters
valthe Vector3d
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2666 of file RegularVector3dField3d.hpp.

template<typename T >
GrayscaleImage< T > slip::operator+ ( const GrayscaleImage< T > &  M1,
const GrayscaleImage< T > &  M2 
)
inline

pointwise addition of two GrayscaleImage

Parameters
M1first GrayscaleImage
M2seconf GrayscaleImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting GrayscaleImage

Definition at line 3571 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator+ ( const GrayscaleImage< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a GrayscaleImage

Parameters
M1the GrayscaleImage
valthe scalar
Returns
resulting GrayscaleImage

Definition at line 3583 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator+ ( const T &  val,
const GrayscaleImage< T > &  M1 
)
inline

addition of a scalar to each element of a GrayscaleImage

Parameters
valthe scalar
M1the GrayscaleImage
Returns
resulting GrayscaleImage

Definition at line 3593 of file GrayscaleImage.hpp.

template<typename T >
Matrix< T > slip::operator+ ( const Matrix< T > &  M1,
const Matrix< T > &  M2 
)
inline

pointwise addition of two Matrix

Parameters
M1first Matrix
M2seconf Matrix
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix

Definition at line 3754 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator+ ( const Matrix< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a Matrix

Parameters
M1the Matrix
valthe scalar
Returns
resulting Matrix

Definition at line 3766 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator+ ( const T &  val,
const Matrix< T > &  M1 
)
inline

addition of a scalar to each element of a Matrix

Parameters
valthe scalar
M1the Matrix
Returns
resulting Matrix

Definition at line 3776 of file Matrix.hpp.

template<typename T >
HyperVolume< T > slip::operator+ ( const HyperVolume< T > &  M1,
const HyperVolume< T > &  M2 
)
inline

pointwise addition of two HyperVolume

Parameters
M1first HyperVolume
M2seconf HyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting HyperVolume

Definition at line 4924 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator+ ( const Matrix4d< T > &  M1,
const Matrix4d< T > &  M2 
)
inline

pointwise addition of two Matrix4d

Parameters
M1first Matrix4d
M2seconf Matrix4d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting Matrix4d

Definition at line 4932 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator+ ( const HyperVolume< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a HyperVolume

Parameters
M1the HyperVolume
valthe scalar
Returns
resulting HyperVolume

Definition at line 4939 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator+ ( const Matrix4d< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a Matrix4d

Parameters
M1the Matrix4d
valthe scalar
Returns
resulting Matrix4d

Definition at line 4947 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator+ ( const T &  val,
const HyperVolume< T > &  M1 
)
inline

addition of a scalar to each element of a HyperVolume

Parameters
valthe scalar
M1the HyperVolume
Returns
resulting HyperVolume

Definition at line 4949 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator+ ( const T &  val,
const Matrix4d< T > &  M1 
)
inline

addition of a scalar to each element of a Matrix4d

Parameters
valthe scalar
M1the Matrix4d
Returns
resulting Matrix4d

Definition at line 4957 of file Matrix4d.hpp.

template<typename T >
Matrix3d< T > slip::operator+ ( const Matrix3d< T > &  M1,
const Matrix3d< T > &  M2 
)
inline

pointwise addition of two Matrix3d

Parameters
M1first Matrix3d
M2seconf Matrix3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix3d

Definition at line 5577 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator+ ( const Matrix3d< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a Matrix3d

Parameters
M1the Matrix3d
valthe scalar
Returns
resulting Matrix3d

Definition at line 5591 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator+ ( const T &  val,
const Matrix3d< T > &  M1 
)
inline

addition of a scalar to each element of a Matrix3d

Parameters
valthe scalar
M1the Matrix3d
Returns
resulting Matrix3d

Definition at line 5601 of file Matrix3d.hpp.

template<typename T >
Volume< T > slip::operator+ ( const Volume< T > &  M1,
const Volume< T > &  M2 
)
inline

pointwise addition of two Volume

Parameters
M1first Volume
M2seconf Volume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Volume

Definition at line 5895 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator+ ( const Volume< T > &  M1,
const T &  val 
)
inline

addition of a scalar to each element of a Volume

Parameters
M1the Volume
valthe scalar
Returns
resulting Volume

Definition at line 5909 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator+ ( const T &  val,
const Volume< T > &  M1 
)
inline

addition of a scalar to each element of a Volume

Parameters
valthe scalar
M1the Volume
Returns
resulting Volume

Definition at line 5919 of file Volume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator- ( const ColorHyperVolume< T > &  M1,
const ColorHyperVolume< T > &  M2 
)
inline

pointwise subtraction of two ColorHyperVolume

Parameters
M1first ColorHyperVolume
M2second ColorHyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting ColorHyperVolume

Definition at line 739 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator- ( const ColorHyperVolume< T > &  M1,
const T &  val 
)
inline

subtraction of a scalar to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe scalar
Returns
resulting ColorHyperVolume

Definition at line 752 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator- ( const T &  val,
const ColorHyperVolume< T > &  M1 
)
inline

subtraction of a scalar to each element of a ColorHyperVolume

Parameters
valthe scalar
M1the ColorHyperVolume
Returns
resulting ColorHyperVolume

Definition at line 761 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator- ( const ColorHyperVolume< T > &  M1,
const slip::Color< T > &  val 
)
inline

subtraction of a Color block to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe Color block
Returns
resulting ColorHyperVolume

Definition at line 768 of file ColorHyperVolume.hpp.

template<typename T >
ColorImage< T > slip::operator- ( const ColorImage< T > &  M1,
const ColorImage< T > &  M2 
)
inline

pointwise substraction of two ColorImage

Parameters
M1first ColorImage
M2seconf ColorImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting ColorImage

Definition at line 942 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator- ( const ColorImage< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a ColorImage

Parameters
M1the ColorImage
valthe scalar
Returns
resulting ColorImage

Definition at line 972 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator- ( const T &  val,
const ColorImage< T > &  M1 
)
inline

substraction of a scalar to each element of a ColorImage

Parameters
valthe scalar
M1the ColorImage
Returns
resulting ColorImage

Definition at line 982 of file ColorImage.hpp.

template<typename T >
Vector2d<T> slip::operator- ( const Vector2d< T > &  V1,
const Vector2d< T > &  V2 
)
inline

Definition at line 603 of file Vector2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator- ( const DenseVector3dField2d< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe scalar
Returns
resulting DenseVector3dField2d

Definition at line 1076 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator- ( const Vector2d< T > &  V1,
const T &  val 
)
inline

Definition at line 614 of file Vector2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator- ( const T &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

substraction of a scalar to each element of a DenseVector3dField2d

Parameters
valthe scalar
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1086 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator- ( const T &  val,
const Vector2d< T > &  V1 
)
inline

Definition at line 624 of file Vector2d.hpp.

template<typename T >
Color<T> slip::operator- ( const Color< T > &  V1,
const Color< T > &  V2 
)
inline

Definition at line 630 of file Color.hpp.

template<typename T >
Color<T> slip::operator- ( const Color< T > &  V1,
const T &  val 
)
inline

Definition at line 640 of file Color.hpp.

template<typename T >
Color<T> slip::operator- ( const T &  val,
const Color< T > &  V1 
)
inline

Definition at line 650 of file Color.hpp.

template<typename T >
Vector3d<T> slip::operator- ( const Vector3d< T > &  V1,
const Vector3d< T > &  V2 
)
inline

Definition at line 655 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator- ( const Vector3d< T > &  V1,
const T &  val 
)
inline

Definition at line 667 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator- ( const T &  val,
const Vector3d< T > &  V1 
)
inline

Definition at line 677 of file Vector3d.hpp.

template<typename T >
Vector4d<T> slip::operator- ( const Vector4d< T > &  V1,
const Vector4d< T > &  V2 
)
inline

Definition at line 686 of file Vector4d.hpp.

template<typename T >
Vector4d<T> slip::operator- ( const Vector4d< T > &  V1,
const T &  val 
)
inline

Definition at line 699 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator- ( const DenseVector3dField2d< T > &  M1,
const DenseVector3dField2d< T > &  M2 
)
inline

pointwise substraction of two DenseVector3dField2d

Parameters
M1first DenseVector3dField2d
M2seconf DenseVector3dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField2d

Definition at line 1157 of file DenseVector3dField2d.hpp.

template<typename T >
Vector4d<T> slip::operator- ( const T &  val,
const Vector4d< T > &  V1 
)
inline

Definition at line 709 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator- ( const DenseVector3dField2d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

substraction of a Vector3d to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe Vector3d
Returns
resulting DenseVector3dField2d

Definition at line 1170 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator- ( const slip::Vector3d< T > &  val,
const DenseVector3dField2d< T > &  M1 
)
inline

substraction of a Vector3d to each element of a DenseVector3dField2d

Parameters
valthe Vector3d
M1the DenseVector3dField2d
Returns
resulting DenseVector3dField2d

Definition at line 1180 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator- ( const DenseVector2dField2d< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe scalar
Returns
resulting DenseVector2dField2d

Definition at line 1246 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator- ( const T &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

substraction of a scalar to each element of a DenseVector2dField2d

Parameters
valthe scalar
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1256 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator- ( const DenseVector3dField3d< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe scalar
Returns
resulting DenseVector3dField3d

Definition at line 1333 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator- ( const T &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

substraction of a scalar to each element of a DenseVector3dField3d

Parameters
valthe scalar
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1343 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator- ( const DenseVector2dField2d< T > &  M1,
const DenseVector2dField2d< T > &  M2 
)
inline

pointwise substraction of two DenseVector2dField2d

Parameters
M1first DenseVector2dField2d
M2seconf DenseVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector2dField2d

Definition at line 1327 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator- ( const DenseVector2dField2d< T > &  M1,
const slip::Vector2d< T > &  val 
)
inline

substraction of a Vector2d to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe Vector2d
Returns
resulting DenseVector2dField2d

Definition at line 1340 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator- ( const slip::Vector2d< T > &  val,
const DenseVector2dField2d< T > &  M1 
)
inline

substraction of a Vector2d to each element of a DenseVector2dField2d

Parameters
valthe Vector2d
M1the DenseVector2dField2d
Returns
resulting DenseVector2dField2d

Definition at line 1350 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator- ( const DenseVector3dField3d< T > &  M1,
const DenseVector3dField3d< T > &  M2 
)
inline

pointwise substraction of two DenseVector3dField3d

Parameters
M1first DenseVector3dField3d
M2seconf DenseVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField3d

Definition at line 1415 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator- ( const DenseVector3dField3d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

substraction of a Vector3d to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe Vector3d
Returns
resulting DenseVector3dField3d

Definition at line 1429 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator- ( const slip::Vector3d< T > &  val,
const DenseVector3dField3d< T > &  M1 
)
inline

substraction of a Vector3d to each element of a DenseVector3dField3d

Parameters
valthe Vector3d
M1the DenseVector3dField3d
Returns
resulting DenseVector3dField3d

Definition at line 1439 of file DenseVector3dField3d.hpp.

template<typename T >
ColorImage<T> slip::operator- ( const ColorImage< T > &  M1,
const slip::Color< T > &  val 
)
inline

Definition at line 954 of file ColorImage.hpp.

template<typename T >
ColorImage<T> slip::operator- ( const slip::Color< T > &  val,
const ColorImage< T > &  M1 
)
inline

Definition at line 964 of file ColorImage.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator- ( const kvector< T, N > &  V1,
const kvector< T, N > &  V2 
)
inline

pointwise substraction of two kvector

Parameters
V1The first kvector
V2The second kvector
Precondition
V1.size() == V2.size()
Returns
resulting kvector

Definition at line 1336 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator- ( const kvector< T, N > &  V,
const T &  val 
)
inline

substraction of a scalar to each element of a kvector

Parameters
VThe kvector
valThe scalar
Returns
resulting kvector

Definition at line 1346 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator- ( const T &  val,
const kvector< T, N > &  V 
)
inline

substraction of a scalar to each element of a kvector

Parameters
valThe scalar
VThe kvector
Returns
resulting kvector

Definition at line 1356 of file KVector.hpp.

template<typename T >
Vector< T > slip::operator- ( const Vector< T > &  V1,
const Vector< T > &  V2 
)
inline

pointwise substraction of two Vector

Parameters
V1The first Vector
V2The second Vector
Precondition
V1.size() == V2.size()
Returns
resulting Vector

Definition at line 1918 of file Vector.hpp.

template<typename T >
Vector< T > slip::operator- ( const Vector< T > &  V,
const T &  val 
)
inline

substraction of a scalar to each element of a Vector

Parameters
VThe Vector
valThe scalar
Returns
resulting Vector

Definition at line 1929 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator- ( const Signal< T > &  V1,
const Signal< T > &  V2 
)
inline

pointwise substraction of two Signal

Parameters
V1The first Signal
V2The second Signal
Precondition
V1.size() == V2.size()
Returns
resulting Signal

Definition at line 1931 of file Signal.hpp.

template<typename T >
Vector< T > slip::operator- ( const T &  val,
const Vector< T > &  V 
)
inline

substraction of a scalar to each element of a Vector

Parameters
valThe scalar
VThe Vector
Returns
resulting Vector

Definition at line 1939 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator- ( const Signal< T > &  V,
const T &  val 
)
inline

substraction of a scalar to each element of a Signal

Parameters
VThe Signal
valThe scalar
Returns
resulting Signal

Definition at line 1942 of file Signal.hpp.

template<typename T >
Signal< T > slip::operator- ( const T &  val,
const Signal< T > &  V 
)
inline

substraction of a scalar to each element of a Signal

Parameters
valThe scalar
VThe Signal
Returns
resulting Signal

Definition at line 1952 of file Signal.hpp.

template<typename T >
Polynomial<T> slip::operator- ( const Polynomial< T > &  V1,
const Polynomial< T > &  V2 
)
related

Definition at line 1340 of file Polynomial.hpp.

template<typename T >
Polynomial<T> slip::operator- ( const Polynomial< T > &  V1,
const T &  val 
)
related

Definition at line 1350 of file Polynomial.hpp.

template<typename T >
Polynomial<T> slip::operator- ( const T &  val,
const Polynomial< T > &  V1 
)
related

Definition at line 1360 of file Polynomial.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator- ( const RegularVector2dField2d< T, GridT > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe scalar
Returns
resulting RegularVector2dField2d

Definition at line 1964 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator- ( const T &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

substraction of a scalar to each element of a RegularVector2dField2d

Parameters
valthe scalar
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 1974 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator- ( const RegularVector2dField2d< T, GridT > &  M1,
const RegularVector2dField2d< T, GridT > &  M2 
)
inline

pointwise substraction of two RegularVector2dField2d

Parameters
M1first RegularVector2dField2d
M2seconf RegularVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector2dField2d

Definition at line 2044 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator- ( const RegularVector2dField2d< T, GridT > &  M1,
const slip::Vector2d< T > &  val 
)
inline

substraction of a Vector2d to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe Vector2d
Returns
resulting RegularVector2dField2d

Definition at line 2055 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator- ( const slip::Vector2d< T > &  val,
const RegularVector2dField2d< T, GridT > &  M1 
)
inline

substraction of a Vector2d to each element of a RegularVector2dField2d

Parameters
valthe Vector2d
M1the RegularVector2dField2d
Returns
resulting RegularVector2dField2d

Definition at line 2065 of file RegularVector2dField2d.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator- ( const MultivariatePolynomial< T, DIM > &  P1,
const MultivariatePolynomial< T, DIM > &  P2 
)
related

Definition at line 1749 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator- ( const MultivariatePolynomial< T, DIM > &  P1,
const T &  val 
)
related

Definition at line 1759 of file MultivariatePolynomial.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator- ( const T &  val,
const MultivariatePolynomial< T, DIM > &  P1 
)
related

Definition at line 1769 of file MultivariatePolynomial.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator- ( const RegularVector3dField3d< T, GridT > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe scalar
Returns
resulting RegularVector3dField3d

Definition at line 2596 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator- ( const T &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

substraction of a scalar to each element of a RegularVector3dField3d

Parameters
valthe scalar
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2606 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator- ( const RegularVector3dField3d< T, GridT > &  M1,
const RegularVector3dField3d< T, GridT > &  M2 
)
inline

pointwise substraction of two RegularVector3dField3d

Parameters
M1first RegularVector3dField3d
M2seconf RegularVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector3dField3d

Definition at line 2676 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator- ( const RegularVector3dField3d< T, GridT > &  M1,
const slip::Vector3d< T > &  val 
)
inline

substraction of a Vector3d to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe Vector3d
Returns
resulting RegularVector3dField3d

Definition at line 2688 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator- ( const slip::Vector3d< T > &  val,
const RegularVector3dField3d< T, GridT > &  M1 
)
inline

substraction of a Vector3d to each element of a RegularVector3dField3d

Parameters
valthe Vector3d
M1the RegularVector3dField3d
Returns
resulting RegularVector3dField3d

Definition at line 2698 of file RegularVector3dField3d.hpp.

template<typename T >
GrayscaleImage< T > slip::operator- ( const GrayscaleImage< T > &  M1,
const GrayscaleImage< T > &  M2 
)
inline

pointwise substraction of two GrayscaleImage

Parameters
M1first GrayscaleImage
M2seconf GrayscaleImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting GrayscaleImage

Definition at line 3602 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator- ( const GrayscaleImage< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a GrayscaleImage

Parameters
M1the GrayscaleImage
valthe scalar
Returns
resulting GrayscaleImage

Definition at line 3614 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator- ( const T &  val,
const GrayscaleImage< T > &  M1 
)
inline

substraction of a scalar to each element of a GrayscaleImage

Parameters
valthe scalar
M1the GrayscaleImage
Returns
resulting GrayscaleImage

Definition at line 3624 of file GrayscaleImage.hpp.

template<typename T >
Matrix< T > slip::operator- ( const Matrix< T > &  M1,
const Matrix< T > &  M2 
)
inline

pointwise substraction of two Matrix

Parameters
M1first Matrix
M2seconf Matrix
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix

Definition at line 3785 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator- ( const Matrix< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a Matrix

Parameters
M1the Matrix
valthe scalar
Returns
resulting Matrix

Definition at line 3797 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator- ( const T &  val,
const Matrix< T > &  M1 
)
inline

substraction of a scalar to each element of a Matrix

Parameters
valthe scalar
M1the Matrix
Returns
resulting Matrix

Definition at line 3807 of file Matrix.hpp.

template<typename T >
HyperVolume< T > slip::operator- ( const HyperVolume< T > &  M1,
const HyperVolume< T > &  M2 
)
inline

pointwise substraction of two HyperVolume

Parameters
M1first HyperVolume
M2seconf HyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting HyperVolume

Definition at line 4958 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator- ( const Matrix4d< T > &  M1,
const Matrix4d< T > &  M2 
)
inline

pointwise substraction of two Matrix4d

Parameters
M1first Matrix4d
M2seconf Matrix4d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting Matrix4d

Definition at line 4966 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator- ( const HyperVolume< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a HyperVolume

Parameters
M1the HyperVolume
valthe scalar
Returns
resulting HyperVolume

Definition at line 4973 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator- ( const Matrix4d< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a Matrix4d

Parameters
M1the Matrix4d
valthe scalar
Returns
resulting Matrix4d

Definition at line 4981 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator- ( const T &  val,
const HyperVolume< T > &  M1 
)
inline

substraction of a scalar to each element of a HyperVolume

Parameters
valthe scalar
M1the HyperVolume
Returns
resulting HyperVolume

Definition at line 4983 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator- ( const T &  val,
const Matrix4d< T > &  M1 
)
inline

substraction of a scalar to each element of a Matrix4d

Parameters
valthe scalar
M1the Matrix4d
Returns
resulting Matrix4d

Definition at line 4991 of file Matrix4d.hpp.

template<typename T >
Matrix3d< T > slip::operator- ( const Matrix3d< T > &  M1,
const Matrix3d< T > &  M2 
)
inline

pointwise substraction of two Matrix3d

Parameters
M1first Matrix3d
M2seconf Matrix3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix3d

Definition at line 5610 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator- ( const Matrix3d< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a Matrix3d

Parameters
M1the Matrix3d
valthe scalar
Returns
resulting Matrix3d

Definition at line 5624 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator- ( const T &  val,
const Matrix3d< T > &  M1 
)
inline

substraction of a scalar to each element of a Matrix3d

Parameters
valthe scalar
M1the Matrix3d
Returns
resulting Matrix3d

Definition at line 5634 of file Matrix3d.hpp.

template<typename T >
Volume< T > slip::operator- ( const Volume< T > &  M1,
const Volume< T > &  M2 
)
inline

pointwise substraction of two Volume

Parameters
M1first Volume
M2seconf Volume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Volume

Definition at line 5928 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator- ( const Volume< T > &  M1,
const T &  val 
)
inline

substraction of a scalar to each element of a Volume

Parameters
M1the Volume
valthe scalar
Returns
resulting Volume

Definition at line 5942 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator- ( const T &  val,
const Volume< T > &  M1 
)
inline

substraction of a scalar to each element of a Volume

Parameters
valthe scalar
M1the Volume
Returns
resulting Volume

Definition at line 5952 of file Volume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator/ ( const ColorHyperVolume< T > &  M1,
const ColorHyperVolume< T > &  M2 
)
inline

pointwise division of two ColorHyperVolume

Parameters
M1first ColorHyperVolume
M2seconf ColorHyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting ColorHyperVolume

Definition at line 822 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator/ ( const ColorHyperVolume< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a ColorHyperVolume

Parameters
M1the ColorHyperVolume
valthe scalar
Returns
resulting ColorHyperVolume

Definition at line 835 of file ColorHyperVolume.hpp.

template<typename T >
ColorHyperVolume< T > slip::operator/ ( const ColorHyperVolume< T > &  M1,
const slip::Color< T > &  val 
)
inline

division of each element of a ColorHyperVolume by a Color block

Parameters
M1the ColorHyperVolume
valthe Color block
Returns
resulting ColorHyperVolume

Definition at line 844 of file ColorHyperVolume.hpp.

template<typename T >
ColorImage< T > slip::operator/ ( const ColorImage< T > &  M1,
const ColorImage< T > &  M2 
)
inline

pointwise division of two ColorImage

Parameters
M1first ColorImage
M2seconf ColorImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting ColorImage

Definition at line 1039 of file ColorImage.hpp.

template<typename T >
ColorImage< T > slip::operator/ ( const ColorImage< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a ColorImage

Parameters
M1the ColorImage
valthe scalar
Returns
resulting ColorImage

Definition at line 1061 of file ColorImage.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator/ ( const DenseVector3dField2d< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe scalar
Returns
resulting DenseVector3dField2d

Definition at line 1114 of file DenseVector3dField2d.hpp.

template<typename T >
Vector2d<T> slip::operator/ ( const Vector2d< T > &  V1,
const Vector2d< T > &  V2 
)
inline

Definition at line 665 of file Vector2d.hpp.

template<typename T >
Vector2d<T> slip::operator/ ( const Vector2d< T > &  V1,
const T &  val 
)
inline

Definition at line 676 of file Vector2d.hpp.

template<typename T >
Color<T> slip::operator/ ( const Color< T > &  V1,
const Color< T > &  V2 
)
inline

Definition at line 686 of file Color.hpp.

template<typename T >
Color<T> slip::operator/ ( const Color< T > &  V1,
const T &  val 
)
inline

Definition at line 696 of file Color.hpp.

template<typename T >
Vector3d<T> slip::operator/ ( const Vector3d< T > &  V1,
const Vector3d< T > &  V2 
)
inline

Definition at line 721 of file Vector3d.hpp.

template<typename T >
Vector3d<T> slip::operator/ ( const Vector3d< T > &  V1,
const T &  val 
)
inline

Definition at line 733 of file Vector3d.hpp.

template<typename T >
Vector4d<T> slip::operator/ ( const Vector4d< T > &  V1,
const Vector4d< T > &  V2 
)
inline

Definition at line 754 of file Vector4d.hpp.

template<typename T >
Vector4d<T> slip::operator/ ( const Vector4d< T > &  V1,
const T &  val 
)
inline

Definition at line 767 of file Vector4d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator/ ( const DenseVector3dField2d< T > &  M1,
const DenseVector3dField2d< T > &  M2 
)
inline

pointwise division of two DenseVector3dField2d

Parameters
M1first DenseVector3dField2d
M2seconf DenseVector3dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField2d

Definition at line 1221 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector3dField2d< T > slip::operator/ ( const DenseVector3dField2d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

division of a Vector3d to each element of a DenseVector3dField2d

Parameters
M1the DenseVector3dField2d
valthe Vector3d
Returns
resulting DenseVector3dField2d

Definition at line 1234 of file DenseVector3dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator/ ( const DenseVector2dField2d< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe scalar
Returns
resulting DenseVector2dField2d

Definition at line 1284 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator/ ( const DenseVector3dField3d< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe scalar
Returns
resulting DenseVector3dField3d

Definition at line 1371 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator/ ( const DenseVector2dField2d< T > &  M1,
const DenseVector2dField2d< T > &  M2 
)
inline

pointwise division of two DenseVector2dField2d

Parameters
M1first DenseVector2dField2d
M2seconf DenseVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector2dField2d

Definition at line 1391 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector2dField2d< T > slip::operator/ ( const DenseVector2dField2d< T > &  M1,
const slip::Vector2d< T > &  val 
)
inline

division of a Vector2d to each element of a DenseVector2dField2d

Parameters
M1the DenseVector2dField2d
valthe Vector2d
Returns
resulting DenseVector2dField2d

Definition at line 1404 of file DenseVector2dField2d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator/ ( const DenseVector3dField3d< T > &  M1,
const DenseVector3dField3d< T > &  M2 
)
inline

pointwise division of two DenseVector3dField3d

Parameters
M1first DenseVector3dField3d
M2seconf DenseVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting DenseVector3dField3d

Definition at line 1481 of file DenseVector3dField3d.hpp.

template<typename T >
DenseVector3dField3d< T > slip::operator/ ( const DenseVector3dField3d< T > &  M1,
const slip::Vector3d< T > &  val 
)
inline

division of a Vector3d to each element of a DenseVector3dField3d

Parameters
M1the DenseVector3dField3d
valthe Vector3d
Returns
resulting DenseVector3dField3d

Definition at line 1495 of file DenseVector3dField3d.hpp.

template<typename T >
ColorImage<T> slip::operator/ ( const ColorImage< T > &  M1,
const slip::Color< T > &  val 
)
inline

Definition at line 1051 of file ColorImage.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator/ ( const kvector< T, N > &  V1,
const kvector< T, N > &  V2 
)
inline

pointwise division of two kvector

Parameters
V1The first kvector
V2The second kvector
Precondition
V1.size() == V2.size()
Returns
resulting kvector

Definition at line 1392 of file KVector.hpp.

template<typename T , std::size_t N>
kvector< T, N > slip::operator/ ( const kvector< T, N > &  V,
const T &  val 
)
inline

division of a scalar to each element of a kvector

Parameters
VThe kvector
valThe scalar
Returns
resulting kvector

Definition at line 1402 of file KVector.hpp.

template<typename T >
Vector< T > slip::operator/ ( const Vector< T > &  V1,
const Vector< T > &  V2 
)
inline

pointwise division of two Vector

Parameters
V1The first Vector
V2The second Vector
Precondition
V1.size() == V2.size()
Returns
resulting Vector

Definition at line 1976 of file Vector.hpp.

template<typename T >
Vector< T > slip::operator/ ( const Vector< T > &  V,
const T &  val 
)
inline

division of a scalar to each element of a Vector

Parameters
VThe Vector
valThe scalar
Returns
resulting Vector

Definition at line 1987 of file Vector.hpp.

template<typename T >
Signal< T > slip::operator/ ( const Signal< T > &  V1,
const Signal< T > &  V2 
)
inline

pointwise division of two Signal

Parameters
V1The first Signal
V2The second Signal
Precondition
V1.size() == V2.size()
Returns
resulting Signal

Definition at line 1989 of file Signal.hpp.

template<typename T >
Signal< T > slip::operator/ ( const Signal< T > &  V,
const T &  val 
)
inline

division of a scalar to each element of a Signal

Parameters
VThe Signal
valThe scalar
Returns
resulting Signal

Definition at line 2000 of file Signal.hpp.

template<typename T >
Polynomial<T> slip::operator/ ( const Polynomial< T > &  V1,
const T &  val 
)
related

Definition at line 1410 of file Polynomial.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator/ ( const RegularVector2dField2d< T, GridT > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe scalar
Returns
resulting RegularVector2dField2d

Definition at line 2002 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator/ ( const RegularVector2dField2d< T, GridT > &  M1,
const RegularVector2dField2d< T, GridT > &  M2 
)
inline

pointwise division of two RegularVector2dField2d

Parameters
M1first RegularVector2dField2d
M2seconf RegularVector2dField2d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector2dField2d

Definition at line 2106 of file RegularVector2dField2d.hpp.

template<typename T , typename GridT >
RegularVector2dField2d< T, GridT > slip::operator/ ( const RegularVector2dField2d< T, GridT > &  M1,
const slip::Vector2d< T > &  val 
)
inline

division of a Vector2d to each element of a RegularVector2dField2d

Parameters
M1the RegularVector2dField2d
valthe Vector2d
Returns
resulting RegularVector2dField2d

Definition at line 2119 of file RegularVector2dField2d.hpp.

template<typename T , std::size_t DIM>
MultivariatePolynomial<T,DIM> slip::operator/ ( const MultivariatePolynomial< T, DIM > &  P1,
const T &  val 
)
related

Definition at line 1807 of file MultivariatePolynomial.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator/ ( const RegularVector3dField3d< T, GridT > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe scalar
Returns
resulting RegularVector3dField3d

Definition at line 2634 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator/ ( const RegularVector3dField3d< T, GridT > &  M1,
const RegularVector3dField3d< T, GridT > &  M2 
)
inline

pointwise division of two RegularVector3dField3d

Parameters
M1first RegularVector3dField3d
M2seconf RegularVector3dField3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting RegularVector3dField3d

Definition at line 2738 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
RegularVector3dField3d< T, GridT > slip::operator/ ( const RegularVector3dField3d< T, GridT > &  M1,
const slip::Vector3d< T > &  val 
)
inline

division of a Vector3d to each element of a RegularVector3dField3d

Parameters
M1the RegularVector3dField3d
valthe Vector3d
Returns
resulting RegularVector3dField3d

Definition at line 2750 of file RegularVector3dField3d.hpp.

template<typename T >
GrayscaleImage< T > slip::operator/ ( const GrayscaleImage< T > &  M1,
const GrayscaleImage< T > &  M2 
)
inline

pointwise division of two GrayscaleImage

Parameters
M1first GrayscaleImage
M2seconf GrayscaleImage
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting GrayscaleImage

Definition at line 3662 of file GrayscaleImage.hpp.

template<typename T >
GrayscaleImage< T > slip::operator/ ( const GrayscaleImage< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a GrayscaleImage

Parameters
M1the GrayscaleImage
valthe scalar
Returns
resulting GrayscaleImage

Definition at line 3674 of file GrayscaleImage.hpp.

template<typename T >
Matrix< T > slip::operator/ ( const Matrix< T > &  M1,
const Matrix< T > &  M2 
)
inline

pointwise division of two Matrix

Parameters
M1first Matrix
M2seconf Matrix
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix

Definition at line 3846 of file Matrix.hpp.

template<typename T >
Matrix< T > slip::operator/ ( const Matrix< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a Matrix

Parameters
M1the Matrix
valthe scalar
Returns
resulting Matrix

Definition at line 3858 of file Matrix.hpp.

template<typename T >
HyperVolume< T > slip::operator/ ( const HyperVolume< T > &  M1,
const HyperVolume< T > &  M2 
)
inline

pointwise division of two HyperVolume

Parameters
M1first HyperVolume
M2seconf HyperVolume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting HyperVolume

Definition at line 5024 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator/ ( const Matrix4d< T > &  M1,
const Matrix4d< T > &  M2 
)
inline

pointwise division of two Matrix4d

Parameters
M1first Matrix4d
M2seconf Matrix4d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
M1.dim3() == M2.dim3()
M1.dim4() == M2.dim4()
Returns
resulting Matrix4d

Definition at line 5032 of file Matrix4d.hpp.

template<typename T >
HyperVolume< T > slip::operator/ ( const HyperVolume< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a HyperVolume

Parameters
M1the HyperVolume
valthe scalar
Returns
resulting HyperVolume

Definition at line 5039 of file HyperVolume.hpp.

template<typename T >
Matrix4d< T > slip::operator/ ( const Matrix4d< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a Matrix4d

Parameters
M1the Matrix4d
valthe scalar
Returns
resulting Matrix4d

Definition at line 5047 of file Matrix4d.hpp.

template<typename T >
Matrix3d< T > slip::operator/ ( const Matrix3d< T > &  M1,
const Matrix3d< T > &  M2 
)
inline

pointwise division of two Matrix3d

Parameters
M1first Matrix3d
M2seconf Matrix3d
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Matrix3d

Definition at line 5674 of file Matrix3d.hpp.

template<typename T >
Matrix3d< T > slip::operator/ ( const Matrix3d< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a Matrix3d

Parameters
M1the Matrix3d
valthe scalar
Returns
resulting Matrix3d

Definition at line 5688 of file Matrix3d.hpp.

template<typename T >
Volume< T > slip::operator/ ( const Volume< T > &  M1,
const Volume< T > &  M2 
)
inline

pointwise division of two Volume

Parameters
M1first Volume
M2seconf Volume
Precondition
M1.dim1() == M2.dim1()
M1.dim2() == M2.dim2()
Returns
resulting Volume

Definition at line 5992 of file Volume.hpp.

template<typename T >
Volume< T > slip::operator/ ( const Volume< T > &  M1,
const T &  val 
)
inline

division of a scalar to each element of a Volume

Parameters
M1the Volume
valthe scalar
Returns
resulting Volume

Definition at line 6006 of file Volume.hpp.

template<typename T >
bool slip::operator< ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
inline
Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| < ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 480 of file Vector3d.hpp.

template<typename T >
bool slip::operator< ( const Vector4d< T > &  x,
const Vector4d< T > &  y 
)
inline
Parameters
xfirst Vector4d to compare
ysecond Vector4d to compare return true if ||x|| < ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 499 of file Vector4d.hpp.

template<typename T >
bool slip::operator< ( const Vector2d< T > &  x,
const Vector2d< T > &  y 
)
inline
Parameters
xfirst Vector2d to compare
ysecond Vector2d to compare return true if ||x|| < ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 472 of file Vector2d.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator< ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x < y
Precondition
x.dim() == y.dim()

Definition at line 512 of file Block4d.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator< ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x < y
Precondition
x.dim() == y.dim()

Definition at line 503 of file Block3d.hpp.

template<typename T >
bool slip::operator< ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 1460 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator< ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 756 of file Block.hpp.

template<typename T , std::size_t N>
bool slip::operator< ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true iff x is lexicographically less than y
Precondition
x.size() == y.size()

Definition at line 1639 of file KVector.hpp.

template<typename T >
bool slip::operator< ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 5406 of file Matrix3d.hpp.

template<std::size_t DIM>
bool slip::operator< ( const Monomial< DIM > &  x,
const Monomial< DIM > &  y 
)
inline
Parameters
xA Monomial
yA Monomial of the same type of x
Returns
true iff the powers of x is lexicographically less than thoseof y

Definition at line 295 of file MultivariatePolynomial.hpp.

template<typename T >
bool slip::operator< ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 2208 of file Vector.hpp.

template<typename T >
bool slip::operator< ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 1440 of file Polynomial.hpp.

template<typename T >
bool slip::operator< ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 2221 of file Signal.hpp.

template<typename T >
bool slip::operator< ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 4778 of file Array4d.hpp.

template<typename T >
bool slip::operator< ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 4751 of file HyperVolume.hpp.

template<typename T >
bool slip::operator< ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 5725 of file Volume.hpp.

template<typename T >
bool slip::operator< ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 5284 of file Array3d.hpp.

template<typename T >
bool slip::operator< ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 4759 of file Matrix4d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator< ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 2396 of file Block2d.hpp.

template<typename T >
bool slip::operator< ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 3259 of file Array2d.hpp.

template<typename T >
bool slip::operator< ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true iff x is lexicographically less than y
Precondition
x.size() == y.size()

Definition at line 3733 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator< ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 4089 of file Matrix.hpp.

template<typename SubType >
std::ostream & slip::operator<< ( std::ostream &  out,
const Range< SubType > &  b 
)
inline
Parameters
outoutput stream
rRange to write to the output stream

Definition at line 339 of file Range.hpp.

template<typename CoordType , std::size_t DIM>
std::ostream & slip::operator<< ( std::ostream &  out,
const Point< CoordType, DIM > &  p 
)
inline
Parameters
outoutput stream
pPoint to write to the output stream

Definition at line 391 of file Point.hpp.

template<typename CoordType , std::size_t DIM>
std::ostream & slip::operator<< ( std::ostream &  out,
const DPoint< CoordType, DIM > &  p 
)
inline
Parameters
outoutput stream
pDPoint to write to the output stream

Definition at line 422 of file DPoint.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Color< T > &  b 
)
inline
Parameters
outoutput stream
bColor to write to an output stream

Definition at line 546 of file Color.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Array< T > &  a 
)
inline
Parameters
outoutput std::ostream
aArray to write to the output stream

Definition at line 1282 of file Array.hpp.

template<typename T , std::size_t N>
std::ostream & slip::operator<< ( std::ostream &  out,
const block< T, N > &  b 
)
Parameters
outoutput std::ostream
bblock to write to an output stream

Definition at line 718 of file Block.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::block4d< T, NS, NP, NR, NC > &  b 
)
inline
Parameters
outoutput stream
bblock4d to write to an output stream

Definition at line 468 of file Block4d.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::block3d< T, NP, NR, NC > &  b 
)
inline
Parameters
outoutput stream
bblock3d to write to an output stream

Definition at line 459 of file Block3d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Colormap< T > &  a 
)
inline
Parameters
outoutput std::ostream
aColormap to write to the output stream

Definition at line 875 of file Colormap.hpp.

template<typename CoordType , std::size_t DIM>
std::ostream & slip::operator<< ( std::ostream &  out,
const Box< CoordType, DIM > &  b 
)
inline
Parameters
outoutput stream
bBox to write to the output stream

Definition at line 362 of file Box.hpp.

template<typename Type >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::SoloffCamera< Type > &  c 
)
Parameters
outoutput stream
cSoloffCamera to write to the output stream

Definition at line 715 of file SoloffCamera.hpp.

template<typename Type >
std::ostream & slip::operator<< ( std::ostream &  out,
const PinholeDLTCamera< Type > &  c 
)

Definition at line 208 of file PinholeDLTCamera.hpp.

template<typename Type >
std::ostream & slip::operator<< ( std::ostream &  out,
const PinholeFaugerasCamera< Type > &  c 
)

Definition at line 211 of file PinholeFaugerasCamera.hpp.

template<typename Type >
std::ostream & slip::operator<< ( std::ostream &  out,
const PinholeCamera< Type > &  c 
)
Parameters
outoutput stream.
cPinholeCamera to write to the output stream

Definition at line 544 of file PinholeCamera.hpp.

template<typename T , std::size_t N>
std::ostream & slip::operator<< ( std::ostream &  out,
const kvector< T, N > &  b 
)
Parameters
outoutput std::ostream
bkvector to write to an output stream

Definition at line 1293 of file KVector.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Polynomial< T > &  v 
)
inline
Parameters
outoutput std:ostream
vPolynomial to write to the output stream

Definition at line 956 of file Polynomial.hpp.

template<std::size_t DIM>
std::ostream & slip::operator<< ( std::ostream &  out,
const Monomial< DIM > &  m 
)
inline

Definition at line 257 of file MultivariatePolynomial.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Vector< T > &  v 
)
inline
Parameters
outoutput std:ostream
vVector to write to the output stream

Definition at line 1673 of file Vector.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Matrix3d< T > &  a 
)
inline
Parameters
outoutput std::ostream
aMatrix3d to write to the output stream

Definition at line 5258 of file Matrix3d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const Signal< T > &  v 
)
inline
Parameters
outoutput std:ostream
vSignal to write to the output stream

Definition at line 1687 of file Signal.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Array4d< T > &  a 
)
inline
Parameters
outoutput std::ostream
aArray4d to write to the output stream

Definition at line 4592 of file Array4d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::HyperVolume< T > &  a 
)
inline
Parameters
outoutput std::ostream
aHyperVolume to write to the output stream

Definition at line 4599 of file HyperVolume.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Array3d< T > &  a 
)
inline
Parameters
outoutput std::ostream
aArray3d to write to the output stream

Definition at line 5109 of file Array3d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Volume< T > &  a 
)
inline
Parameters
outoutput std::ostream
aVolume to write to the output stream

Definition at line 5342 of file Volume.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Matrix4d< T > &  a 
)
inline
Parameters
outoutput std::ostream
aMatrix4d to write to the output stream

Definition at line 4607 of file Matrix4d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::block2d< T, NR, NC > &  b 
)
inline
Parameters
outoutput std::ostream
bblock2d to write to an output stream

Definition at line 2356 of file Block2d.hpp.

template<typename Block >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::GenericMultiComponent3d< Block > &  a 
)
inline
Parameters
outoutput stream
aGenericMultiComponent3d to write to the output stream

Definition at line 7552 of file GenericMultiComponent3d.hpp.

template<typename Block >
std::ostream & slip::operator<< ( std::ostream &  out,
const GenericMultiComponent4d< Block > &  a 
)
inline
Parameters
outoutput stream
aGenericMultiComponent4d to write to the output stream

Definition at line 7312 of file GenericMultiComponent4d.hpp.

template<typename Block >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::GenericMultiComponent2d< Block > &  a 
)
inline
Parameters
outoutput stream
aGenericMultiComponent2d to write to the output stream

Definition at line 4760 of file GenericMultiComponent2d.hpp.

template<typename T , typename GridT >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::RegularVector3dField3d< T, GridT > &  a 
)
inline
Parameters
outoutput stream
aRegularVector3dField3d to write to the output stream

Definition at line 2478 of file RegularVector3dField3d.hpp.

template<typename T , typename GridT >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::RegularVector2dField2d< T, GridT > &  a 
)
inline
Parameters
outoutput stream
aRegularVector2dField2d to write to the output stream

Definition at line 1877 of file RegularVector2dField2d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Array2d< T > &  a 
)
inline
Parameters
outoutput std::ostream
aArray2d to write to the output stream

Definition at line 3023 of file Array2d.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::GrayscaleImage< T > &  a 
)
inline
Parameters
outoutput stream
aGrayscaleImage to write to the output stream

Definition at line 3205 of file GrayscaleImage.hpp.

template<typename T >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Matrix< T > &  a 
)
inline
Parameters
outoutput std::ostream
aMatrix to write to the output stream

Definition at line 3409 of file Matrix.hpp.

template<typename Type >
std::ostream & slip::operator<< ( std::ostream &  out,
const DistortionCamera< Type > &  c 
)
Parameters
outoutput stream.
cPinholeCamera to write to the output stream.

Definition at line 582 of file DistortionCamera.hpp.

template<typename T , std::size_t DIM>
std::ostream & slip::operator<< ( std::ostream &  out,
const MultivariatePolynomial< T, DIM > &  v 
)
inline
Parameters
outoutput std:ostream
vMultivariatePolynomial to write to the output stream

Definition at line 1063 of file MultivariatePolynomial.hpp.

template<typename Container >
std::ostream & slip::operator<< ( std::ostream &  out,
const slip::Pyramid< Container > &  a 
)
inline
Parameters
outoutput std::ostream
aPyramid to write to the output stream

Definition at line 868 of file Pyramid.hpp.

template<std::size_t DIM>
std::ostream& slip::operator<< ( std::ostream &  out,
const MultivariatePolynomial< std::complex< double >, DIM > &  m 
)
inline

Definition at line 1099 of file MultivariatePolynomial.hpp.

template<std::size_t DIM>
std::ostream& slip::operator<< ( std::ostream &  out,
const MultivariatePolynomial< std::complex< float >, DIM > &  m 
)
inline

Definition at line 1129 of file MultivariatePolynomial.hpp.

template<std::size_t DIM>
std::ostream& slip::operator<< ( std::ostream &  out,
const MultivariatePolynomial< std::complex< long double >, DIM > &  m 
)
inline

Definition at line 1158 of file MultivariatePolynomial.hpp.

template<typename T >
bool slip::operator<= ( const Vector4d< T > &  x,
const Vector4d< T > &  y 
)
inline
Parameters
xfirst Vector4d to compare
ysecond Vector4d to compare return true if ||x|| <= ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 519 of file Vector4d.hpp.

template<typename T >
bool slip::operator<= ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
inline
Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| <= ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 501 of file Vector3d.hpp.

template<typename T >
bool slip::operator<= ( const Vector2d< T > &  x,
const Vector2d< T > &  y 
)
inline
Parameters
xfirst Vector2d to compare
ysecond Vector2d to compare return true if ||x|| <= ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 493 of file Vector2d.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator<= ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x <= y
Precondition
x.dim() == y.dim()

Definition at line 540 of file Block4d.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator<= ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x <= y
Precondition
x.dim() == y.dim()

Definition at line 531 of file Block3d.hpp.

template<typename T >
bool slip::operator<= ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true iff !(y > x)

Definition at line 1477 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator<= ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true iff !(y > x)

Definition at line 775 of file Block.hpp.

template<typename T , std::size_t N>
bool slip::operator<= ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true iff !(y > x)
Precondition
x.size() == y.size()

Definition at line 1657 of file KVector.hpp.

template<typename T >
bool slip::operator<= ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true iff !(y > x)

Definition at line 5424 of file Matrix3d.hpp.

template<typename T >
bool slip::operator<= ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true iff !(y > x)

Definition at line 1456 of file Polynomial.hpp.

template<typename T >
bool slip::operator<= ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true iff !(y > x)

Definition at line 2224 of file Vector.hpp.

template<typename T >
bool slip::operator<= ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true iff !(y > x)

Definition at line 2237 of file Signal.hpp.

template<typename T >
bool slip::operator<= ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true iff !(y > x)

Definition at line 4796 of file Array4d.hpp.

template<typename T >
bool slip::operator<= ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true iff !(y > x)

Definition at line 4769 of file HyperVolume.hpp.

template<typename T >
bool slip::operator<= ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true iff !(y > x)

Definition at line 5743 of file Volume.hpp.

template<typename T >
bool slip::operator<= ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff !(y > x)

Definition at line 5302 of file Array3d.hpp.

template<typename T >
bool slip::operator<= ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true iff !(y > x)

Definition at line 4777 of file Matrix4d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator<= ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true iff !(y > x)

Definition at line 2413 of file Block2d.hpp.

template<typename T >
bool slip::operator<= ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true iff !(y > x)

Definition at line 3277 of file Array2d.hpp.

template<typename T >
bool slip::operator<= ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true iff !(y > x)
Precondition
x.size() == y.size()

Definition at line 3752 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator<= ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff !(y > x)

Definition at line 4106 of file Matrix.hpp.

template<typename SubType >
bool slip::operator== ( const Range< SubType > &  b1,
const Range< SubType > &  b2 
)
inline
Parameters
r1First range.
r2Second range.
Returns
true iff : (r1.start_sub_ == r2.start_sub_) && (r1.stop_sub_ = r2.stop_sub_) && (r1.stride_ == r2.stride_)

Definition at line 348 of file Range.hpp.

template<typename T >
bool slip::operator== ( const Color< T > &  x,
const Color< T > &  y 
)
inline
Parameters
xfirst Color to compare
ysecond Color to compare return true if x == y
Precondition
x.dim() == y.dim()

Definition at line 710 of file Color.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator== ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x == y
Precondition
x.dim() == y.dim()

Definition at line 483 of file Block4d.hpp.

template<typename T >
bool slip::operator== ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 1439 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator== ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true iff the size and the elements of the blocks are equal

Definition at line 736 of file Block.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator== ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x == y
Precondition
x.dim() == y.dim()

Definition at line 474 of file Block3d.hpp.

template<typename T >
bool slip::operator== ( const Colormap< T > &  x,
const Colormap< T > &  y 
)
inline
Parameters
xA Colormap
yA Colormap of the same type of x
Returns
true iff the size and the elements of the Colormaps are equal

Definition at line 1007 of file Colormap.hpp.

template<typename T , std::size_t N>
bool slip::operator== ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true iff the size and the elements of the kvectors are equal

Definition at line 1621 of file KVector.hpp.

template<typename T >
bool slip::operator== ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 1422 of file Polynomial.hpp.

template<typename T >
bool slip::operator== ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 2190 of file Vector.hpp.

template<std::size_t DIM>
bool slip::operator== ( const Monomial< DIM > &  x,
const Monomial< DIM > &  y 
)
inline
Parameters
xA Monomial
yA Monomial of the same type of x
Returns
true iff the powers of the Monomials are equal

Definition at line 275 of file MultivariatePolynomial.hpp.

template<typename T >
bool slip::operator== ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 5385 of file Matrix3d.hpp.

template<typename T >
bool slip::operator== ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 2203 of file Signal.hpp.

template<typename T >
bool slip::operator== ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 4759 of file Array4d.hpp.

template<typename T >
bool slip::operator== ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 4730 of file HyperVolume.hpp.

template<typename T >
bool slip::operator== ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 5704 of file Volume.hpp.

template<typename T >
bool slip::operator== ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 5265 of file Array3d.hpp.

template<typename T >
bool slip::operator== ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 4738 of file Matrix4d.hpp.

template<typename Block >
bool slip::operator== ( const slip::GenericMultiComponent3d< Block > &  x,
const slip::GenericMultiComponent3d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent3d
yA GenericMultiComponent3d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal
Precondition
x.size() == y.size()

Definition at line 7688 of file GenericMultiComponent3d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator== ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true iff the size and the elements of the blocks are equal

Definition at line 2375 of file Block2d.hpp.

template<typename Block >
bool slip::operator== ( const GenericMultiComponent4d< Block > &  x,
const GenericMultiComponent4d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent4d
yA GenericMultiComponent4d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal
Precondition
x.size() == y.size()

Definition at line 7349 of file GenericMultiComponent4d.hpp.

template<typename Block >
bool slip::operator== ( const slip::GenericMultiComponent2d< Block > &  x,
const slip::GenericMultiComponent2d< Block > &  y 
)
inline
Parameters
xA GenericMultiComponent2d
yA GenericMultiComponent2d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal
Precondition
x.size() == y.size()

Definition at line 4927 of file GenericMultiComponent2d.hpp.

template<typename T >
bool slip::operator== ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 3238 of file Array2d.hpp.

template<typename T >
bool slip::operator== ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true iff the size and the elements of the Arrays are equal
Precondition
x.size() == y.size()

Definition at line 3713 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator== ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 4068 of file Matrix.hpp.

template<typename Container >
bool slip::operator== ( const Pyramid< Container > &  x,
const Pyramid< Container > &  y 
)

Definition at line 885 of file Pyramid.hpp.

template<typename T >
bool slip::operator> ( const Vector4d< T > &  x,
const Vector4d< T > &  y 
)
inline
Parameters
xfirst Vector4d to compare
ysecond Vector4d to compare return true if ||x|| > ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 511 of file Vector4d.hpp.

template<typename T >
bool slip::operator> ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
inline
Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| > ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 493 of file Vector3d.hpp.

template<typename T >
bool slip::operator> ( const Vector2d< T > &  x,
const Vector2d< T > &  y 
)
inline
Parameters
xfirst Vector2d to compare
ysecond Vector2d to compare return true if ||x|| > ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 485 of file Vector2d.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator> ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x > y
Precondition
x.dim() == y.dim()

Definition at line 526 of file Block4d.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator> ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x > y
Precondition
x.dim() == y.dim()

Definition at line 517 of file Block3d.hpp.

template<typename T >
bool slip::operator> ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true iff y > x

Definition at line 1469 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator> ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true iff y > x

Definition at line 766 of file Block.hpp.

template<typename T , std::size_t N>
bool slip::operator> ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true iff y > x
Precondition
x.size() == y.size()

Definition at line 1648 of file KVector.hpp.

template<typename T >
bool slip::operator> ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true iff y > x

Definition at line 1448 of file Polynomial.hpp.

template<typename T >
bool slip::operator> ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true iff y > x

Definition at line 2216 of file Vector.hpp.

template<std::size_t DIM>
bool slip::operator> ( const Monomial< DIM > &  x,
const Monomial< DIM > &  y 
)
inline
Parameters
xA Monomial
yA Monomial of the same type of x
Returns
true iff y > x

Definition at line 306 of file MultivariatePolynomial.hpp.

template<typename T >
bool slip::operator> ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true iff y > x

Definition at line 5416 of file Matrix3d.hpp.

template<typename T >
bool slip::operator> ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true iff y > x

Definition at line 2229 of file Signal.hpp.

template<typename T >
bool slip::operator> ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true iff y > x

Definition at line 4788 of file Array4d.hpp.

template<typename T >
bool slip::operator> ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true iff y > x

Definition at line 4761 of file HyperVolume.hpp.

template<typename T >
bool slip::operator> ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true iff y > x

Definition at line 5735 of file Volume.hpp.

template<typename T >
bool slip::operator> ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff y > x

Definition at line 5294 of file Array3d.hpp.

template<typename T >
bool slip::operator> ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true iff y > x

Definition at line 4769 of file Matrix4d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator> ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true iff y > x

Definition at line 2405 of file Block2d.hpp.

template<typename T >
bool slip::operator> ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true iff y > x

Definition at line 3269 of file Array2d.hpp.

template<typename T >
bool slip::operator> ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true iff y > x
Precondition
x.size() == y.size()

Definition at line 3743 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator> ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff y > x

Definition at line 4098 of file Matrix.hpp.

template<typename T >
bool slip::operator>= ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
inline

Definition at line 509 of file Vector3d.hpp.

template<typename T >
bool slip::operator>= ( const Vector4d< T > &  x,
const Vector4d< T > &  y 
)
inline

Definition at line 527 of file Vector4d.hpp.

template<typename T >
bool slip::operator>= ( const Vector2d< T > &  x,
const Vector2d< T > &  y 
)
inline

Definition at line 501 of file Vector2d.hpp.

template<typename T , std::size_t NS, std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator>= ( const slip::block4d< T, NS, NP, NR, NC > &  x,
const slip::block4d< T, NS, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block4d to compare
ysecond block4d to compare return true if x >= y
Precondition
x.dim() == y.dim()

Definition at line 554 of file Block4d.hpp.

template<typename T , std::size_t NP, std::size_t NR, std::size_t NC>
bool slip::operator>= ( const slip::block3d< T, NP, NR, NC > &  x,
const slip::block3d< T, NP, NR, NC > &  y 
)
inline
Parameters
xfirst block3d to copare
ysecond block3d to copare return true if x >= y
Precondition
x.dim() == y.dim()

Definition at line 545 of file Block3d.hpp.

template<typename T >
bool slip::operator>= ( const Array< T > &  x,
const Array< T > &  y 
)
inline
Parameters
xA Array
yA Array of the same type of x
Returns
true iff !(x < y)

Definition at line 1485 of file Array.hpp.

template<typename T , std::size_t N>
bool slip::operator>= ( const block< T, N > &  x,
const block< T, N > &  y 
)
inline
Parameters
xA block
yA block of the same type of x
Returns
true iff !(x < y)

Definition at line 784 of file Block.hpp.

template<typename T , std::size_t N>
bool slip::operator>= ( const kvector< T, N > &  x,
const kvector< T, N > &  y 
)
inline
Parameters
xA kvector
yA kvector of the same type of x
Returns
true iff !(x < y)
Precondition
x.size() == y.size()

Definition at line 1666 of file KVector.hpp.

template<typename T >
bool slip::operator>= ( const slip::Matrix3d< T > &  x,
const slip::Matrix3d< T > &  y 
)
inline
Parameters
xA Matrix3d
yA Matrix3d of the same type of x
Returns
true iff !(x < y)

Definition at line 5432 of file Matrix3d.hpp.

template<typename T >
bool slip::operator>= ( const Vector< T > &  x,
const Vector< T > &  y 
)
inline
Parameters
xA Vector
yA Vector of the same type of x
Returns
true iff !(x < y)

Definition at line 2232 of file Vector.hpp.

template<typename T >
bool slip::operator>= ( const Polynomial< T > &  x,
const Polynomial< T > &  y 
)
inline
Parameters
xA Polynomial
yA Polynomial of the same type of x
Returns
true iff !(x < y)

Definition at line 1464 of file Polynomial.hpp.

template<typename T >
bool slip::operator>= ( const slip::Array4d< T > &  x,
const slip::Array4d< T > &  y 
)
inline
Parameters
xA Array4d
yA Array4d of the same type of x
Returns
true iff !(x < y)

Definition at line 4804 of file Array4d.hpp.

template<typename T >
bool slip::operator>= ( const Signal< T > &  x,
const Signal< T > &  y 
)
inline
Parameters
xA Signal
yA Signal of the same type of x
Returns
true iff !(x < y)

Definition at line 2245 of file Signal.hpp.

template<typename T >
bool slip::operator>= ( const slip::HyperVolume< T > &  x,
const slip::HyperVolume< T > &  y 
)
inline
Parameters
xA HyperVolume
yA HyperVolume of the same type of x
Returns
true iff !(x < y)

Definition at line 4777 of file HyperVolume.hpp.

template<typename T >
bool slip::operator>= ( const slip::Volume< T > &  x,
const slip::Volume< T > &  y 
)
inline
Parameters
xA Volume
yA Volume of the same type of x
Returns
true iff !(x < y)

Definition at line 5751 of file Volume.hpp.

template<typename T >
bool slip::operator>= ( const slip::Array3d< T > &  x,
const slip::Array3d< T > &  y 
)
inline
Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff !(x < y)

Definition at line 5310 of file Array3d.hpp.

template<typename T >
bool slip::operator>= ( const slip::Matrix4d< T > &  x,
const slip::Matrix4d< T > &  y 
)
inline
Parameters
xA Matrix4d
yA Matrix4d of the same type of x
Returns
true iff !(x < y)

Definition at line 4785 of file Matrix4d.hpp.

template<typename T , std::size_t NR, std::size_t NC>
bool slip::operator>= ( const slip::block2d< T, NR, NC > &  x,
const slip::block2d< T, NR, NC > &  y 
)
inline
Parameters
xA block2d
yA block2d of the same type of x
Returns
true iff !(x < y)

Definition at line 2421 of file Block2d.hpp.

template<typename T >
bool slip::operator>= ( const slip::Array2d< T > &  x,
const slip::Array2d< T > &  y 
)
inline
Parameters
xA Array2d
yA Array2d of the same type of x
Returns
true iff !(x < y)

Definition at line 3285 of file Array2d.hpp.

template<typename T >
bool slip::operator>= ( const slip::GrayscaleImage< T > &  x,
const slip::GrayscaleImage< T > &  y 
)
inline
Parameters
xA GrayscaleImage
yA GrayscaleImage of the same type of x
Returns
true iff !(x < y)
Precondition
x.size() == y.size()

Definition at line 3761 of file GrayscaleImage.hpp.

template<typename T >
bool slip::operator>= ( const slip::Matrix< T > &  x,
const slip::Matrix< T > &  y 
)
inline
Parameters
xA Matrix
yA Matrix of the same type of x
Returns
true iff !(x < y)

Definition at line 4114 of file Matrix.hpp.

template<typename Real >
Real slip::osher_sethian_minus ( const Real  gplus,
const Real  gminus 
)
inline

Definition at line 1081 of file derivatives.hpp.

template<typename Real >
Real slip::osher_sethian_plus ( const Real  gplus,
const Real  gminus 
)
inline

Definition at line 1068 of file derivatives.hpp.

template<typename VectorIterator1 , typename VectorIterator2 , typename MatrixIterator >
void slip::outer_product ( VectorIterator1  V_begin,
VectorIterator1  V_end,
VectorIterator2  W_begin,
VectorIterator2  W_end,
MatrixIterator  R_up,
MatrixIterator  R_bot 
)
inline

Computes the hermitian outer product of the vector V and the transpose of the conjugate of the vector W:

\[ R = V \times W^{H} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
V_beginiterator on the first element of V
V_enditerator on the last element of V
W_beginiterator on the first element of W
W_enditerator on the last element of W
R_up2d iterator on the upper_left element of the result matrix
R_bot2d iterator on the bottom_right element of the result matrix
Precondition
Matrix and Vector are supposed to be allocated first
R.rows() == V.size()
R.cols() == W.size()
Example:
slip::iota(Vout1.begin(),Vout1.end(),
std::complex<double>(1.0,1.0),
std::complex<double>(1.0,1.0));
std::cout<<"Vout1 = "<<std::endl;
std::cout<<Vout1<<std::endl;
slip::iota(Vout2.begin(),Vout2.end(),
std::complex<double>(2.0,1.0),
std::complex<double>(1.0,1.0));
std::cout<<"Vout2 = "<<std::endl;
std::cout<<Vout2<<std::endl;
slip::Matrix<std::complex<double> > Aout(Vout1.size(),Vout2.size());
slip::outer_product(Vout1.begin(),Vout1.end(),
Vout2.begin(),Vout2.end(),
Aout.upper_left(),Aout.bottom_right());
std::cout<<"Aout = "<<std::endl;
std::cout<<Aout<<std::endl;

Definition at line 2739 of file linear_algebra.hpp.

template<typename MatrixIterator >
int slip::partial_pivot ( MatrixIterator  M_up,
MatrixIterator  M_bot 
)
inline

Returns the partial pivot of a 2d range.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/08/25
Since
1.0.0
Version
0.0.1
Parameters
M_up2D iterator on the upper_left element of M container
M_bot2D iterator on the bottom_right element of M container
Returns
row position of partial pivot (-1 if all pivot are null)

Definition at line 4909 of file linear_algebra.hpp.

template<class Matrix , class OutputMatrix >
void slip::pca_adaptative_metric ( const Matrix &  data,
OutputMatrix &  metric 
)
inline

Get adaptative metric for PCA computation.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
datacontainer of all datas
metricMetric used
Precondition
data.rows() >= data.cols()
metric.rows() == data.cols()
metric.rows() == metric.cols()

Definition at line 129 of file pca.hpp.

template<class Matrix , class OutputMatrix >
void slip::pca_center_data ( const Matrix &  data,
OutputMatrix &  centerdata,
const bool  normalize_data = false 
)
inline

Get uniform metric for PCA computation.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
datacontainer of all datas
centerdatacontainer of all centered datas
normalize_dataNeed to normalize data dividing by stddev or not ?
Precondition
data.rows() >= data.cols()
data.rows() == centerdata.rows()
data.cols() == centerdata.cols()

Definition at line 177 of file pca.hpp.

template<class Matrix , class Matrix2 , class OutputMatrix , class OutputVector >
void slip::pca_computation ( const Matrix &  data,
OutputMatrix &  acp,
const Matrix2 &  metric,
OutputVector &  eigenval 
)
inline

Compute the PCA (data need to be centered)

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
datacontainer of all datas (prefered centered data)
acpACP result matrix
metricMetric used
eigenvalVector of Eigen values of the variance covariance matrix
Precondition
acp.rows() == data.rows()
acp.cols() == data.cols()
data.rows() >= data.cols()
eigenval.size() == data.cols()
metric.rows() == data.cols()
metric.rows() == metric.cols()

Definition at line 240 of file pca.hpp.

template<class Matrix , class Matrix2 , class OutputMatrix >
void slip::pca_data_reduction ( const Matrix &  data,
const Matrix2 &  metric,
OutputMatrix &  result,
const std::size_t &  nbaxis,
const bool  normalize_data = false 
)
inline

Data reduction using ACP.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
datacontainer of all datas
metricMetric used
resultresult container
nbaxisNumber of axis needed
normalize_dataNormalize initial data dividing by stddev ?
Precondition
data.rows() >= data.col()
data.rows() == result.rows()
nraxis <= data.col()
metric.rows() == data.col()
metric.rows() == metric.cols()

Definition at line 331 of file pca.hpp.

template<class Matrix , class Matrix2 , class OutputMatrix >
void slip::pca_data_reduction ( const Matrix &  data,
const Matrix2 &  metric,
OutputMatrix &  result,
const bool  normalize_data = false 
)
inline

Data reduction using ACP.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
datacontainer of all datas
metricMetric used
resultresult container (size define the data reduction)
normalize_dataNormalize initial data dividing by stddev ?
Precondition
Matrix must have the double bracket element accessor
Matrix and Vector are supposed to be allocated first
Matrix must have cols() and rows() methods
data.rows() >= data.cols()
result.rows() = data.rows()
result.cols() <= data.cols()
metric.rows() = data.cols()
metric.rows() = metric.cols()

Definition at line 380 of file pca.hpp.

template<class Matrix , class OutputMatrix >
void slip::pca_simple_data_reduction_axis ( const Matrix &  acp,
OutputMatrix &  result,
const std::size_t &  nbaxis 
)
inline

Reduce ACP data.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
acpcontainer of the acp
resultcontainer of the resulting datas
nbaxisNumber of axis after reduction
Precondition
acp.rows() == result.rows()
nbaxis <= acp.cols()
acp.rows() >= acp.cols()

Definition at line 295 of file pca.hpp.

template<class OutputMatrix >
void slip::pca_uniform_metric ( OutputMatrix &  metric)
inline

Get uniform metric for PCA computation.

Author
Julien Dombre <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/06/25
Since
1.0.0
Version
0.0.1
Parameters
metricMetric used
Precondition
Matrix must have the double bracket element accessor
Matrix and Vector are supposed to be allocated first
metric.rows() >= metric.cols()
metric.rows() == metric.cols()

Definition at line 107 of file pca.hpp.

template<class Matrix1 , class Matrix2 >
void slip::pinv ( const Matrix1 &  A,
Matrix2 &  Ainv 
)
inline

Pseudo inverse of a matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/03/13
Since
1.0.0
Version
0.0.1
Parameters
Amatrix to invert.
Ainvinverted matrix.
Precondition
A.rows() >= A.cols()
A.rows() == Ainv.cols()
A.cols() == Ainv.rows()
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0, 33.0 , 37.0, 11.0};
std::fill(Msol.col_begin(0),Msol.col_end(0),1.0);
std::copy(x,x+12,Msol.col_begin(1));
std::copy(y,y+12,Bsol.begin());
std::cout<<"Msol = \n"<<Msol<<std::endl;
slip::Matrix<double> Msolinv(2,12);
slip::pinv(Msol,Msolinv);
std::cout<<"Msolinv = \n"<<Msolinv<<std::endl;
slip::matrix_vector_multiplies(Msolinv,Bsol,Xsol);
std::cout<<"Xsol = \n"<<Xsol<<std::endl;

Definition at line 1274 of file linear_algebra_svd.hpp.

template<typename MatrixIterator >
int slip::pivot_max ( MatrixIterator  M_up,
MatrixIterator  M_bot 
)
inline

Returns the row position of the maximum partial pivot of a 2d range.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/08/25
Since
1.0.0
Version
0.0.1
Parameters
M_up2D iterator on the upper_left element of M container
M_bot2D iterator on the bottom_right element of M container
Returns
row position of maximum pivot (-1 if all pivot are null)

Definition at line 4877 of file linear_algebra.hpp.

int slip::plt_get_file_type ( std::ifstream &  fp)

Read a binary tecplot file, move the stream pointer and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file path name.
Example:
// Read the header of the "test_3D.plt" file and get the file type (Full, Grid only or Solution only).
std::string file_name="test_3D.plt";
std::ifstream fp (file_name.c_str(), std::ios::in|std::ios::binary);
std::cout<<"The file type is :"<<std::flush;
{
case 0:
std::cout<<"Full"<<std::endl;
break;
case 1:
std::cout<<"Grid only"<<std::endl;
break;
case 2:
std::cout<<"Solution only"<<std::endl;
break;
default:
std::cout<<"Bad type"<<std::endl;
break;
}

Definition at line 224 of file tecplot_binaries.hpp.

int slip::plt_get_file_type ( const std::string &  file_path_name)

Read a binary tecplot file, move the stream pointer and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file path name.
Example:
// Read the header of the "test_3D.plt" file and get the file type (Full, Grid only or Solution only).
std::string file_name="test_3D.plt";
std::cout<<"The file type is :"<<std::flush;
switch( slip::plt_get_file_type(file_name) );
{
case 0:
std::cout<<"Full"<<std::endl;
break;
case 1:
std::cout<<"Grid only"<<std::endl;
break;
case 2:
std::cout<<"Solution only"<<std::endl;
break;
default:
std::cout<<"Bad type"<<std::endl;
break;
}

Definition at line 289 of file tecplot_binaries.hpp.

int slip::plt_get_order ( std::ifstream &  fp)

Read a binary tecplot file, move the stream pointer and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file path name.
Example:
// Read the header of the "test_3D.plt" file and get the file type (Full, Grid only or Solution only).
std::string file_name="test_3D.plt";
std::ifstream fp (file_name.c_str(), std::ios::in|std::ios::binary);
std::cout<<"The file order is :"<< slip::plt_get_order(fp) <<std::endl;

Definition at line 145 of file tecplot_binaries.hpp.

int slip::plt_get_order ( const std::string &  file_path_name)

Read a binary tecplot file, move the stream pointer and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file path name.
Example:
// Read the header of the "test_3D.plt" file and get the file type (Full, Grid only or Solution only).
std::string file_name="test_3D.plt";
std::cout<<"The file order is :"<< slip::plt_get_order(file_name) <<std::endl;

Definition at line 188 of file tecplot_binaries.hpp.

void slip::plt_read_header ( std::ifstream &  fp,
int &  NbVars,
int &  NbZones,
int &  K,
int &  I,
int &  J,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
double &  SolTime,
int  NumZone = 1 
)

Read a binary tecplot file, move the stream pointer and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file path name.
NbVarsNumber of variables.
NbZonesNumber of zones.
KNumber of slices.
INumber of rows.
JNumber of cols.
titleString for the frame title.
titleString for the zone name.
varnamesVector containing the variable names.
SolTimeSolution Time.
Example:
// Read the header of the "test_3D.plt" file and get the number of variables, the number of zones, K, I, J and the Solution Time.
std::string file_name="test_3D.plt";
std::ifstream fp (file_name.c_str(), std::ios::in|std::ios::binary);
int NbVars, NbZones, Kmax, Imax, Jmax, NumZone=1;
std::string title, zonename;
std::vector<std::string> varnames;
double SolTime;
slip::plt_read_header(fp, NbVars, NbZones, Kmax, Imax, Jmax, title, zonename, varnames, SolTime, NumZone);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The file contains : "<<NbVars<<" variables and "<<NbZones<<" zones."<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<NbVars; ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the zone number "<<NumZone<<" : "<<Kmax<<", "<<Imax<<", "<<Jmax<<std::endl;
std::cout<<"The Solution Time is : "<<SolTime<<std::endl;

Definition at line 330 of file tecplot_binaries.hpp.

void slip::plt_read_header ( std::ifstream &  fp,
int &  NbVars,
int &  NbZones,
int &  K,
int &  I,
int &  J,
int  NumZone = 1 
)

Read a binary tecplot file and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
fpInput stream to the file.
NbVarsNumber of variables.
NbZonesNumber of zones.
KNumber of slices.
INumber of rows.
JNumber of cols.
NumZoneIndex of the zone for which the I, J and K are extracted. This parameter is optional and the first zone is extracted by default.
Example:
// Read the header of the "test_3D.plt" file and get the number of variables, the number of zones, K, I and J.
std::string file_name="test_3D.plt";
std::ifstream fp (file_name.c_str(), std::ios::in|std::ios::binary);
int NbVars, NbZones, Kmax, Imax, Jmax, NumZone=1;
slip::plt_read_header(fp, NbVars, NbZones, Kmax, Imax, Jmax, NumZone);
std::cout<<"The file contains : "<<NbVars<<" variables and "<<NbZones<<" zones."<<std::endl;
std::cout<<"The dimensions of the zone number "<<NumZone<<" : "<<Kmax<<", "<<Imax<<", "<<Jmax<<std::endl;

Definition at line 672 of file tecplot_binaries.hpp.

void slip::plt_read_header ( const std::string &  file_path_name,
int &  NbVars,
int &  NbZones,
int &  K,
int &  I,
int &  J,
int  NumZone = 1 
)

Read a binary tecplot file and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
NbVarsNumber of variables.
NbZonesNumber of zones.
KNumber of slices.
INumber of rows.
JNumber of cols.
NumZoneIndex of the zone for which the I, J and K are extracted. This parameter is optional and the first zone is extracted by default.
Example:
// Read the header of the "test_3D.plt" file and get the number of variables, the number of zones, K, I and J.
std::string file_name="test_3D.plt";
int NbVars, NbZones, Kmax, Imax, Jmax, NumZone=1;
slip::plt_read_header(file_name, NbVars, NbZones, Kmax, Imax, Jmax, NumZone);
std::cout<<"The file contains : "<<NbVars<<" variables and "<<NbZones<<" zones."<<std::endl;
std::cout<<"The dimensions of the zone number "<<NumZone<<" : "<<Kmax<<", "<<Imax<<", "<<Jmax<<std::endl;

Definition at line 703 of file tecplot_binaries.hpp.

void slip::plt_read_header ( const std::string &  file_path_name,
int &  NbVars,
int &  NbZones,
int &  K,
int &  I,
int &  J,
double &  SolTime,
int  NumZone = 1 
)

Read a binary tecplot file and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
NbVarsNumber of variables.
NbZonesNumber of zones.
KNumber of slices.
INumber of rows.
JNumber of cols.
SolTimeSolution time.
NumZoneIndex of the zone for which the I, J and K are extracted. This parameter is optional and the first zone is extracted by default.
Example:
// Read the header of the "test_3D.plt" file and get the number of variables, the number of zones, K, I, J and the Solution Time.
std::string file_name="test_3D.plt";
int NbVars, NbZones, Kmax, Imax, Jmax, NumZone=1;
double SolTime;
slip::plt_read_header(file_name, NbVars, NbZones, Kmax, Imax, Jmax, SolTime, NumZone);
std::cout<<"The file contains : "<<NbVars<<" variables and "<<NbZones<<" zones."<<std::endl;
std::cout<<"The dimensions of the zone number "<<NumZone<<" : "<<Kmax<<", "<<Imax<<", "<<Jmax<<std::endl;
std::cout<<"The Solution Time is : "<<SolTime<<std::endl;

Definition at line 738 of file tecplot_binaries.hpp.

void slip::plt_read_header ( const std::string &  file_path_name,
int &  NbVars,
int &  NbZones,
int &  K,
int &  I,
int &  J,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
double &  SolTime,
int  NumZone = 1 
)

Read a binary tecplot file and return header informations.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
NbVarsNumber of variables.
NbZonesNumber of zones.
KNumber of slices.
INumber of rows.
JNumber of cols.
SolTimeSolution time.
NumZoneIndex of the zone for which the I, J and K are extracted. This parameter is optional and the first zone is extracted by default.
Example:
// Read the header of the "test_3D.plt" file and get the number of variables, the number of zones, K, I, J and the Solution Time.
std::string file_name="test_3D.plt";
int NbVars, NbZones, Kmax, Imax, Jmax, NumZone=1;
std::string title, zonename;
std::vector<std::string> varnames;
double SolTime;
slip::plt_read_header(file_name, NbVars, NbZones, Kmax, Imax, Jmax, title, zonename, varnames, SolTime, NumZone);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The file contains : "<<NbVars<<" variables and "<<NbZones<<" zones."<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<NbVars; ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the zone number "<<NumZone<<" : "<<Kmax<<", "<<Imax<<", "<<Jmax<<std::endl;
std::cout<<"The Solution Time is : "<<SolTime<<std::endl;

Definition at line 778 of file tecplot_binaries.hpp.

template<typename Container2d >
void slip::plt_to_Array2d ( const std::string &  file_path_name,
Container2d &  reg,
const int  zone_loaded = 1 
)

Read a binary tecplot file and put the data in a 2d container.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regContainer2d for the read data.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_3D.plt" file and put the data in the container2d Reg.
std::string file_name="test_3D.plt";
plt_to_Array2d(file_name, Reg);
std::cout<<"The dimensions of the array are "<<Reg.dim1()<<", "<<Reg.dim2()<<std::endl;

Definition at line 803 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::plt_to_RegularVector2dField2d ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
const int  zone_loaded = 1 
)

Read a slip::RegularVector2dField2d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
titleTitle of the tecplot frame.
zoneName of the tecplot zone.
varnamesVector containing the variable names.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_2D.plt" file, put the data in the container2d Reg and get the title, zone name and variable names.
std::string file_name="test_2D.plt", title, zonename;
std::vector<std::string> varnames;
plt_to_RegularVector2dField2d(file_name, Reg, title, zonename, varnames);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<varnames.size(); ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the RegularVector2dField2d are "<<Reg.dim1()<<", "<<Reg.dim2()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 2003 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::plt_to_RegularVector2dField2d ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
const int  zone_loaded = 1 
)

Read a slip::RegularVector2dField2d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_2D.plt" file and put the data in the container3d Reg.
std::string file_name="test_2D.plt";
std::cout<<"The dimensions of the RegularVector2dField2d are "<<Reg.dim1()<<", "<<Reg.dim2()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 2292 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::plt_to_RegularVector3dField3d ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
std::string &  title,
std::string &  zonename,
std::vector< std::string > &  varnames,
const int  zone_loaded = 1 
)

Read a slip::RegularVector3dField3d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
titleTitle of the tecplot frame.
zonenameName of the tecplot zone.
varnamesName of all the variables.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_3D.plt" file, put the data in the container3d Reg and get the title, zone name and variable names.
std::string file_name="test_3D.plt", title, zonename;
std::vector<std::string> varnames;
plt_to_RegularVector3dField3d(file_name, Reg, title, zonename, varnames);
std::cout<<"The file title is : \""<<title<<"\" and the zone name is \""<<zonename<<"\""<<std::endl;
std::cout<<"The variable names are : "<<std::endl;
for (size_t i=0; i<varnames.size(); ++i)
std::cout<<varnames[i]<<std::endl;
std::cout<<"The dimensions of the RegularVector3dField3d are "<<Reg.dim1()<<", "<<Reg.dim2()<<", "<<Reg.dim3()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 990 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::plt_to_RegularVector3dField3d ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
const int  zone_loaded = 1 
)

Read a slip::RegularVector3dField3d from a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
zone_loadedZone index to read (1 by default).
Example:
// Read the "test_3D.plt" file and put the data in the container3d Reg.
std::string file_name="test_3D.plt";
std::cout<<"The dimensions of the RegularVector3dField3d are "<<Reg.dim1()<<", "<<Reg.dim2()<<", "<<Reg.dim3()<<std::endl;
std::cout<<"The init_point is "<<Reg.get_init_point()<<std::endl;
std::cout<<"The grid_step is "<<Reg.get_grid_step()<<std::endl;

Definition at line 1298 of file tecplot_binaries.hpp.

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void slip::plus ( InputIterator1  __first1,
InputIterator1  __last1,
InputIterator2  __first2,
OutputIterator  __result 
)
inline

Computes the addition of two ranges.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
__first1An InputIterator.
__last1An InputIterator.
__first2An InputIterator.
__resultAn OutputIterator.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
//additon of two Array2d
slip::iota(M.begin(),M.end(),1,1);
slip::plus(M.begin(),M.end(),M2.begin(),M3.begin());

Definition at line 125 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Predicate >
void slip::plus_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
_InputIterator2  __first2,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Computes the addition of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__first2An input iterator.
__resultAn output iterator.
__predA predicate.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example:
// addtion of two Array2d according to a Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::plus_if(v1.begin(),v1.end(),
v2.begin(),
v3.begin(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 267 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator >
void slip::plus_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
_InputIterator2  __first2,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Computes the addition of two ranges according to a mask sequence.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/04
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
__first2An input iterator.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
The two ranges and the result range must have the same value type.
[__first1,__last1) is a valid range.
[__first2,__first2 + (__last1 - __first1)) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1) or ]__first2,__first2 + (__last1 - __first1)).
Example1:
// addtion of two Array2d
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::plus_mask(v1.begin(),v1.end(),
mask.begin(),
v2.begin(),
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::plus_mask(v1.begin(),v1.end(),
maskint.begin(),
v2.begin(),
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 202 of file arithmetic_op.hpp.

template<typename InputIterator1 , typename OutputIterator >
void slip::plus_scalar ( InputIterator1  __first1,
InputIterator1  __last1,
const typename std::iterator_traits< InputIterator1 >::value_type &  scalar,
OutputIterator  __result 
)
inline

Adds a scalar to a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An InputIterator.
__last1An InputIterator.
scalarA scalar value.
__resultAn OutputIterator.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
//adds 5 to M
slip::iota(M.begin(),M.end(),1,1);
slip::plus_scalar(M.begin(),M.end(),5,M3.begin());

Definition at line 1269 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _OutputIterator , typename _Predicate >
void slip::plus_scalar_if ( _InputIterator1  __first1,
_InputIterator1  __last1,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
_Predicate  __pred 
)
inline

Adds a scalar to a range according to a Predicate.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
scalarA scalar value.
__resultAn output iterator.
__predA predicate.
Precondition
[__first1,__last1) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example:
// adds 5 to v1 according to the Predicate lt5Predicate.
template <typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> v3(v1.size());
slip::plus_scalar_if(v1.begin(),v1.end(),
5,
v3.begin(),
lt5Predicate<int>);
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1393 of file arithmetic_op.hpp.

template<typename _InputIterator1 , typename _MaskIterator , typename _OutputIterator >
void slip::plus_scalar_mask ( _InputIterator1  __first1,
_InputIterator1  __last1,
_MaskIterator  __mask_first,
const typename std::iterator_traits< _InputIterator1 >::value_type &  scalar,
_OutputIterator  __result,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)
inline

Adds a scalar to a range according to a mask sequence.

Author
Tremblais Benoit <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/23
Since
1.0.0
Version
0.0.1
Parameters
__first1An input iterator.
__last1An input iterator.
__mask_firstAn input iterator.
scalarA scalar value.
__resultAn output iterator.
valuetrue value of the mask range. Default is 1.
Precondition
[__first1,__last1) is a valid range.
[__mask_first,__mask_first + (__last1 - __first1)) is a valid range.
[__result,__result + (__last1 - __first1)) is a valid range.
__result is not an iterator within the range ]__first1,__last1)
Example1:
// adds 5 to v1
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
slip::Array<int> v3(v1.size());
slip::plus_scalar_mask(v1.begin(),v1.end(),
mask.begin(),
5,
v3.begin());
std::cout<<"v3 = "<<v3<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::Array<int> maskint(v1.size());
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
slip::Array<int> v3(v1.size());
slip::plus_scalar_mask(v1.begin(),v1.end(),
maskint.begin(),
5,
v3.begin(),
int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 1335 of file arithmetic_op.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::pncc ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the pseudo normalized crosscorrelation between two sequences: $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean1 = slip::mean<float>(M.begin(),M.end());
float mean2 = slip::mean<float>(M2.begin(),M2.end());
std::cout<<slip::pncc<float>(M.begin(),M.end(),M2.begin(),mean1,mean2)<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
float mean_motif = slip::mean<float>(Motif.begin(),Motif.end());
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
float meanI = slip::mean<float>(I.upper_left(box),I.bottom_right(box));
Result[i/8][j/8] = slip::pncc<float>(I.upper_left(box),I.bottom_right(box),Motif.begin(),meanI,mean_motif);
}
}

Definition at line 1022 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::pncc_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard pseudo normalized crosscorrelation between two sequences according to a Predicate. $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/01/03
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
float mean_if1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean_if2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::pncc_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean_if1,mean_if2)<<std::endl;

Definition at line 1120 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::pncc_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the pseudo normalized crosscorrelation between two sequences according to a mask sequence : $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/01/03
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::pncc_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),mean1,mean2,1)<<std::endl;

Definition at line 1069 of file correlation.hpp.

template<typename T , typename Integer >
T slip::power ( x,
Integer  N 
)
inline

function to compute.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/28
Since
1.0.0
Version
0.0.1
Parameters
xThe element to power
NThe power.
Returns
the nth power of x
Precondition
N >=0
Example:
std::cout<<" 2.4 power 8 = "<<slip::power(2.0,8)<<std::endl;

Definition at line 368 of file macros.hpp.

template<typename Container >
void slip::print ( const Container &  C,
const std::string &  name = "" 
)

Print the name of the container follow by the values of the container in a terminal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2009/03/26
Since
1.0.0
Parameters
CContainer to print.
nameName of the container to print
Example:
Example:
float f = 1.2f
slip::print(f,"I");
Examples:
test_algo.cpp.

Definition at line 246 of file io_tools.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::pseudo_normalized_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the pseudo normalized crosscorrelation between two sequences: $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first,last) is a valid range.
[first2,first2 + (last - first)) is a valid range.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::pseudo_normalized_crosscorrelation<float>(M.begin(),M.end(),M2.begin())<<std::endl;
float mean1 = slip::mean<float>(M.begin(),M.end());
float mean2 = slip::mean<float>(M2.begin(),M2.end());
std::cout<<slip::pseudo_normalized_crosscorrelation<float>(M.begin(),M.end(),M2.begin(),mean1,mean2)<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::pseudo_normalized_correlation<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 828 of file correlation.hpp.

template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::pseudo_normalized_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the pseudo normalized crosscorrelation between two Images.

Author
Denis Arrivault <denis.arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/30
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
Precondition
[in1_upper_left,in1_bottom_right) is valid
[in2_upper_left,in2_upper_left + (in1_bottom_right - in1_upper_left)) must be valid.
(out_bottom_right - out_upper_left) == (in1_bottom_right - in1_upper_left)
the value_type of the input sequences have to be real (not complex)

Definition at line 2178 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::pseudo_normalized_crosscorrelation_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type() 
)
inline

Computes the standard pseudo normalized crosscorrelation between two sequences according to a Predicate. $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/01/03
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
Returns
A value equals to the centered crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
slip::Matrix<float> M1(2,3,f1);
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
slip::Matrix<float> M2(2,3,f2);
float mean1 = slip::mean_if<float>(M1.begin(),M1.end(),lt5Predicate<float>);
float mean2 = slip::mean_if<float>(M2.begin(),M2.end(),lt5Predicate<float>);
std::cout<<slip::pseudo_normalized_crosscorrelation_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>,mean1,mean2)<<std::endl;

Definition at line 947 of file correlation.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::pseudo_normalized_crosscorrelation_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< InputIterator1 >::value_type  mean1 = typename std::iterator_traits<InputIterator1>::value_type(),
typename std::iterator_traits< InputIterator1 >::value_type  mean2 = typename std::iterator_traits<InputIterator2>::value_type(),
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the pseudo normalized crosscorrelation between two sequences according to a mask sequence : $ \frac{\sum_i x_i y_i}{\sum_i (x_i-mean(x))(y_i-mean(y))} $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/01/03
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn InputIterator.
first2An InputIterator.
mean1mean value of the first range [first,last).
mean2mean value of the second range [first2, first2 + (last-first)).
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the normalized crosscorrelation of the two sequences
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
float mean1 = slip::mean_mask<float>(M1.begin(),M1.end(),Mask.begin(),1);
float mean2 = slip::mean_mask<float>(M2.begin(),M2.end(),Mask.begin(),1);
std::cout<<slip::pseudo_normalized_crosscorrelation_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),mean1,mean2,1)<<std::endl;

Definition at line 883 of file correlation.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 >
Value_T slip::psnr ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Value_T  d = static_cast<Value_T>(255) 
)
inline
Author
Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
Date
2010/03/01
Since
1.2.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator. for the second datas
Precondition
The two ranges must have the same value type.
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
//compute PSNR
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::psnr<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 2067 of file compare.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Value_T slip::psnr_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
Value_T  d = static_cast<Value_T>(255) 
)
inline
Author
Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
Date
2010/03/01
Since
1.2.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate
Precondition
The two ranges must have the same value type.
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::psnr_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 2163 of file compare.hpp.

template<typename Value_T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Value_T slip::psnr_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask1,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1),
Value_T  d = static_cast<Value_T>(255) 
)
inline
Author
Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
Date
2010/03/01
Since
1.2.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask1An InputIterator.
first2An InputIterator.
valueAn value corresponding to the mask
Precondition
The two ranges must have the same value type.
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
//compute PSNR
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::psnr_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 2112 of file compare.hpp.

template<typename Real >
Real slip::pythagore ( const Real &  x,
const Real &  y 
)
inline

Computes $ (x^2+y^2)^\frac{1}{2}$ without destructive underflow or overflow.

Author
Julien Dombre dombr.nosp@m.e@un.nosp@m.iv-po.nosp@m.itie.nosp@m.rs.fr
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : adaptator
Date
2008/03/05
Since
1.0.0
Version
0.0.2
Parameters
xfirst value
ysecond value
Returns
solution

Definition at line 289 of file macros.hpp.

template<class InputIter_T , class Iter_T >
void slip::radix2_fft ( InputIter_T  a,
Iter_T  b,
const int  log2n 
)
inline

Computes the Cooley-Tukey (radix2) fft of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/23
Since
1.0.0
Version
0.0.2
Parameters
aA BidirectionalIterator to iterate throw the input data
bA BidirectionalIterator to iterate throw the output data
log2nCorresponds to log2(size(a)).
Precondition
size(a) == size(b).
Example:
typedef std::complex<double> cx;
cx a[] = { cx(0,0), cx(1,1), cx(3,3), cx(4,4), cx(4,4), cx(3,3),cx(1,1),cx(0,0)};
cx b[8];
for(int i = 0; i < 8; ++i)
std::cout<<b[i]<<" ";
std::cout<<std::endl;

Definition at line 292 of file FFT.hpp.

template<typename InputIterator1d , typename OuputIterator1d >
void slip::radix2_fft1d2d ( InputIterator1d  begin1,
OuputIterator1d  begin2,
std::size_t  nb_lig,
std::size_t  nb_col 
)
inline

Computes the radix 2 fft2d of a container with 1d iterator (compatible with simple pointers).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/11/19
Since
1.0.0
Version
0.0.1
Parameters
begin1The begin iterator of the first container
begin2The begin iterator of the second container
nb_ligThe number of rows
nb_colThe number of columns
Precondition
The data have to be 2D datas registered linearly (the first row just before the second row and so on...)
Both container must have the same dimensions
Dimensions must be power of 2
Example:
I.read("lena.gif");
int nblig = I.dim1();
int nbcol = I.dim2();
std::complex<double>* I2 = new std::complex<double>[nblig * nbcol];
//fft1d2d
slip::radix2_fft1d2d(it_row_I_begin,I2,nblig,nbcol);
//log(magnitude)
for(size_t i = 0; i < I.dim1(); ++i)
for(size_t j = 0; j < I.dim2(); ++j)
Norm[i][j] = std::log(1.0+std::abs(I2[nbcol * i + j]));
slip::fftshift2d(Norm.upper_left(),Norm.bottom_right());
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("lena_fft.gif");

Definition at line 450 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::radix2_fft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the radix2 (Cooley-Tukey) fft2d of a container with 2d iterators.

Since
1.0.0
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
dimensions must be power of 2
the 2d range must have the same sizes
Example:
I.read("lena.gif");
slip::radix2_fft2d(I.upper_left(),I.bottom_right(),I2.upper_left());
//log(magnitude)
for(size_t i = 0; i < I2.dim1(); ++i)
for(size_t j = 0; j < I2.dim2(); ++j)
Norm[i][j] = std::log(1.0+std::abs(I2[i][j]));
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("fft.gif");

Definition at line 559 of file FFT.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::radix2_fft2d ( Matrix1 &  datain,
Matrix2 &  dataout 
)
inline

Computes the radix2 fft2d of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : conceptor
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/11/21
Since
1.0.0
Version
0.0.3
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
dimensions must be power of 2
datain and dataout must have cols and rows iterator
Example:
I.read("lena.gif");
//log(magnitude)
for(size_t i = 0; i < I2.dim1(); ++i)
for(size_t j = 0; j < I2.dim2(); ++j)
Norm[i][j] = std::log(1.0+std::abs(I2[i][j]));
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("fft.gif");

Definition at line 686 of file FFT.hpp.

template<class InputIter_T , class Iter_T >
void slip::radix2_ifft ( InputIter_T  a,
Iter_T  b,
const int  log2n 
)
inline

Computes the inverse Cooley-Tukey (radix2) fft of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/23
Since
1.0.0
Version
0.0.2
Parameters
aA BidirectionalIterator to iterate throw the input data
bA BidirectionalIterator to iterate throw the output data
log2nCorresponds to log2(size(a)).
Precondition
size(a) == size(b).
Example:
...
cx b2[8];
for(int i = 0; i < 8; ++i)
std::cout<<b2[i]<<" ";
std::cout<<std::endl<<std::endl;

Definition at line 351 of file FFT.hpp.

template<typename InputIterator1d , typename OuputIterator1d >
void slip::radix2_ifft1d2d ( InputIterator1d  begin1,
OuputIterator1d  begin2,
std::size_t  nb_lig,
std::size_t  nb_col 
)
inline

Computes the inverse radix 2 fft2d of a container with 1d iterators (compatible with simple pointers).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/11/19
Since
1.0.0
Version
0.0.1
Parameters
begin1The begin iterator of the first container
begin2The begin iterator of the second container
nb_ligThe number of rows
nb_colThe number of columns
Precondition
The data have to be 2D datas registered linearly (the first row just before the second row and so on...)
Both container must have the same dimensions
Dimensions must be power of 2
Example:
...
std::complex<double>* I3 = new std::complex<double>[nblig*nbcol];
//ifft1d2d
slip::radix2_ifft1d2d(I2,I3,nblig,nbcol);
for(size_t i = 0; i < I.dim1(); ++i)
for(size_t j = 0; j < I.dim2(); ++j)
{
Norm[i][j] = std::abs(I3[nbcol * i + j]);
}
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("lena_ifft.gif");

Definition at line 507 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::radix2_ifft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the radix2 ifft2d of a container with 2d iterators.

Since
1.0.0
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
dimensions must be power of 2
the 2d range must have the same sizes
Example:
...
slip::radix2_ifft2d(I2.upper_left(),I2.bottom_right(),I3.upper_left());
for(size_t i = 0; i < I2.dim1(); ++i)
for(size_t j = 0; j < I2.dim2(); ++j)
Norm[i][j] = std::abs(I3[i][j]);
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("ifft.gif");

Definition at line 620 of file FFT.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::radix2_ifft2d ( Matrix1 &  datain,
Matrix2 &  dataout 
)
inline

Computes the radix2 fft2d of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : conceptor
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/11/21
Since
1.0.0
Version
0.0.3
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
dimensions must be power of 2
datain and dataout must have cols and rows iterator
Example:
...
for(size_t i = 0; i < I2.dim1(); ++i)
for(size_t j = 0; j < I2.dim2(); ++j)
Norm[i][j] = std::abs(I3[i][j]);
slip::change_dynamic_01(Norm.begin(),Norm.end(),Norm.begin(),slip::AFFINE_FUNCTION);
Norm.write("ifft.gif");

Definition at line 725 of file FFT.hpp.

template<class RandomAccessIterator1 , class RandomAccessIterator2 , class RandomAccessIterator2d >
void slip::rank1_tensorial_product ( RandomAccessIterator1  base1_first,
RandomAccessIterator1  base1_end,
RandomAccessIterator2  base2_first,
RandomAccessIterator2  base2_end,
RandomAccessIterator2d  matrix_upper_left,
RandomAccessIterator2d  matrix_bottom_right 
)

Computes the tensorial product of two rank one tensors $ R = V \times W^{T} $ it provides a rank2 tensor (Container2d) of size (MxN) if M and N are respectivly the size of V and W.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/07
Since
1.4.0
Version
0.0.1
Parameters
base1_firstiterator on the first element of the first rank one tensor
base1_enditerator on one-past-the-end element of the first rank one tensor
base2_firstiterator on the first element of the second rank one tensor
base2_enditerator on one-past-the-end element of the second rank one tensor
matrix_upper_left2d iterator on the first element of the rank two tensor
matrix_bottom_right2d iterator on the one-past-the-end element of the rank two tensor
Precondition
Containers are supposed to be allocated first
(matrix_bottom_right - matrix_upper_left)[0] == (base1_end - base1_first)
(matrix_bottom_right - matrix_upper_left)[1] == (base2_end - base2_first)
Example1:
slip::iota(Vbase1.begin(),Vbase1.end(),1.0);
std::cout<<"Vbase1 = \n"<<Vbase1<<std::endl;
slip::iota(Vbase2.begin(),Vbase2.end(),2.0);
std::cout<<"Vbase2 = \n"<<Vbase2<<std::endl;
slip::Matrix<double> Tpbase1base2(Vbase1.size(),Vbase2.size());
slip::rank1_tensorial_product(Vbase1.begin(),Vbase1.end(),
Vbase2.begin(),Vbase2.end(),
Tpbase1base2.upper_left(),Tpbase1base2.bottom_right());
std::cout<<"Tpbase1base2 = \n"<<Tpbase1base2<<std::endl;
Example2:
//generate x1 2d chebyshev polynomial base
m01x1.powers[0] = 0;
m01x1.powers[1] = 0;
p0x1.insert(m01x1,1.0);
m11x1.powers[0] = 1;
m11x1.powers[1] = 0;
p1x1.insert(m11x1,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > chebyshev_basis_2d_x1;
chebyshev_basis_2d_x1.push_back(p0x1);
chebyshev_basis_2d_x1.push_back(p1x1);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_2d_x1.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,2> >(l, p1x1, chebyshev_basis_2d_x1[l], chebyshev_basis_2d_x1[l-1]));
}
//print base
for(unsigned l = 0; l < chebyshev_basis_2d_x1.size(); ++l)
{
std::cout<<chebyshev_basis_2d_x1[l]<<std::endl;
}
//Generate 2d x2 Chebyshev basis
m01x2.powers[0] = 0;
m01x2.powers[1] = 0;
p0x2.insert(m01x2,1.0);
m11x2.powers[0] = 0;
m11x2.powers[1] = 1;
p1x2.insert(m11x2,1.0);
std::vector<slip::MultivariatePolynomial<double,2> > chebyshev_basis_2d_x2;
chebyshev_basis_2d_x2.push_back(p0x2);
chebyshev_basis_2d_x2.push_back(p1x2);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_2d_x2.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,2> >(l, p1x2, chebyshev_basis_2d_x2[l], chebyshev_basis_2d_x2[l-1]));
}
for(unsigned l = 0; l < chebyshev_basis_2d_x2.size(); ++l)
{
std::cout<<chebyshev_basis_2d_x2[l]<<std::endl;
}
slip::Matrix<slip::MultivariatePolynomial<double,2> > Chebyshev2dBasis(chebyshev_basis_2d_x1.size(),chebyshev_basis_2d_x1.size());
slip:rank1_tensorial_product(chebyshev_basis_2d_x2.begin(),
chebyshev_basis_2d_x2.end(),
chebyshev_basis_2d_x1.begin(),
chebyshev_basis_2d_x1.end(),
Chebyshev2dBasis.upper_left(),
Chebyshev2dBasis.bottom_right());
std::cout<<"Chebyshev2dBasis \n"<<Chebyshev2dBasis<<std::endl;

Definition at line 2859 of file linear_algebra.hpp.

template<class RandomAccessIterator1 , class RandomAccessIterator2 , class RandomAccessIterator3 , class RandomAccessIterator3d >
void slip::rank1_tensorial_product ( RandomAccessIterator1  base1_first,
RandomAccessIterator1  base1_end,
RandomAccessIterator2  base2_first,
RandomAccessIterator2  base2_end,
RandomAccessIterator3  base3_first,
RandomAccessIterator3  base3_end,
RandomAccessIterator3d  base_front_upper_left,
RandomAccessIterator3d  base_back_bottom_right 
)

Computes the tensorial product of three rank one tensors it provides a rank3 tensor (Container3d) of size (PxMxN) if P, M and N are respectivly the size of V, W and X.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2010/11/07
Since
1.4.0
Version
0.0.1
Parameters
base1_firstiterator on the first element of the first rank one tensor
base1_enditerator on one-past-the-end element of the first rank one tensor
base2_firstiterator on the first element of the second rank one tensor
base2_enditerator on one-past-the-end element of the second rank one tensor
base3_firstiterator on the first element of the third rank one tensor
base3_enditerator on one-past-the-end element of the third rank one tensor
base_front_upper_left3d iterator on the first element of the rank three tensor
base_back_bottom_right3d iterator on the one-past-the-end element of the rank three tensor
Precondition
Containers are supposed to be allocated first
(base_back_bottom_right - base_front_upper_left)[0] == (base1_end - base1_first)
(base_back_bottom_right - base_front_upper_left)[1] == (base2_end - base2_first)
(base_back_bottom_right - base_front_upper_left)[2] == (base3_end - base3_first)
Example1:
slip::iota(Vbase12.begin(),Vbase12.end(),1.0);
std::cout<<"Vbase12 = \n"<<Vbase12<<std::endl;
slip::iota(Vbase22.begin(),Vbase22.end(),2.0);
std::cout<<"Vbase22 = \n"<<Vbase22<<std::endl;
slip::iota(Vbase32.begin(),Vbase32.end(),3.0);
std::cout<<"Vbase32 = \n"<<Vbase32<<std::endl;
slip::Matrix3d<double> Tpbase1base2base3(Vbase12.size(),Vbase22.size(),Vbase32.size());
slip::rank1_tensorial_product(Vbase12.begin(),Vbase12.end(),
Vbase22.begin(),Vbase22.end(),
Vbase32.begin(),Vbase32.end(),
Tpbase1base2base3.front_upper_left(),Tpbase1base2base3.back_bottom_right());
std::cout<<"Tpbase1base2base3 = \n"<<Tpbase1base2base3<<std::endl;
Example2:
std::cout << "Generate 3d Chebyshev basis " << std::endl;
std::cout << "3d x1 polynomial "<< std::endl;
m01x1_3d.powers[0] = 0;
m01x1_3d.powers[1] = 0;
m01x1_3d.powers[2] = 0;
p0x1_3d.insert(m01x1_3d,1.0);
m11x1_3d.powers[0] = 1;
m11x1_3d.powers[1] = 0;
m11x1_3d.powers[2] = 0;
p1x1_3d.insert(m11x1_3d,1.0);
std::vector<slip::MultivariatePolynomial<double,3> > chebyshev_basis_3d_x1;
chebyshev_basis_3d_x1.push_back(p0x1_3d);
chebyshev_basis_3d_x1.push_back(p1x1_3d);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_3d_x1.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,3> >(l, p1x1_3d, chebyshev_basis_3d_x1[l], chebyshev_basis_3d_x1[l-1]));
}
for(unsigned l = 0; l < chebyshev_basis_3d_x1.size(); ++l)
{
std::cout<<chebyshev_basis_3d_x1[l]<<std::endl;
}
std::cout << std::setw(50) << '_' << std::endl;
std::cout << "3d x2 polynomial "<< std::endl;
std::cout << std::setw(50) << '_' << std::endl;
m01x2_3d.powers[0] = 0;
m01x2_3d.powers[1] = 0;
m01x2_3d.powers[2] = 0;
p0x2_3d.insert(m01x2_3d,1.0);
m11x2_3d.powers[0] = 0;
m11x2_3d.powers[1] = 1;
m11x2_3d.powers[2] = 0;
p1x2_3d.insert(m11x2_3d,1.0);
std::vector<slip::MultivariatePolynomial<double,3> > chebyshev_basis_3d_x2;
chebyshev_basis_3d_x2.push_back(p0x2_3d);
chebyshev_basis_3d_x2.push_back(p1x2_3d);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_3d_x2.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,3> >(l, p1x2_3d, chebyshev_basis_3d_x2[l], chebyshev_basis_3d_x2[l-1]));
}
for(unsigned l = 0; l < chebyshev_basis_3d_x2.size(); ++l)
{
std::cout<<chebyshev_basis_3d_x2[l]<<std::endl;
}
std::cout << std::setw(50) << '_' << std::endl;
std::cout << "3d x1, x2 and x3 polynomial tensorial product"<< std::endl;
std::cout << std::setw(50) << '_' << std::endl;
std::cout << std::setw(50) << '_' << std::endl;
std::cout << "3d x3 polynomial "<< std::endl;
std::cout << std::setw(50) << '_' << std::endl;
m01x3_3d.powers[0] = 0;
m01x3_3d.powers[1] = 0;
m01x3_3d.powers[2] = 0;
p0x3_3d.insert(m01x3_3d,1.0);
m11x3_3d.powers[0] = 0;
m11x3_3d.powers[1] = 0;
m11x3_3d.powers[2] = 1;
p1x3_3d.insert(m11x3_3d,1.0);
std::vector<slip::MultivariatePolynomial<double,3> > chebyshev_basis_3d_x3;
chebyshev_basis_3d_x3.push_back(p0x3_3d);
chebyshev_basis_3d_x3.push_back(p1x3_3d);
for(unsigned l = 1; l < 3; ++l)
{
chebyshev_basis_3d_x3.push_back(slip::chebyshev_nd_next<slip::MultivariatePolynomial<double,3> >(l, p1x3_3d, chebyshev_basis_3d_x3[l], chebyshev_basis_3d_x3[l-1]));
}
for(unsigned l = 0; l < chebyshev_basis_3d_x3.size(); ++l)
{
std::cout<<chebyshev_basis_3d_x3[l]<<std::endl;
}
slip::Matrix3d<slip::MultivariatePolynomial<double,3> > Chebyshev3dBasis(chebyshev_basis_3d_x3.size(),chebyshev_basis_3d_x2.size(),chebyshev_basis_3d_x1.size());
slip::rank1_tensorial_product(chebyshev_basis_3d_x3.begin(),
chebyshev_basis_3d_x3.end(),
chebyshev_basis_3d_x2.begin(),
chebyshev_basis_3d_x2.end(),
chebyshev_basis_3d_x1.begin(),
chebyshev_basis_3d_x1.end(),
Chebyshev3dBasis.front_upper_left(),
Chebyshev3dBasis.back_bottom_right());
std::cout<<"Chebyshev3dBasis \n"<<Chebyshev3dBasis<<std::endl;

Definition at line 3037 of file linear_algebra.hpp.

template<typename RandomAccessIterator2d1 , typename T , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::rank1_update ( RandomAccessIterator2d1  A_up,
RandomAccessIterator2d1  A_bot,
const T &  alpha,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  Y_first,
RandomAccessIterator2  Y_last 
)
inline

Computes

\[ A = A + \alpha X Y^H\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
A_upRandomAccessIterator2d to the upper_left matrix element.
A_botRandomAccessIterator2d to the bottom_right matrix element.
alphaScalar.
X_firstRandomAccessIterator to the first element of the vector X.
X_lastRandomAccessIterator to one-past-the-end element of the vector X.
Y_firstRandomAccessIterator to the first element of the vector Y.
Y_lastRandomAccessIterator to one-past-the-end element of the vector Y.
Complexity: 3*A.cols()*A.rows() flops for real data 4*A.cols()*A.rows() flops for complex data
Precondition
(A_bot - A_up)[0] == (X_last - X_first)
(A_bot - A_up)[1] == (Y_last - Y_first)
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dc[] = {TC(1,1),TC(0,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2),TC(1,2)};
slip::Matrix<TC> Mrank1(4,3,dc);
std::cout<<"Mrank1 = "<<std::endl;
std::cout<<Mrank1<<std::endl;
std::cout<<"Vout1 = "<<std::endl;
std::cout<<Vout1<<std::endl;
std::cout<<"Vout2 = "<<std::endl;
std::cout<<Vout2<<std::endl;
slip::rank1_update(Mrank1.upper_left(),Mrank1.bottom_right(),
3.0,
Vout1.begin(),Vout1.end(),
Vout2.begin(),Vout2.end());
std::cout<<"Mrank1 = Mrank1 + 3xXxY^*"<<std::endl;
std::cout<<Mrank1<<std::endl;

Definition at line 2346 of file linear_algebra.hpp.

template<typename Matrix , typename T , typename Vector1 , typename Vector2 >
void slip::rank1_update ( Matrix &  A,
const T &  alpha,
const Vector1 &  X,
const Vector2 &  Y 
)
inline

Computes

\[ A = A + \alpha X Y^H\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
AMatrix A.
alphaScalar.
XThe vector X.
YThe vector Y.
Complexity: 3*A.cols()*A.rows() flops for real data 4*A.cols()*A.rows() flops for complex data
Precondition
A.rows() == X.size()
A.cols() == Y.size()
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dc[] = {TC(1,1),TC(0,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2),TC(1,2)};
slip::Matrix<TC> Mrank1(4,3,dc);
std::cout<<"Mrank1 = "<<std::endl;
std::cout<<Mrank1<<std::endl;
std::cout<<"Vout1 = "<<std::endl;
std::cout<<Vout1<<std::endl;
std::cout<<"Vout2 = "<<std::endl;
std::cout<<Vout2<<std::endl;
slip::rank1_update(Mrank1,3.0,Vout1,Vout2);
std::cout<<"Mrank1 = Mrank1 + 3xXxY^*"<<std::endl;
std::cout<<Mrank1<<std::endl;

Definition at line 2421 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
std::iterator_traits<RandomAccessIterator1>::value_type slip::rayleigh ( RandomAccessIterator1  first1,
RandomAccessIterator1  last1,
RandomAccessIterator2d  A_upper_left,
RandomAccessIterator2d  A_bottom_right 
)
inline

Computes the rayleigh coefficient of a vector x:

\[ r(x) = \frac{x^H A x}{x^Hx} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
first1RandomAccessIterator to the first element of the vector x.
last1RandomAccessIterator to one-past-the-end element of the vector x.
A_upper_leftRandomAccessIterator2d to the upper_left matrix element.
A_bottom_rightRandomAccessIterator2d to the bottom_right matrix element.
Returns
rayleigh coefficient.
Precondition
x must be different of the null vector
(last1 - first1) == (A_bottom_right - A_upper_left)[1]
(last1 - first1) >= (A_bottom_right - A_upper_left)[0]
Remarks
Works with real and complex data.
Example:
slip::iota(Ai.begin(),Ai.end(),1.0f);
std::cout<<"Ai = "<<std::endl;
std::cout<<Ai<<std::endl;
slip::Array<float> Xi(Ai.cols());
slip::iota(Xi.begin(),Xi.end(),2.0f);
std::cout<<"Xi = "<<std::endl;
std::cout<<"rayleigh(Xi) = "<<std::endl;
std::cout<<slip::rayleigh(Xi.begin(),Xi.end(),
Ai.upper_left(),Ai.bottom_right())<<std::endl;

Definition at line 557 of file linear_algebra.hpp.

template<typename Vector , typename Matrix >
Vector::value_type slip::rayleigh ( const Vector &  X,
const Matrix &  A 
)
inline

Computes the rayleigh coefficient o f a vector x:

\[ r(x) = \frac{x^H A x}{x^Hx} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
XThe vector x.
AThe matrix A.
Returns
rayleigh coefficient.
Precondition
x must be different of the null vector
x.size() == A.cols()
x.size() >= A.rows()
Remarks
Works with real and complex data.
Example:
slip::iota(Ai.begin(),Ai.end(),1.0f);
std::cout<<"Ai = "<<std::endl;
std::cout<<Ai<<std::endl;
slip::Array<float> Xi(Ai.cols());
slip::iota(Xi.begin(),Xi.end(),2.0f);
std::cout<<"Xi = "<<std::endl;
std::cout<<"rayleigh(Xi) = "<<std::endl;
std::cout<<slip::rayleigh(Xi,Ai)<<std::endl;

Definition at line 603 of file linear_algebra.hpp.

template<typename Container1d >
void slip::read_ascii_1d ( const std::string &  file_path_name,
Container1d &  container 
)
inline

Read a Container1d from an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name
containerContainer 1d.
Remarks
This file format is compatible with matlab, octave and gnuplot ASCII files
Example:
float tab[] = {1.0,2.0,3.0,4.0,5.0,6.0};
slip::Array<float> Tab(6,tab);
slip::write_ascii_1d<slip::Array<float>::iterator,float>(Tab.begin(),Tab.end(),"test.dat");
slip::read_ascii_1d("test.dat",Tab2);

Definition at line 2518 of file io_tools.hpp.

template<typename Container2d >
void slip::read_ascii_2d ( Container2d &  container,
const std::string &  file_path_name 
)
inline

Read a Container2d from an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.4
Date
2010/10/30
Since
1.0.0
Parameters
container2d container to read.
file_path_nameString of the file path name
Remarks
This file format is compatible with dml matlab, octave and gnuplot ASCII files. This function skip comment lines beginning by #, /, ! or % " or a letter of the alphabet.
Write is useful to write char or unsigned char value
Example:
double d[] = {1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,
15.0,16.0,17.0,18.0};
std::cout<<A<<std::endl;
slip::write_ascii_2d<slip::Array2d<double>::iterator2d,double>(A.upper_left(),A.bottom_right(),"A.dat");
slip::Range<int> r1(0,2,1);
slip::Range<int> r2(1,5,2);
slip::write_ascii_2d<slip::Array2d<double>::iterator2d_range,double>(A.upper_left(r1,r2),A.bottom_right(r1,r2),"Arange.dat");
slip::read_ascii_2d(AAA,"Arange.dat");
std::cout<<"read ascii2d "<<std::endl;
std::cout<<AAA<<std::endl;

Definition at line 544 of file io_tools.hpp.

template<class MultiContainer2d >
void slip::read_gnuplot_vect2d ( const std::string &  file_path_name,
MultiContainer2d &  field 
)
inline

Create a DenseVector2dField2D from a gnuplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector2dField2D.
The data format is the following:
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_gnuplot_vect2d("xyuv.dat",field);
slip::read_gnuplot_XY("xyuv.dat",XY);
std::cout<<"read_gnuplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"XY : "<<std::endl;
std::cout<<XY<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 1521 of file io_tools.hpp.

template<class MultiContainer2d , typename T >
void slip::read_gnuplot_vect2d ( const std::string &  file_path_name,
MultiContainer2d &  field,
slip::Point2d< T > &  init_point,
slip::Point2d< T > &  step 
)
inline

Create a DenseVector2dField2D from a gnuplot file handle 2d real regular grid.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2009/03/10
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector2dField2D.
init_pointPoint2d corresponding to the point having the smallest x and y coordinates.
stepSteps of the regular grid.
The data format is the following:
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
The data format is the following:
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_gnuplot_vect2d("xyuv.dat",field,init_point,step);
std::cout<<"read_tecplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"init_point : "<<init_point<<std::endl;
std::cout<<"step : "<< step<<std::endl;
std::cout<<"Field : "<<std::endl;

Definition at line 1563 of file io_tools.hpp.

template<typename MultiContainer2d >
void slip::read_gnuplot_XY ( const std::string &  file_path_name,
MultiContainer2d &  XY 
)
inline

Create a XY DenseVector2dField2D from a gnuplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name
XYDenseVector2dField2D which store the XY locations.
Data format:
x y U(x,y) V(x,y) handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_gnuplot_vect2d("xyuv.dat",field);
slip::read_gnuplot_XY("xyuv.dat",XY);
std::cout<<"read_gnuplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"XY : "<<std::endl;
std::cout<<XY<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 1604 of file io_tools.hpp.

template<typename Vector1 , typename Vector2 >
void slip::read_gnuplot_XY ( const std::string &  file_path_name,
Vector1 &  X,
Vector2 &  Y 
)
inline

Read X and Y column of a 2d gnuplot ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name
XContainer 1d containing X part of tecplot file.
YContainer 1d containing Y part of tecplot file.
The data format is the following:
x y U(x,y) V(x,y) handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_gnuplot_XY("test_tec2.txt",X2,Y2);
std::cout<<"X2 = \n"<<X2<<std::endl;
std::cout<<"Y2 = \n"<<Y2<<std::endl;

Definition at line 1642 of file io_tools.hpp.

template<class MultiContainer3d >
void slip::read_gnuplot_XYZ ( const std::string &  file_path_name,
MultiContainer3d &  XYZ 
)
inline

Create a XYZ DenseVector3dField3D from a gnuplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name.
XYZDenseVector3dField3D.
The data format is the following:
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K= slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
handled reading cases:
  • x vary first, y written according to the increasing order, z written according to the increasing order
  • y vary first, y written according to the increasing order , z written according to the increasing order
  • x vary first, y written according to the decreasing order , z written according to the increasing order
  • y vary first, y written according to the decreasing order , z written according to the increasing order
Remarks
x = j and y = (dim2 - 1) - i and z = (dim1 - 1) - k
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_gnuplot_vect3d("xyzuvw.dat",field);
slip::read_gnuplot_XYZ("xyzuvw.dat",XY2);
std::cout<<"read_gnuplot_vect3d xyzuvw.dat"<<std::endl;
std::cout<<"XYZ : "<<std::endl;
std::cout<<XYZ<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 2437 of file io_tools.hpp.

template<typename InputIterator >
void slip::read_raw ( const std::string &  file_path_name,
InputIterator  first,
InputIterator  last 
)
inline

Write a Container to an raw file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/02/14
Since
1.0.0
Parameters
file_path_nameString of the file path name
firstInputIterator.
lastInputIterator.
Precondition
container size must be greater or egal to (last-first)
Example:
int tabi[] = {1,2,3,4,5,6};
slip::Matrix<int> Mi(2,3,tabi);
std::cout<<Mi<<std::endl;
slip::write_raw(Mi.begin(),Mi.end(),"Mi.raw");
slip::read_raw("Mi.raw",Mi2.begin(),Mi2.end());
std::cout<<Mi2<<std::endl;
slip::read_raw("Mi.raw",AA.begin(),AA.end());
std::cout<<AA<<std::endl;

Definition at line 345 of file io_tools.hpp.

template<class MultiContainer2d >
void slip::read_tecplot_vect2d ( const std::string &  file_path_name,
MultiContainer2d &  field 
)
inline

Create a DenseVector2dField2D from a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.2
Date
2009/04/27
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector2dField2D.
The data format is the following:
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect2d("xyuv.dat",field);
slip::read_tecplot_XY("xyuv.dat",XY);
std::cout<<"read_tecplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"XY : "<<std::endl;
std::cout<<XY<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 1080 of file io_tools.hpp.

template<class MultiContainer2d , typename T >
void slip::read_tecplot_vect2d ( const std::string &  file_path_name,
MultiContainer2d &  field,
slip::Point2d< T > &  init_point,
slip::Point2d< T > &  step 
)
inline

Create a DenseVector2dField2D from a tecplot file handle 2d real regular grid.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2009/03/10
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector2dField2D.
init_pointPoint2d corresponding to the point having the smallest x and y coordinates.
stepstep between element of the grid.
The data format is the following:
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect2d("xyuv.dat",field,init_point,step);
std::cout<<"read_tecplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"init_point : "<<init_point<<std::endl;
std::cout<<"step : "<< step<<std::endl;
std::cout<<"Field : "<<std::endl;

Definition at line 1192 of file io_tools.hpp.

template<class MultiContainer3d >
void slip::read_tecplot_vect3d ( const std::string &  file_path_name,
MultiContainer3d &  field 
)
inline

Create a DenseVector3dField3D from a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2008/05/24
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector3dField3D.
The data format is the following:
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K = slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
handled reading cases:
  • x vary first, y written according to the increasing order, z written according to the increasing order
  • y vary first, y written according to the increasing order , z written according to the increasing order
  • x vary first, y written according to the decreasing order , z written according to the increasing order
  • y vary first, y written according to the decreasing order , z written according to the increasing order
Remarks
x = j and y = (rows() - 1 - i) - i and z = (slices() - 1 - k)
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect3d("xyzuvw.dat",field);
slip::read_tecplot_XYZ("xyzuvw.dat",XY2);
std::cout<<"read_tecplot_vect3d xyzuvw.dat"<<std::endl;
std::cout<<"XYZ : "<<std::endl;
std::cout<<XYZ<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 1860 of file io_tools.hpp.

template<class MultiContainer3d , typename T >
void slip::read_tecplot_vect3d ( const std::string &  file_path_name,
MultiContainer3d &  field,
slip::Point3d< T > &  init_point,
slip::Point3d< T > &  step 
)
inline

Create a DenseVector3dField3D from a tecplot file handle 3d real regular grid.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2009/03/10
Since
1.0.0
Parameters
file_path_nameString of the file path name
fieldDenseVector3dField3D.
init_pointPoint3d corresponding to the point having the smallest x, y and z coordinates.
stepPoint3d corresponding to the steps of the regular grid.
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K = slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
handled reading cases:
  • x vary first, y written according to the increasing order, z written according to the increasing order
  • y vary first, y written according to the increasing order , z written according to the increasing order
  • x vary first, y written according to the decreasing order , z written according to the increasing order
  • y vary first, y written according to the decreasing order , z written according to the increasing order
Remarks
x = j and y = (rows() - 1 - i) - i and z = (slices() - 1 - k)
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect3d("xyzuvw.dat",field,init_point,step);
std::cout<<"field : \n"<<field<<std::endl;
std::cout<<"init_point : "<< init_point<<std::endl;
std::cout<<"step : "<< step<<std::endl;

Definition at line 2000 of file io_tools.hpp.

template<typename MultiContainer2d >
void slip::read_tecplot_XY ( const std::string &  file_path_name,
MultiContainer2d &  XY 
)
inline

Create a XY DenseVector2dField2D from a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.2
Date
2010/10/12
Since
1.0.0
Parameters
file_path_nameString of the file path name
XYDenseVector2dField2D which store the XY locations.
The data format is the following:
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect2d("xyuv.dat",field);
slip::read_tecplot_XY("xyuv.dat",XY);
std::cout<<"read_tecplot_vect2d xyuv.dat"<<std::endl;
std::cout<<"XY : "<<std::endl;
std::cout<<XY<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 1312 of file io_tools.hpp.

template<typename Vector1 , typename Vector2 >
void slip::read_tecplot_XY ( const std::string &  file_path_name,
Vector1 &  X,
Vector2 &  Y 
)
inline

Reads X and Y column of an ASCII 2d tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.2
Date
2010/10/12
Since
1.0.0
Parameters
file_path_nameString of the file path name
XContainer 1d containing X part of tecplot file.
YContainer 1d containing Y part of tecplot file.
The data format is the following:
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
handled reading cases:
  • x vary first, y written according to the increasing order
  • y vary first, y written according to the increasing order
  • x vary first, y written according to the decreasing order
  • y vary first, y written according to the decreasing order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_XY("test_tec2.txt",X2,Y2);
std::cout<<"X2 = \n"<<X2<<std::endl;
std::cout<<"Y2 = \n"<<Y2<<std::endl;

Definition at line 1422 of file io_tools.hpp.

template<class MultiContainer3d >
void slip::read_tecplot_XYZ ( const std::string &  file_path_name,
MultiContainer3d &  XYZ 
)
inline

Create a XYZ DenseVector3dField3D from a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.2
Date
2010/10/12
Since
1.0.0
Parameters
file_path_nameString of the file path name
XYZDenseVector3dField3D.
The data format is the following:
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K= slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
handled reading cases:
  • x vary first, y written according to the increasing order, z written according to the increasing order
  • y vary first, y written according to the increasing order , z written according to the increasing order
  • x vary first, y written according to the decreasing order , z written according to the increasing order
  • y vary first, y written according to the decreasing order , z written according to the increasing order
Remarks
x = j and y = (dim2 - 1) - i and z = (dim1 - 1) - k
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_vect3d("xyzuvw.dat",field);
slip::read_tecplot_XYZ("xyzuvw.dat",XY2);
std::cout<<"read_tecplot_vect3d xyzuvw.dat"<<std::endl;
std::cout<<"XYZ : "<<std::endl;
std::cout<<XYZ<<std::endl;
std::cout<<"Field : "<<std::endl;
std::cout<<field<<std::endl;

Definition at line 2153 of file io_tools.hpp.

template<class Vector1 , class Vector2 , class Vector3 >
void slip::read_tecplot_XYZ ( const std::string &  file_path_name,
Vector1 &  X,
Vector2 &  Y,
Vector3 &  Z 
)
inline

Create a XYZ DenseVector3dField3D from a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Ludovic Chatellier ludov.nosp@m.ic.c.nosp@m.hatel.nosp@m.lier.nosp@m.@univ.nosp@m.-poi.nosp@m.tiers.nosp@m..fr
Version
0.0.1
Date
2009/03/27
Since
1.0.0
Parameters
file_path_nameString of the file path name
XContainer1d containing the X locations.
YContainer1d containing the Y locations.
ZContainer1d containing the Z locations.
The data format is the following:
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K= slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
handled reading cases:
  • x vary first, y written according to the increasing order, z written according to the increasing order
  • y vary first, y written according to the increasing order , z written according to the increasing order
  • x vary first, y written according to the decreasing order , z written according to the increasing order
  • y vary first, y written according to the decreasing order , z written according to the increasing order
Remarks
x = j and y = (dim2 - 1) - i and z = (dim1 - 1) - k
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::read_tecplot_XYZ("xyzuvw.dat",X3,Y3,Z3);
std::cout<<"X : \n"<<X3<<std::endl;
std::cout<<"Y : \n"<<Y3<<std::endl;
std::cout<<"Z : \n"<<Z3<<std::endl;

Definition at line 2295 of file io_tools.hpp.

template<class Matrix1 , class Matrix2 >
void slip::real ( const Matrix1 &  C,
Matrix2 &  R 
)
inline

Extract the real Matrix of a complex Matrix. $ R_{ij} = \mathcal{R}(C_{ij}) $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/06
Since
1.0.0
Version
0.0.1
Parameters
CComplex Matrix container
Rresult of the real
Precondition
Matrix are supposed to be allocated first
R.rows() == C.rows()
R.cols() == C.cols()
Example:
Sshc(0,0) = std::complex<double>(0.0,1.0);
Sshc(0,1) = std::complex<double>(0.5,-0.5);
Sshc(0,2) = std::complex<double>(1.0,-1.2);
Sshc(1,0) = std::complex<double>(-0.5,-0.5);
Sshc(1,1) = std::complex<double>(0.0,2.0);
Sshc(1,2) = std::complex<double>(0.2,-0.3);
Sshc(2,0) = std::complex<double>(-1.0,-1.2);
Sshc(2,1) = std::complex<double>(-0.2,-0.3);
Sshc(2,2) = std::complex<double>(0.0,3.0);
std::cout<<"Sshc = \n"<<Sshc<<std::endl;
slip::Matrix<double> realSshc(3,3);
slip::real(Sshc,realSshc);
std::cout<<"realSshc = \n"<<realSshc<<std::endl;

Definition at line 2643 of file linear_algebra.hpp.

template<class InputIter , class OutputIter >
void slip::real_fft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the real fft of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate throw the input data
in_endA BidirectionalIterator at the end of the input data
out_beginA BidirectionalIterator to iterate throw the output data
Precondition
size(in) == size(out).
input data have to be real
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
template <typename T>
T aleat10(void)
{
return 10.0 * (rand()/static_cast<T>(RAND_MAX));
}
int main(int argc, char **argv)
{
typedef double real;
typedef std::complex<real> cx;
std::generate(I.begin(),I.end(),aleat10<real>);
slip::Array<cx> b(N,cx(0));
slip::real_fft(I.begin(),I.end(),b.begin());
...

Definition at line 2430 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::real_fft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the real fft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the 2d range must have the same sizes
input data have to be real
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
I.read("lena.bmp");
//fft2d
slip::real_fft2d(I.upper_left(),I.bottom_right(),IFFT.upper_left());
slip::GrayscaleImage<double> INorm(IFFT.dim1(),IFFT.dim2());
//log(magnitude)
for(size_t i = 0; i < IFFT.dim1(); ++i)
for(size_t j = 0; j < IFFT.dim2(); ++j)
INorm[i][j] = std::log(1.0+std::abs(IFFT[i][j]));
slip::fftshift2d(INorm.upper_left(),INorm.bottom_right());
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_fft.jpg");
Examples:
fft2d.cpp.

Definition at line 2553 of file FFT.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::real_fft2d ( Matrix1 &  datain,
Matrix2 &  dataout 
)
inline

Computes the real fft2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
datain must be real
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
I.read("lena.bmp");
//fft2d
slip::GrayscaleImage<double> INorm(IFFT.dim1(),IFFT.dim2());
//log(magnitude)
for(size_t i = 0; i < IFFT.dim1(); ++i)
for(size_t j = 0; j < IFFT.dim2(); ++j)
INorm[i][j] = std::log(1.0+std::abs(IFFT[i][j]));
slip::fftshift2d(INorm.upper_left(),INorm.bottom_right());
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_fft.jpg");

Definition at line 2676 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::real_fft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the real fft3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the 3d range must have the same sizes
input data have to be real
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
M.read_raw("volume.vol",dim1,dim2,dim3);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::real_fft3d(M.front_upper_left(),M.back_bottom_right(),OFFT.front_upper_left());
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 2804 of file FFT.hpp.

template<typename Volume1 , typename Volume2 >
void slip::real_fft3d ( Volume1 &  datain,
Volume2 &  dataout 
)
inline

Computes the real fft3d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/07
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be real
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
M.read_raw("volume.vol",dim1,dim2,dim3);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 2903 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::real_fft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the real fft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the 4d range must have the same sizes
input data have to be real
out data have to be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::HyperVolume<double> M of dimensions dim1, dim2, dim3 and dim4;
slip::HyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::real_fft4d(M.first_front_upper_left(),M.last_back_bottom_right(),OFFT.first_front_upper_left());
slip::HyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 3823 of file FFT.hpp.

template<typename HyperVolume1 , typename HyperVolume2 >
void slip::real_fft4d ( const HyperVolume1 &  datain,
HyperVolume2 &  dataout 
)
inline

Computes the real fft4d of a container.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have cols, rows and slices iterator
datain must be real
dataout must be std::complex
Postcondition
the fft algorithm used is the fftw if enabled (–enable-fftw3 option of configuration) or the split radix one.
Example:
//input slip::HyperVolume<double> M of dimensions dim1, dim2, dim3 and dim4;
slip::HyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 3972 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::real_fftw ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the real fftw of a container (from fftw3.h).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/01
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
size(b) >= size(a).
the input data have to be real and out put data have to be std::complex
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1641 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::real_fftw2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the real fftw2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be real (not complex)
the 2d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1778 of file FFT.hpp.

template<typename InputMatrix , typename OutputMatrix >
void slip::real_fftw2d ( InputMatrix &  datain,
OutputMatrix &  dataout 
)
inline

Computes the real fftw2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
the input data have to be real (not complex)
datin and dataout must have the same size
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1933 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::real_fftw3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the real fftw3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be real (not complex)
the 3d range must have the same sizes
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 1982 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::real_fftw3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the real fftw3d of a container 3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/04/03
Since
1.0.0
Version
0.0.1
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be real
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 2248 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::real_fftw4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the real fftw4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the input data have to be real (not complex)
the 4d range must have the same sizes
the HAVE_FFTW macro must be defined

Definition at line 3491 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::real_fftw4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the real fftw4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain.slabs() == dataout.slabes()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be real
the HAVE_FFTW macro must be defined (–enable-fftw3 option of configuration)

Definition at line 3706 of file FFT.hpp.

template<typename InputIterator , typename InputIterator2 , typename OutputIterator >
void slip::real_histogram ( InputIterator  first,
InputIterator  last,
InputIterator2  stepfirst,
InputIterator2  steplast,
OutputIterator  result 
)
inline

Complex histogram algorithm (variable step)

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2007/02/08
Since
1.0.0
Version
0.0.1
Parameters
firstbegin iterator of the container to histogram
lastpast-the-end iterator of the container to histogram
stepfirstbegin iterator of the container to steps
steplastpast-the-end iterator of the container to steps
resultbegin iterator of the result container
Example:
slip::iota(M.begin(),M.end(),1.0,1.0);
double steps[] = {0.0,2.3,4.5,5.7,7.0,30.0};
slip::real_histogram(M.begin(),M.end(),steps,steps+6,Histo.begin());
Examples:
regularvector2dfield2d_op.cpp, and regularvector3dfield3d_op.cpp.

Definition at line 406 of file histo.hpp.

template<class InputIter_T , class Iter_T >
void slip::real_radix2_fft ( InputIter_T  a,
Iter_T  b,
const int  log2n 
)
inline

Computes the Cooley-Tukey (radix2) real_fft of a container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/10/23
Since
1.0.0
Version
0.0.2
Parameters
aA BidirectionalIterator to iterate throw the input data
bA BidirectionalIterator to iterate throw the output data
log2nCorresponds to log2(size(a)).
Precondition
size(a) == size(b).

Code.

Definition at line 407 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::real_split_radix_fft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the real split radix fft of a container (from FFTPACK.hpp).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
size(b) >= size(a).
the input data have to be real and out put data have to be std::complex
Example:
template <typename T>
T aleat10(void)
{
return 10.0 * (rand()/static_cast<T>(RAND_MAX));
}
int main(int argc, char **argv)
{
typedef double real;
typedef std::complex<real> cx;
std::generate(I.begin(),I.end(),aleat10<real>);
slip::Array<cx> b(N,cx(0));
slip::real_split_radix_fft(I.begin(),I.end(),b.begin());
...

Definition at line 774 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::real_split_radix_fft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the real split-radix fft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left.
in_bottom_right
out_upper_left
Precondition
the input data have to be real (not complex)
the 2d range must have the same sizes
Example:
I.read("lena.bmp");
//fft2d
slip::GrayscaleImage<double> INorm(IFFT.dim1(),IFFT.dim2());
//log(magnitude)
for(size_t i = 0; i < IFFT.dim1(); ++i)
for(size_t j = 0; j < IFFT.dim2(); ++j)
INorm[i][j] = std::log(1.0+std::abs(IFFT[i][j]));
slip::fftshift2d(INorm.upper_left(),INorm.bottom_right());
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_fft.jpg");

Definition at line 944 of file FFT.hpp.

template<typename InputMatrix , typename OutputMatrix >
void slip::real_split_radix_fft2d ( InputMatrix &  datain,
OutputMatrix &  dataout 
)
inline

Computes the real split-radix fft2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/12/05
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
the input data have to be real (not complex)
datin and dataout must have the same size
Example:
I.read("lena.bmp");
//fft2d
slip::GrayscaleImage<double> INorm(IFFT.dim1(),IFFT.dim2());
//log(magnitude)
for(size_t i = 0; i < IFFT.dim1(); ++i)
for(size_t j = 0; j < IFFT.dim2(); ++j)
INorm[i][j] = std::log(1.0+std::abs(IFFT[i][j]));
slip::fftshift2d(INorm.upper_left(),INorm.bottom_right());
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_fft.jpg");

Definition at line 1100 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::real_split_radix_fft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the real split-radix fft3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/01/28
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be real (not complex)
the 3d range must have the same sizes
Example:
M.read_raw("volume.vol",dim1,dim2,dim3);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 1180 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::real_split_radix_fft3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the real split-radix fft3d of a container 3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/01/28
Since
1.0.0
Version
0.0.1
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be real
Example:
M.read_raw("volume.vol",dim1,dim2,dim3);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
//FFT3D
slip::Volume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),M.front_upper_left(),M.back_bottom_right());
// log(magnitude)
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
NFFT[z][i][j] = std::log(1.0+std::abs(OFFT[z][i][j]));
slip::fftshift3d(NFFT.front_upper_left(),NFFT.back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);
NFFT.write_raw("volume_fft.vol");

Definition at line 1404 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::real_split_radix_fft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the real split-radix fft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_leftinput start iterator4d
in_last_back_bottom_rightinput end interator4d
out_first_front_upper_leftoutput start iterator4d
Precondition
the input data have to be real (not complex)
the input and output container must have the same sizes
Example:
//input slip::HyperHyperVolume<double> M of dimensions dim1, dim2, dim3 and dim4;
slip::HyperHyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),std::complex<double>(0,0));
slip::real_split_radix_fft4d(M.first_front_upper_left(),M.last_back_bottom_right(),OFFT.first_front_upper_left());
slip::HyperHyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 3137 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::real_split_radix_fft4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the real split-radix fft4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be real
Example:
//input slip::HyperHyperVolume<double> M of dimensions dim1, dim2, dim3 and dim4;
slip::HyperHyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
//FFT4D
slip::Matrix4d<std::complex<double> > OFFT(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperVolume<double> NFFT(OFFT.dim1(),OFFT.dim2(),OFFT.dim3(),OFFT.dim4(),M.first_front_upper_left(),
M.last_back_bottom_right());
// log(magnitude)
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
NFFT[t][k][i][j] = std::log(1.0+std::abs(OFFT[t][k][i][j]));
slip::fftshift4d(NFFT.first_front_upper_left(),NFFT.last_back_bottom_right());
slip::change_dynamic_01(NFFT.begin(),NFFT.end(),NFFT.begin(),slip::AFFINE_FUNCTION);

Definition at line 3383 of file FFT.hpp.

template<typename Iterator1 , typename Iterator2 , typename U >
void slip::reduction ( Iterator1  seq1_beg,
Iterator1  seq1_end,
Iterator2  seq2_beg,
u 
)
inline

Add u times the second sequence to the first one: seq1 = seq1 + u * seq2.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/08/25
Since
1.0.0
Version
0.0.1
Parameters
seq1_begiterator to the beginning of the first sequence
seq1_enditerator to the end of the first sequence
seq2_begiterator to the beginning of the second sequence
ureduction constant
Precondition
seq1 and seq2 must have the same size

Definition at line 2448 of file linear_algebra.hpp.

template<typename RegularVector2dField2d >
void slip::RegularVector2dField2d_to_plt ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
std::string  title,
std::string  zone,
const double  SolTime,
std::vector< std::string >  varnames = std::vector<std::string>(),
const int  FileType = 0 
)

Write a slip::RegularVector2dField2d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
varnamesVector containing the variable names ("X", "Y", "U", "V" by default).
Example:
// Write the RegularVector2dField2d Reg to the "test_3D.plt" file.
std::string file_name="test_2D_write.plt", title="Title of the file", zonename="Name of the zone";
RegularVector2dField2d_to_plt(file_name, Reg, title, zonename);

Definition at line 2547 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::RegularVector2dField2d_to_plt ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
const int  FileType = 0 
)

Write a slip::RegularVector2dField2d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector2dField2d Reg in the "test_3D.plt" file.
std::string file_name="test_3D_write.plt";

Definition at line 2804 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::RegularVector2dField2d_to_plt ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
const double  SolTime,
const int  FileType = 0 
)

Write a slip::RegularVector2dField2d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
SolTimeSolution Time.
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector2dField2d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt";
const double t=0.5;
RegularVector2dField2d_to_plt(file_name, Reg, t);

Definition at line 2831 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::RegularVector2dField2d_to_plt ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
std::string  title,
std::string  zone,
const int  FileType = 0 
)

Write a slip::RegularVector2dField2d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector2dField2d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt", title="Title of the file", zonename="Name of the zone";
RegularVector2dField2d_to_plt(file_name, Reg, title, zone);

Definition at line 2859 of file tecplot_binaries.hpp.

template<typename RegularVector2dField2d >
void slip::RegularVector2dField2d_to_plt ( const std::string &  file_path_name,
RegularVector2dField2d &  reg,
std::string  title,
std::string  zone,
std::vector< std::string >  varnames,
const int  FileType = 0 
)

Write a slip::RegularVector2dField2d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector2dField2d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector2dField2d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt", title="Title of the file", zonename="Name of the zone";
std::vector<std::string> varnames; // if varnames is empty, the default values X, Y, U, V are used
RegularVector2dField2d_to_plt(file_name, Reg, title, zone);

Definition at line 2889 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::RegularVector3dField3d_to_plt ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
std::string  title,
std::string  zone,
const double  SolTime,
std::vector< std::string >  varnames = std::vector<std::string>(),
const int  FileType = 0 
)

Write a slip::RegularVector3dField3d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
SolTimeSolution Time (0 by default).
varnamesVector containing the variable names ("X", "Y", "Z", "U", "V", "W" by default).
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector3dField3d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt", title="Title of the file", zonename="Name of the zone";
std::vector<std::string> varnames; // if varnames is empty, the default values X, Y, Z, U, V, W are used
RegularVector3dField3d_to_plt(file_name, Reg, title, zonename, varnames);

Definition at line 1586 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::RegularVector3dField3d_to_plt ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
const int  FileType = 0 
)

Write a slip::RegularVector3dField3d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector3dField3d Reg in the "test_3D.plt" file.
std::string file_name="test_3D_write.plt";

Definition at line 1879 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::RegularVector3dField3d_to_plt ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
const double  SolTime,
const int  FileType = 0 
)

Write a slip::RegularVector3dField3d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
SolTimeSolution Time.
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector3dField3d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt";
const double t=0.5;
RegularVector3dField3d_to_plt(file_name, Reg, t);

Definition at line 1906 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::RegularVector3dField3d_to_plt ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
std::string  title,
std::string  zone,
const int  FileType = 0 
)

Write a slip::RegularVector3dField3d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector3dField3d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt", title="Title of the file", zonename="Name of the zone";
RegularVector3dField3d_to_plt(file_name, Reg, title, zone);

Definition at line 1934 of file tecplot_binaries.hpp.

template<typename RegularVector3dField3d >
void slip::RegularVector3dField3d_to_plt ( const std::string &  file_path_name,
RegularVector3dField3d &  reg,
std::string  title,
std::string  zone,
std::vector< std::string >  varnames,
const int  FileType = 0 
)

Write a slip::RegularVector3dField3d to a binary tecplot file.

Author
Adrien Berchet <adrien.berchet_AT_univ-poitiers.fr>
Version
0.0.1
Date
2012/09/07
Since
1.4.0
Parameters
file_path_nameString of the file path name.
regslip::RegularVector3dField3d container.
titleTitle of the tecplot frame ("Title" by default).
zoneName of the tecplot zone ("Zone" by default).
FileTypeType of file : 0=FULL, 1=Grid only, 2=Solution only (0 by default).
Example:
// Write the RegularVector3dField3d Reg in the "test_3D.plt" file using defined title, zone name and variable names.
std::string file_name="test_3D_write.plt", title="Title of the file", zonename="Name of the zone";
std::vector<std::string> varnames; // if varnames is empty, the default values X, Y, Z, U, V, W are used
RegularVector3dField3d_to_plt(file_name, Reg, title, zone);

Definition at line 1964 of file tecplot_binaries.hpp.

template<typename Container , typename _II >
void slip::reverse_container_cast ( Container &  cont,
_II &  first,
_II &  last 
)

Get the reverse default iterators of a SLIP container.

Author
Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2010/05/10
Parameters
contContainer.
firstreverse iterator to the first element of the container.
lastreverse iterator to one past-the-end element of the container.
Example:
// ** slip::GrayscaleImage<double> I;
// ** I.read("lena.png");
// ** slip::GrayscaleImage<double>::default_iterator first;
// ** slip::GrayscaleImage<double>::default_iterator last;
// ** slip::container_cast(I,first,last);
// **

Definition at line 308 of file container_cast.hpp.

template<typename Matrix , typename SizeType , typename Real >
void slip::right_givens ( Matrix &  M,
const SizeType &  col1,
const SizeType &  col2,
const Real &  sinus,
const Real &  cosinus,
const SizeType &  row1,
const SizeType &  row2 
)
inline

Apply right Givens rotation multiplication.

Perform a right multiplication of a matrix M with the Givens matrix on the col1 and col2 between the indices row1 and row2.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Since
1.0.0
Date
2008/10/14
Version
0.0.1
Parameters
MThe Container to multiply
col1The first column involved in the computation.
col2The second column involved in the computation.
sinusGivens sinus.
cosinusGivens cosinus.
row1the first row index.
row2the second row index.
Precondition
row1 and row2 must be within the Matrix indices range.
col1 and col2 must be within the Matrix indices range.
row1 should be less than row2.
col1 should be less than col2.
Complexity: 6 (row2-row1 + 1) flops

Definition at line 10841 of file linear_algebra.hpp.

template<typename RandomAccessIterator , typename MatrixIterator1 >
void slip::right_householder_update ( RandomAccessIterator  V_first,
RandomAccessIterator  V_last,
MatrixIterator1  M_up,
MatrixIterator1  M_bot 
)
inline

right multiplies the matrix M with the Householder matrix P:

\[ M = M(I - vv^H) \]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the beginning of the sequence (V)
V_lastRandomAccessIterator to one-past-the end of the sequence (V)
M_up2D iterator on the upper_left element of M.
M_bot2D iterator on the bottom_right_left element of M.
Complexity: 5*M.rows()*M.cols() for real data, 6*M.rows()*M.cols() for complex data
Remarks
Works with real and complex data.
Example:
slip::iota(Mh.begin(),Mh.end(),1.0);
std::cout<<"Mh = \n"<<Mh<<std::endl;
double nu = 0.0;
slip::housegen(Mh.row_begin(0),Mh.row_end(0),Vh3.begin(),Vh3.end(),nu);
std::cout<<"Vh3 = \n"<<Vh3<<std::endl;
std::cout<<"nu = "<<nu<<std::endl;
slip::right_householder_update(Vh3.begin(),Vh3.end(),
Mh.upper_left(),Mh.bottom_right());
std::cout<<"Mh = \n"<<Mh<<std::endl;

Definition at line 11051 of file linear_algebra.hpp.

template<typename T , typename InputIterator >
T slip::rms ( InputIterator  first,
InputIterator  last 
)
inline

Computes the root mean square (rms) value of a range

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
Returns
The rms value of the container.
Precondition
[first,last) must be valid.
Note
Calls std::sqrt(slip::covariance(first,last,first,T(0),T(0)));
Example:
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::rms<double>(M.begin(),M.end())<<std::endl;

Definition at line 866 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::rms_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the root mean square (rms) value of a range using a predicate

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
preda predicate function
Returns
The rms value of the range using the predicate.
Precondition
[first,last) must be valid.
Note
Calls std::sqrt(slip::covariance_if(first,last,first,T(0),T(0),pred);
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::rms_if(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 3309 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::rms_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the root mean square (rms) value of a range over a mask

\[ \sqrt{\frac{1}{n}\sum_i x_i^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
valueMask value.
Returns
The rms value of the range over the mask.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Note
Calls std::sqrt(slip::covariance_mask(first,last,first,mask_first,T(0),T(0)));
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::rms_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 2185 of file statistics.hpp.

template<typename Real >
void slip::rotgen ( Real &  a,
Real &  b,
Real &  cos,
Real &  sin 
)
inline

Computes the Givens sinus and cosinus.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/10/13
Since
1.0.0
Version
0.0.1
Parameters
avalue
bvalue
sinGivens sinus
cosGivens cosinus.

Definition at line 10664 of file linear_algebra.hpp.

template<typename RandomAccessIterator2d >
slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator2d>::value_type>::value_type slip::row_norm ( RandomAccessIterator2d  upper_left,
RandomAccessIterator2d  bottom_right 
)
inline

Computes the row norm ( $\max_i\sum_j |a_{ij}|$) of a 2d range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
upper_leftRandomAccessIterator2d: first element of the 2d range.
bottom_rightRandomAccessIterator2d: one past-the-end of the 2d range.
Returns
The row norm of the 2d range.
Precondition
bottom_right - upper_left != slip::Dpoint2d<int>(0,0)
Remarks
It corresponds to the infinite norm of a Matrix.
Works with real and complex matrix.
Complexity: rows*cols flops
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"row norm of M = "<<slip::row_norm(M.upper_left(),M.bottom_right())<<std::endl;

Definition at line 3141 of file linear_algebra.hpp.

template<typename Container2d >
slip::lin_alg_traits<typename Container2d::value_type>::value_type slip::row_norm ( const Container2d &  container)
inline

Computes the row norm ( $\max_i\sum_j |a_{ij}|$) of a Container2d.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/10
Since
1.0.0
Version
0.0.1
Parameters
containerContainer2d.
Returns
The row norm of the 2d container.
Precondition
container.size() != 0
Remarks
It corresponds to the infinite norm of a Matrix.
Complexity: rows*cols flops
Remarks
Works with real and complex matrix.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"row norm of M = "<<slip::row_norm(M)<<std::endl;

Definition at line 3186 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 >
int slip::rq_decomp ( const Matrix1 &  A,
Matrix2 &  R,
Matrix3 &  Q 
)
inline

Computes the RQ decomposition of a matrix.

Compute the RQ decomposition of A. A = RQ where R is an upper triangular matrix and Q is an orthogonal matrix.

code is based on the QR decomposition qr_decomp

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de : conceptor
Date
2008/03/21
Since
1.2.0
Version
0.0.1
Parameters
AMatrix container
RMatrix container
QMatrix container
Returns
0 if M is not singular, 1 if M is singular
Precondition
Matrix must have the double bracket element accessor
Matrix are supposed to be allocated first
A.dim1()==A.dim2()
A.dim1()==R.dim1()
A.dim2()==R.dim2()
A.dim1()==Q.dim1()
A.dim2()==Q.dim2()

Definition at line 133 of file camera_algo.hpp.

template<typename SrcIter , typename KernelIter , typename ResIter >
void slip::same_convolution ( SrcIter  first,
SrcIter  last,
KernelIter  kernel_first,
KernelIter  kernel_last,
std::size_t  ksize_left,
std::size_t  ksize_right,
ResIter  result,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the same convolution of signal by a 1d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/11/26
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
kernel_firstA RandomAccessIterator.
kernel_lastA RandomAccessIterator.
ksize_leftkernel size left to the "center" of the kernel
ksize_rightkernel size right to the "center" of the kernel
resultA RandomAccessIterator. slip::BORDER_TREATMENT_ZERO_PADDED by default.
btslip::BORDER_TREATMENT
Precondition
size(result) = size(last - first)
asymetric_kernel1d.png
asymmetric 1d kernel support
Description:
If the signal size is N, the size of the result will be N too. Different BORDER_TREATMENT can be done:
Example:
std::vector<float> v(16);
for(int i = 0; i < 16; ++i)
v[i] = i + 1;
slip::block<float,7> kernel = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
7.0};
std::vector<float> result4(16);
slip::same_convolution(v.begin(),v.end(),kernel.begin(),kernel.end(),4,2,result4.begin(),slip::BORDER_TREATMENT_ZERO_PADDED);
slip::same_convolution(v.begin(),v.end(),kernel.begin(),kernel.end(),4,2,result4.begin(),slip::BORDER_TREATMENT_NEUMANN);
slip::same_convolution(v.begin(),v.end(),kernel.begin(),kernel.end(),4,2,result4.begin(),slip::BORDER_TREATMENT_AVOID);
slip::same_convolution(v.begin(),v.end(),kernel.begin(),kernel.end(),4,2,result4.begin(),slip::BORDER_TREATMENT_CIRCULAR);
Example2:
//sobel filtering
I.read("lena.gif");
slip::block<float,3> m = {0.5,0.0,-0.5};
for(size_t i = 0; i < I.dim1(); ++i)
{
,m.begin(),m.end(),1,1,
I2.row_begin(i),
}
slip::block<float,3> m2 = {1.0,2.0,1.0};
for(size_t j = 0; j < I2.dim2(); ++j)
{
slip::same_convolution(I2.col_begin(j),I2.col_end(j)
,m2.begin(),m2.end(),1,1,
I3.col_begin(j),
}
I3.write("lena_mean.gif");
Examples:
edge_detection.cpp.

Definition at line 299 of file convolution.hpp.

template<typename SrcIter , typename KernelIter , typename ResIter >
void slip::same_convolution ( SrcIter  first,
SrcIter  last,
KernelIter  kernel_first,
KernelIter  kernel_last,
ResIter  result,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the same convolution of signal by a symmetric 1d-kernel support.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
kernel_firstA RandomAccessIterator.
kernel_lastA RandomAccessIterator.
resultA RandomAccessIterator.
btslip::BORDER_TREATMENT. slip::BORDER_TREATMENT_ZERO_PADDED by default.
Precondition
size(result) = size(last - first)
symmetric_kernel1d.png
symmetric 1d kernel support
Description:
If the signal size is N, the size of the result will be N too. Different BORDER_TREATMENT can be done:
Example:
slip::Vector<float> result5(16);
slip::iota(Signal.begin(),Signal.end(),1.0,1.0);
slip::same_convolution(Signal.begin(),Signal.end(),
kernel.begin(),kernel.end(),
result5.begin(),
std::cout<<"result5 = \n"<<result5<<std::endl;
slip::same_convolution(Signal.begin(),Signal.end(),
kernel.begin(),kernel.end(),
result5.begin(),
std::cout<<"result5 = \n"<<result5<<std::endl;
slip::same_convolution(Signal.begin(),Signal.end(),
kernel.begin(),kernel.end(),
result5.begin(),
std::cout<<"result5 = \n"<<result5<<std::endl;
slip::same_convolution(Signal.begin(),Signal.end(),
kernel.begin(),kernel.end(),
result5.begin(),
std::cout<<"result5 = \n"<<result5<<std::endl;
Example2:
//sobel filtering
I.read("lena.gif");
slip::block<float,3> m = {0.5,0.0,-0.5};
for(size_t i = 0; i < I.dim1(); ++i)
{
m.begin(),m.end(),
I2.row_begin(i),
}
slip::block<float,3> m2 = {1.0,2.0,1.0};
for(size_t j = 0; j < I2.dim2(); ++j)
{
slip::same_convolution(I2.col_begin(j),I2.col_end(j),
m2.begin(),m2.end(),
I3.col_begin(j),
}
I3.write("lena_mean.gif");

Definition at line 543 of file convolution.hpp.

template<typename Vector1 , typename Vector2 , typename Vector3 >
void slip::same_convolution ( const Vector1 &  Signal,
const Vector2 &  Kernel,
Vector3 &  Result,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the same convolution of signal by a symmetric 1d-kernel.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal1D Container of the input Signal.
Kernel1D Container of the kernel.
Result1D Container of the convolution result.
btslip::BORDER_TREATMENT
Precondition
Result.size() == Signal.size()
symmetric_kernel1d.png
symmetric 1d kernel support
Description:
If the signal size is N, the size of the result will be N too. Different BORDER_TREATMENT can be done:
Example:
slip::Vector<float> result5(16);
slip::iota(Signal.begin(),Signal.end(),1.0,1.0);
std::cout<<"result5 = \n"<<result5<<std::endl;
std::cout<<"result5 = \n"<<result5<<std::endl;
std::cout<<"result5 = \n"<<result5<<std::endl;
std::cout<<"result5 = \n"<<result5<<std::endl;

Definition at line 602 of file convolution.hpp.

template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void slip::same_convolution2d ( SrcIter2d  S_up,
SrcIter2d  S_bot,
KernelIter2d  kernel_up,
KernelIter2d  kernel_bot,
int  ksize_left,
int  ksize_right,
int  ksize_up,
int  ksize_bot,
ResIter2d  R_up,
ResIter2d  R_bot,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the same convolution of 2d signal by a 2d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/21
Since
1.0.0
Version
0.0.1
Parameters
S_upA RandomAccessIterator2d.
S_botA RandomAccessIterator2d.
kernel_upA RandomAccessIterator2d.
kernel_botA RandomAccessIterator2d.
ksize_leftNumber of elements left to the central point of the mask.
ksize_rightNumber of elements right to the central point of the mask.
ksize_upNumber of elements up to the central point of the mask.
ksize_botNumber of elements bottom to the central point of the mask
R_upA RandomAccessIterator2d.
R_botA RandomAccessIterator2d.
btslip::BORDER_TREATMENT:
Precondition
(R_bot - R_up)[0] == (S_bot - S_up)[0]
(R_bot - R_up)[1] == (S_bot - S_up)[1]
(kernel_bot - kernel_up)[1] == ksize_left + ksize_right + 1
(kernel_bot - kernel_up)[0] == ksize_top + ksize_up + 1
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
slip::Array2d<float> ConvAs(A.rows(),A.cols());
slip::same_convolution2d(A.upper_left(),A.bottom_right(),
Mask2d.upper_left(),Mask2d.bottom_right(),
1,2,
2,1,
ConvAs.upper_left(),ConvAs.bottom_right(),
std::cout<<"ConvAs NEUMANN 1,2, 2,1 = \n"<<ConvAs<<std::endl;

Definition at line 1372 of file convolution.hpp.

template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void slip::same_convolution2d ( SrcIter2d  S_up,
SrcIter2d  S_bot,
KernelIter2d  kernel_up,
KernelIter2d  kernel_bot,
ResIter2d  R_up,
ResIter2d  R_bot,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the same convolution of 2d signal by a symmetric 2d-kernel support.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/21
Since
1.0.0
Version
0.0.1
Parameters
S_upA RandomAccessIterator2d.
S_botA RandomAccessIterator2d.
kernel_upA RandomAccessIterator2d.
kernel_botA RandomAccessIterator2d.
R_upA RandomAccessIterator2d.
R_botA RandomAccessIterator2d.
btslip::BORDER_TREATMENT:
Precondition
(R_bot - R_up)[0] == ((S_bot - S_up)[0] - (kernel_bot - kernel_up)[0] + 1)
(R_bot - R_up)[1] == ((S_bot - S_up)[1] - (kernel_bot - kernel_up)[1] + 1)
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
slip::Array2d<float> ConvAs(A.rows(),A.cols());
slip::same_convolution2d(A.upper_left(),A.bottom_right(),
Mask2d.upper_left(),Mask2d.bottom_right(),
ConvAs.upper_left(),ConvAs.bottom_right(),
std::cout<<"ConvAs NEUMANN = \n"<<ConvAs<<std::endl;

Definition at line 2056 of file convolution.hpp.

template<typename Container2d1 , typename Kernel2d , typename Container2d2 >
void slip::same_convolution2d ( const Container2d1 &  Signal,
const Kernel2d &  Kernel,
Container2d2 &  Result,
slip::BORDER_TREATMENT  bt 
)
inline

Computes the same convolution of 2d signal by a symmetric 2d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/08/21
Since
1.0.0
Version
0.0.1
Parameters
Signal2D Container of the input Signal.
Kernel2D Container of the kernel.
Result2D Container of the convolution result.
btslip::BORDER_TREATMENT:
Precondition
Result.size() == Signal.size()
symmetric_kernel2d.png
symmetric 2d kernel support
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
slip::Array2d<float> ConvAs(A.rows(),A.cols());
slip::same_convolution2d(A,Mask2d2,ConvAs,
std::cout<<"ConvAs ZERO_PADDED symmetric mask = \n"<<ConvAs<<std::endl;
ConvAs.fill(0.0f);
slip::same_convolution2d(A,Mask2d2,ConvAs,
std::cout<<"ConvAs NEUMANN symmetric mask = \n"<<ConvAs<<std::endl;
ConvAs.fill(0.0f);
slip::same_convolution2d(A,Mask2d2,ConvAs,
std::cout<<"ConvAs CIRCULAR symmetric mask = \n"<<ConvAs<<std::endl;

Definition at line 2120 of file convolution.hpp.

template<class Matrix1 , class Matrix2 , class Vector , class Matrix3 >
bool slip::schur ( const Matrix1 &  M,
Matrix2 &  H,
Matrix3 &  Z,
Vector &  Eig,
bool  compute_Z,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Matrix1::value_type>::value_type(1.0E-12) 
)
inline

computes the shur decomposition of a square Matrix and copy the eigenvalues in the Eig vector:

\[ M = Z \times H \times Z^{t}\]

Algorithm 7.5-2 in "Matrix Computations", Golub and Van Loan.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Since
1.0.0
Version
0.0.1
Parameters
M2D container for the Input Matrix
H2D container for the H matrix
Z2D container for the Z matrix
Eigcontainer for eigenvalues
compute_Ztrue if Z has to be computed
precisiondefines the precision of the iterations
Precondition
M.rows() == M.cols();
Z.rows() == Z.cols();
Eig.size() == M.cols();
Z.rows() == M.rows();
box.width() == box.height();
box.width() <= (int)M.rows();
Todo:
optimize Francis_Schur_decomp
Example:
double d[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0};
slip::schur(M,H,Z,Eig,true,10E-10);
std::cout<<" H \n"<<std::endl;
std::cout<< H <<std::endl;
std::cout<<" Z \n"<<std::endl;
std::cout<< Z <<std::endl;
std::cout<<" Eigenvalues\n"<<std::endl;
std::cout<< Eig <<std::endl;

Definition at line 1139 of file linear_algebra_qr.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 , typename MatrixIterator3 >
void slip::Schur_factorization_2by2 ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Z_up,
MatrixIterator2  Z_bot,
MatrixIterator3  D_up,
MatrixIterator3  D_bot 
)

Computes the Schur factorization of a real 2-by-2 2d container : $ A = Z \times D \times Z^{t*} $

\[ \left( \begin{array}{cc} a & b \\ c & d \end{array}\right) = \left( \begin{array}{cc} cs & -sn \\ sn & cs \end{array}\right) \times \left( \begin{array}{cc} D_{00} & D_{01} \\ D_{10} & D_{11} \end{array}\right) \times \left( \begin{array}{cc} cs & sn \\ -sn & cs \end{array}\right) \]

where :

  • $D_{10} = 0$ so that $D_{00}$ and $D_{11}$ are real eigenvalues of A, or
  • $D_{00} = D_{11}$ and $D_{10} = -D_{01}$, so that $D_{00} \pm |D_{10}|$ are complex conjugate eigenvalues
  • cs - cosine parameter of rotation matrix Z
  • sn - sine parameter of rotation matrix Z
Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/16
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
Z_up2D iterator on the upper_left element of Z container
Z_bot2D iterator on the bottom_right element of Z container
D_up2D iterator on the upper_left element of D container
D_bot2D iterator on the bottom_right element of D container
Precondition
every MatrixIterators have to be iterator2d_box type.
NbRows(A) == NbCols(A) == 2
NbRows(Z) == NbCols(Z) == 2
NbRows(D) == NbCols(D) == 2

Definition at line 497 of file linear_algebra_qr.hpp.

template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void slip::separable_convolution2d ( RandomAccessIterator2d1  I_up,
RandomAccessIterator2d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
std::size_t  ksize_left1,
std::size_t  ksize_right1,
slip::BORDER_TREATMENT  bt1,
KernelIter2  k2_first,
KernelIter2  k2_last,
std::size_t  ksize_left2,
std::size_t  ksize_right2,
slip::BORDER_TREATMENT  bt2,
RandomAccessIterator2d2  R_up 
)
inline

Computes the separable convolution of a 2d signal by two asymmetric 1d-kernels support.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/10/21
Since
1.0.0
Version
0.0.2
Parameters
I_upRandomAccessIterator2d on the upper_left element of the 2d signal range.
I_botRandomAccessIterator2d. on one past-the-end element of the 2d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
ksize_left1kernel size left to the "center" of the horizontal kernel
ksize_right1kernel size right to the "center" of the horizontal kernel
bt1slip::BORDER_TREATMENT associated with the horizontal kernel:
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
ksize_left2kernel size left to the "center" of the vertical kernel
ksize_right2kernel size right to the "center" of the vertical kernel
bt2slip::BORDER_TREATMENT associated with the vertical kernel:
R_upRandomAccessIterator2d on the upper_left element of the 2d convolved signal range.
Precondition
[I_up,I_bot) must be valid.
[R_up,R_up + (I_bot-I_up)) must be valid.
Example:
I.read("lena.gif");
slip::block<float,3> k1 = {1.0, 0.0, -1.0};
slip::block<float,3> k2 = {1.0,2.0,1.0};
std::size_t size = k1.size()/2;
k1.begin(),k1.end(),
size,size,
k2.begin(),k2.end(),
size,size,
Result.upper_left());
Examples:
color_edge_detection.cpp, and color_gaussian_filter.cpp.

Definition at line 842 of file convolution.hpp.

template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void slip::separable_convolution2d ( RandomAccessIterator2d1  I_up,
RandomAccessIterator2d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
KernelIter2  k2_first,
KernelIter2  k2_last,
RandomAccessIterator2d2  R_up,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the separable convolution of a 2d signal by two symmetric 1d-kernels support.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/10
Since
1.0.0
Version
0.0.1
Parameters
I_upRandomAccessIterator2d on the upper_left element of the 2d signal range.
I_botRandomAccessIterator2d. on one past-the-end element of the 2d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
R_upRandomAccessIterator2d on the upper_left element of the 2d convolved signal range.
btslip::BORDER_TREATMENT associated with the two kernels:
Precondition
[I_up,I_bot) must be valid.
[R_up,R_up + (I_bot-I_up)) must be valid.
Example:
I.read("lena.gif");
slip::block<float,3> k1 = {1.0, 0.0, -1.0};
slip::block<float,3> k2 = {1.0,2.0,1.0};
std::size_t size = k1.size()/2;
k1.begin(),k1.end(),
k2.begin(),k2.end(),
Result.upper_left(),

Definition at line 931 of file convolution.hpp.

template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Container2 >
void slip::separable_convolution2d ( const Container1 &  Signal,
const Kernel1 &  kernel1,
const Kernel2 &  kernel2,
Container2 &  Result,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the separable convolution of 2d signal by 2 symmetric 1d-kernel support.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal2D Container of the input Signal
kernel11D Container of the horizontal kernel
kernel21D Container of the vertical kernel
Result2D Container of the convolution result
btslip::BORDER_TREATMENT associated with the two kernels:
Precondition
Result.rows() >= Signal.rows()
Result.cols() >= Signal.cols()
Example:
I.read("lena.png");
slip::block<float,3> k1 = {1.0/4.0,2.0/4.0,1.0/4.0};
slip::block<float,3> k2 = {1.0/4.0,2.0/4.0,1.0/4.0};
k1,k2,
Result,
slip::BORDER_TREATMENT_NEUMANN);

Definition at line 995 of file convolution.hpp.

template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 >
void slip::separable_convolution2d ( RandomAccessIterator2d1  I_up,
RandomAccessIterator2d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
std::size_t  ksize_left1,
std::size_t  ksize_right1,
slip::BORDER_TREATMENT  bt1,
KernelIter2  k2_first,
KernelIter2  k2_last,
std::size_t  ksize_left2,
std::size_t  ksize_right2,
slip::BORDER_TREATMENT  bt2 
)
inline

Computes the in-place separable convolution of a 2d signal by two asymmetric 1d-kernels support.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/10/22
Since
1.2.0
Version
0.0.1
Parameters
I_upRandomAccessIterator2d on the upper_left element of the 2d signal range.
I_botRandomAccessIterator2d. on one past-the-end element of the 2d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
ksize_left1kernel size left to the "center" of the horizontal kernel
ksize_right1kernel size right to the "center" of the horizontal kernel
bt1slip::BORDER_TREATMENT associated with the horizontal kernel:
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
ksize_left2kernel size left to the "center" of the vertical kernel
ksize_right2kernel size right to the "center" of the vertical kernel
bt2slip::BORDER_TREATMENT associated with the vertical kernel:
Precondition
[I_up,I_bot) must be valid.
Example:
I.read("lena.gif");
slip::block<float,3> k1 = {1.0, 0.0, -1.0};
slip::block<float,3> k2 = {1.0,2.0,1.0};
std::size_t size = k1.size()/2;
k1.begin(),k1.end(),
size,size,
k2.begin(),k2.end(),
size,size,

Definition at line 1059 of file convolution.hpp.

template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void slip::separable_convolution3d ( RandomAccessIterator3d1  I_up,
RandomAccessIterator3d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
std::size_t  ksize_left1,
std::size_t  ksize_right1,
slip::BORDER_TREATMENT  bt1,
KernelIter2  k2_first,
KernelIter2  k2_last,
std::size_t  ksize_left2,
std::size_t  ksize_right2,
slip::BORDER_TREATMENT  bt2,
KernelIter3  k3_first,
KernelIter3  k3_last,
std::size_t  ksize_left3,
std::size_t  ksize_right3,
slip::BORDER_TREATMENT  bt3,
RandomAccessIterator3d2  R_up 
)
inline

Computes the separable convolution of a 3d signal by 3 asymmetric 1d-kernels.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/10/21
Since
1.0.0
Version
0.0.2
Parameters
I_upRandomAccessIterator3d on the upper_left element of the 3d signal range.
I_botRandomAccessIterator3d. on one past-the-end element of the 3d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
ksize_left1kernel size left to the "center" of the horizontal kernel
ksize_right1kernel size right to the "center" of the horizontal kernel
bt1slip::BORDER_TREATMENT associated with the horizontal kernel:
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
ksize_left2kernel size left to the "center" of the vertical kernel
ksize_right2kernel size right to the "center" of the vertical kernel
bt2slip::BORDER_TREATMENT associated with the vertical kernel:
k3_firstA RandomAccessIterator on the first element of the depth kernel.
k3_lastA RandomAccessIterator on one past-the-end element of the depth kernel.
ksize_left3kernel size left to the "center" of the depth kernel
ksize_right3kernel size right to the "center" of the depth kernel
bt3slip::BORDER_TREATMENT associated with the depth kernel:
R_upRandomAccessIterator3d on the upper_left element of the 3d convolved signal range.
Precondition
Size of the two range must be the same.
Example:
slip::Array3d<float> Signal3d(3,5,5);
slip::Array3d<float> Result3d(3,5,5);
slip::iota(A.front_upper_left(),A.back_bottom_right(),1.0,1.0);
slip::block<float,7> k1 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k2 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k3 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::separable_convolution3d(Signal3d.front_upper_left(),
Signal3d.back_bottom_right(),
k1.begin(),k1.end(),4,2,
k2.begin(),k2.end(),4,2,
k3.begin(),k3.end(),4,2,
Result3d.front_upper_left());

Definition at line 2596 of file convolution.hpp.

template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void slip::separable_convolution3d ( RandomAccessIterator3d1  I_up,
RandomAccessIterator3d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
KernelIter2  k2_first,
KernelIter2  k2_last,
KernelIter3  k3_first,
KernelIter3  k3_last,
RandomAccessIterator3d2  R_up,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the separable convolution of a 3d signal by 3 symmetric 1d-kernels.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/12
Since
1.0.0
Version
0.0.1
Parameters
I_upRandomAccessIterator3d on the upper_left element of the 3d signal range.
I_botRandomAccessIterator3d. on one past-the-end element of the 3d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
k3_firstA RandomAccessIterator on the first element of the depth kernel.
k3_lastA RandomAccessIterator on one past-the-end element of the depth kernel.
R_upRandomAccessIterator3d on the upper_left element of the 3d convolved signal range.
btslip::BORDER_TREATMENT associated with the kernels:
Precondition
Size of the two range must be the same.
Example:
slip::Array3d<float> Signal3d(3,5,5);
slip::Array3d<float> Result3d(3,5,5);
slip::iota(A.front_upper_left(),A.back_bottom_right(),1.0,1.0);
slip::block<float,7> k1 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k2 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k3 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::separable_convolution3d(Signal3d.front_upper_left(),
Signal3d.back_bottom_right(),
k1.begin(),k1.end(),
k2.begin(),k2.end(),
k3.begin(),k3.end(),
Result3d.front_upper_left(),

Definition at line 2728 of file convolution.hpp.

template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Kernel3 , typename Container2 >
void slip::separable_convolution3d ( const Container1 &  Signal,
const Kernel1 &  kernel1,
const Kernel2 &  kernel2,
const Kernel3 &  kernel3,
Container2 &  Result,
slip::BORDER_TREATMENT  bt = slip::BORDER_TREATMENT_ZERO_PADDED 
)
inline

Computes the separable convolution of 3d signal by a 3 1d-kernel.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal3D Container of the input Signal.
kernel11D Container of the horizontal kernel.
kernel21D Container of the vertical kernel.
kernel31D Container of the depth kernel.
Result3D Container of the convolution result.
btslip::BORDER_TREATMENT associated with the kernels:
Precondition
Result.slices() == Signal.slices()
Result.rows() == Signal.rows()
Result.cols() == Signal.cols()
Example:
I.read_from_images("lena%3d.png");
slip::Volume<float> Result(I.slices(),I.rows(),I.cols());
slip::block<float,3> k1 = {1.0/4.0,2.0/4.0,1.0/4.0};
slip::block<float,3> k2 = {1.0/4.0,2.0/4.0,1.0/4.0};
slip::block<float,3> k3 = {1.0/4.0,2.0/4.0,1.0/4.0};
slip::separable_convolution(Signal,
k1,k2,k3,
Result,
slip::BORDER_TREATMENT_NEUMANN);

Definition at line 2808 of file convolution.hpp.

template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 >
void slip::separable_convolution3d ( RandomAccessIterator3d1  I_up,
RandomAccessIterator3d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
std::size_t  ksize_left1,
std::size_t  ksize_right1,
slip::BORDER_TREATMENT  bt1,
KernelIter2  k2_first,
KernelIter2  k2_last,
std::size_t  ksize_left2,
std::size_t  ksize_right2,
slip::BORDER_TREATMENT  bt2,
KernelIter3  k3_first,
KernelIter3  k3_last,
std::size_t  ksize_left3,
std::size_t  ksize_right3,
slip::BORDER_TREATMENT  bt3 
)
inline

Computes the in-place separable convolution of a 3d signal by 3 asymmetric 1d-kernels.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/10/22
Since
1.2.0
Version
0.0.1
Parameters
I_upRandomAccessIterator3d on the upper_left element of the 3d signal range.
I_botRandomAccessIterator3d. on one past-the-end element of the 3d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
ksize_left1kernel size left to the "center" of the horizontal kernel
ksize_right1kernel size right to the "center" of the horizontal kernel
bt1slip::BORDER_TREATMENT associated with the horizontal kernel:
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
ksize_left2kernel size left to the "center" of the vertical kernel
ksize_right2kernel size right to the "center" of the vertical kernel
bt2slip::BORDER_TREATMENT associated with the vertical kernel:
k3_firstA RandomAccessIterator on the first element of the depth kernel.
k3_lastA RandomAccessIterator on one past-the-end element of the depth kernel.
ksize_left3kernel size left to the "center" of the depth kernel
ksize_right3kernel size right to the "center" of the depth kernel
bt3slip::BORDER_TREATMENT associated with the depth kernel:
Example:
slip::Array3d<float> Signal3d(3,5,5);
slip::Array3d<float> Result3d(3,5,5);
slip::iota(A.front_upper_left(),A.back_bottom_right(),1.0,1.0);
slip::block<float,7> k1 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k2 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::block<float,7> k3 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,7.0};
slip::separable_convolution3d(Signal3d.front_upper_left(),
Signal3d.back_bottom_right(),
k1.begin(),k1.end(),4,2,
k2.begin(),k2.end(),4,2,
k3.begin(),k3.end(),4,2,

Definition at line 2887 of file convolution.hpp.

template<typename RandomAccessIterator2d1 , typename KernelIter1 , typename KernelIter2 , typename RandomAccessIterator2d2 >
void slip::separable_fft_convolution2d ( RandomAccessIterator2d1  I_up,
RandomAccessIterator2d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
KernelIter2  k2_first,
KernelIter2  k2_last,
RandomAccessIterator2d2  R_up 
)
inline

Computes the separable 2d convolution of signal using the fft algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/10
Since
1.0.0
Version
0.0.1
Parameters
I_upRandomAccessIterator2d on the upper_left element of the 2d signal range.
I_botRandomAccessIterator2d. on one past-the-end element of the 2d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
R_upRandomAccessIterator2d on the upper_left element of the 2d convolved signal range.
Precondition
Size of the two range must be the same.
Example:
I.read("lena.gif");
slip::block<float,3> k1 = {1.0, 0.0, -1.0};
slip::block<float,3> k2 = {1.0,2.0,1.0};
std::size_t size = k1.size()/2;
k1.begin(),k1.end(),
k2.begin(),k2.end(),
Result.upper_left());

Definition at line 1142 of file convolution.hpp.

template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Container2 >
void slip::separable_fft_convolution2d ( const Container1 &  Signal,
const Kernel1 &  kernel1,
const Kernel2 &  kernel2,
Container2 &  Result 
)
inline

Computes the fft convolution of a 2d signal.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal2D Container of the input Signal
kernel11D Container of the horizontal kernel
kernel21D Container of the vertical kernel
Result2D Container of the convolution result
Precondition
Result.rows() == Signal.rows()
Result.cols() == Signal.cols()
Example:
I.read("lena.png");
slip::block<float,3> k1 = {1.0/4.0,2.0/4.0,1.0/4.0};
slip::block<float,3> k2 = {1.0/4.0,2.0/4.0,1.0/4.0};
k1,k2,
Result);

Definition at line 1206 of file convolution.hpp.

template<typename RandomAccessIterator3d1 , typename KernelIter1 , typename KernelIter2 , typename KernelIter3 , typename RandomAccessIterator3d2 >
void slip::separable_fft_convolution3d ( RandomAccessIterator3d1  I_up,
RandomAccessIterator3d1  I_bot,
KernelIter1  k1_first,
KernelIter1  k1_last,
KernelIter2  k2_first,
KernelIter2  k2_last,
KernelIter3  k3_first,
KernelIter3  k3_last,
RandomAccessIterator3d2  R_up 
)
inline

Computes the separable 3d convolution of signal using the fft algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/10
Since
1.0.0
Version
0.0.1
Parameters
I_upRandomAccessIterator3d on the upper_left element of the 3d signal range.
I_botRandomAccessIterator3d. on one past-the-end element of the 3d signal range.
k1_firstA RandomAccessIterator on the first element of the horizontal kernel.
k1_lastA RandomAccessIterator on one past-the-end element of the horizontal kernel.
k2_firstA RandomAccessIterator on the first element of the vertical kernel.
k2_lastA RandomAccessIterator on one past-the-end element of the vertical kernel.
k3_firstA RandomAccessIterator on the first element of the depth kernel.
k3_lastA RandomAccessIterator on one past-the-end element of the depth kernel.
R_upRandomAccessIterator3d on the upper_left element of the 3d convolved signal range.
Precondition
Size of the two range must be the same.
Example:
slip::Volume<float> V3(16,16,16);
slip::Volume<float> V3r(16,16,16);
slip::iota(V3.begin(),V3.end(),1.0f);
slip::block<float,3> ke1 = {0.25f, 0.5f, 0.25f};
slip::block<float,3> ke2 = {0.25f, 0.5f, 0.25f};
slip::block<float,3> ke3 = {0.5f, 0.0f, -0.5f};
slip::separable_fft_convolution3d(V3.front_upper_left(),
V3.back_bottom_right(),
ke1.begin(),ke1.end(),
ke2.begin(),ke2.end(),
ke3.begin(),ke3.end(),
V3r.front_upper_left());
std::cout<<V3r<<std::endl;

Definition at line 3013 of file convolution.hpp.

template<typename Container1 , typename Kernel1 , typename Kernel2 , typename Kernel3 , typename Container2 >
void slip::separable_fft_convolution3d ( const Container1 &  Signal,
const Kernel1 &  kernel1,
const Kernel2 &  kernel2,
const Kernel3 &  kernel3,
Container2 &  Result 
)
inline

Computes the separable fft convolution of 3d signal by 3 1d-kernel.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
Signal3D Container of the input Signal.
kernel11D Container of the horizontal kernel.
kernel21D Container of the vertical kernel.
kernel31D Container of the depth kernel.
Result3D Container of the convolution result.
Precondition
Result.slices() == Signal.slices()
Result.rows() == Signal.rows()
Result.cols() == Signal.cols()
Example:
slip::Volume<float> V3(16,16,16);
slip::Volume<float> V3r(16,16,16);
slip::iota(V3.begin(),V3.end(),1.0f);
slip::block<float,3> ke1 = {0.25f, 0.5f, 0.25f};
slip::block<float,3> ke2 = {0.25f, 0.5f, 0.25f};
slip::block<float,3> ke3 = {0.5f, 0.0f, -0.5f};
ke1,
ke2,
ke3,
V3r);
std::cout<<V3r<<std::endl;

Definition at line 3120 of file convolution.hpp.

template<typename Container2d , typename RandomAccessIterator1 >
void slip::set_diagonal ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
Container2d &  container,
const int  diag_number = 0 
)

Set the diagonal [diag_first,diag_last) in the diagonal diag_number of a 2d container.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the first element of the diagonal.
diag_lastRandomAccessIterator to one past-the-end element of the diagonal.
containerA 2d container
diag_numbernumber of the diagonal:
  • 0 the diagonal (default value)
  • a negative number corresponds to a lower diagonal
  • a positive number corresponds to an upper diagonal
Precondition
container.dim1() == container.dim2()
std::abs(diag_number) < container.dim1()
(diag_last - diag_first) <= container.dim1()
Example:
diag0.fill(0.0);
diag1.fill(1.0);
diagm1.fill(-1.0);
diag2.fill(2.0);
diagm2.fill(-2.0);
std::cout<<"AA ="<<std::endl;
std::cout<<AA<<std::endl;
std::cout<<"set main diagonal with : "<<diag0<<std::endl;
slip::set_diagonal(diag0.begin(),diag0.end(),AA);
std::cout<<"set first upper diagonal with : "<<diag1<<std::endl;
slip::set_diagonal(diag1.begin(),diag1.end(),AA,1);
std::cout<<"set first lower diagonal with : "<<diagm1<<std::endl;
slip::set_diagonal(diagm1.begin(),diagm1.end(),AA,-1);
std::cout<<"set second upper diagonal with : "<<diag2<<std::endl;
slip::set_diagonal(diag2.begin(),diag2.end(),AA,2);
std::cout<<"set second lower diagonal with : "<<diagm2<<std::endl;
slip::set_diagonal(diagm2.begin(),diagm2.end(),AA,-2);
std::cout<<"new AA ="<<std::endl;
std::cout<<AA<<std::endl;

Definition at line 3442 of file linear_algebra.hpp.

template<typename Real >
void slip::shift ( Real &  p,
Real &  r,
Real &  q,
Real &  sigma 
)

Given a matrix

\[ M = \left( \begin{array}{cc} p&r\\ 0&q\\ \end{array} \right) \]

compute the smallest singular value of this matrix.

Author
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/02/11
Since
1.0.0
Version
0.0.1
Parameters
pelement of the matrix M
relement of the matrix M.
qelement of the matrix M.
sigmasmallest singular value of this matrix.

Definition at line 418 of file linear_algebra_svd.hpp.

template<typename T >
T slip::sign ( a)
inline

Computes the sign of a.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/16
Since
1.0.0
Version
0.0.1
Parameters
aof generic type T
Returns
$ \frac{a}{abs(a)}$ if a != 0; T(1) if a == 0.

Definition at line 233 of file macros.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::sin ( const kvector< T, N > &  V)
related

Definition at line 1491 of file KVector.hpp.

template<typename T >
Vector<T> slip::sin ( const Vector< T > &  V)
related

Definition at line 2066 of file Vector.hpp.

template<typename T >
Signal<T> slip::sin ( const Signal< T > &  V)
related

Definition at line 2079 of file Signal.hpp.

template<typename T >
Matrix<T> slip::sin ( const Matrix< T > &  M)
related

Definition at line 3945 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::sin ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5101 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::sin ( const Matrix4d< T > &  M)
related

Definition at line 5110 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::sin ( const Matrix3d< T > &  M)
related

Definition at line 5751 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::sin ( const Volume< T > &  M)
related

Definition at line 6068 of file Volume.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::sinh ( const kvector< T, N > &  V)
related

Definition at line 1593 of file KVector.hpp.

template<typename T >
Vector<T> slip::sinh ( const Vector< T > &  V)
related

Definition at line 2161 of file Vector.hpp.

template<typename T >
Signal<T> slip::sinh ( const Signal< T > &  V)
related

Definition at line 2174 of file Signal.hpp.

template<typename T >
Matrix<T> slip::sinh ( const Matrix< T > &  M)
related

Definition at line 4040 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::sinh ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5164 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::sinh ( const Matrix4d< T > &  M)
related

Definition at line 5173 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::sinh ( const Matrix3d< T > &  M)
related

Definition at line 5814 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::sinh ( const Volume< T > &  M)
related

Definition at line 6131 of file Volume.hpp.

template<typename T , typename InputIterator >
T slip::skewness ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the skewness of a range

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
    Date
    2009/09/09
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    std_devThe standard deviation of the container itself.
    Returns
    The value of the skewness of the container.
    Precondition
    [first,last) must be valid.
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    double mean = slip::mean<double>(M.begin(),M.end());
    std::cout<<slip::skewness(M.begin(),M.end(),mean)<<std::endl;

Definition at line 770 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::skewness_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the skewness of a range using a predicate

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    meanThe mean of the range itself using the predicate.
    preda predicate function
    Returns
    The value of the skewness of the range using the predicate.
    Precondition
    [first,last) must be valid.
    Example:
    //definition of the predicate less than 10
    bool myPredicate (const double& val)
    {
    return (val<10);
    }
    //construction of the array
    slip::iota(M.begin(),M.end(),1,1);
    double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
    std::cout<<slip::skewness_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 3188 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::skewness_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the skewness of a range over a mask

\[\frac{\frac{1}{n}\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    mask_firstAn InputIterator on the mask
    meanThe mean of the range itself over the mask.
    valueMask value.
    Returns
    The value of the skewness of the range over the mask.
    Precondition
    [first,last) must be valid.
    Range and the Mask must have the same dimensions
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    slip::Array2d<int> ValuedMask(4,5,2);
    for(std::size_t i = 0; i < M.dim1(); ++i)
    {
    ValuedMask[i][0]= 0;
    }
    for(std::size_t j = 0; j < M.dim2(); ++j)
    {
    ValuedMask[0][j]=0;
    }
    double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
    std::cout<<slip::skewness_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 2047 of file statistics.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::snr ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the signal to noise ration (snr) of two ranges : $\sum_i \frac{s_i*s_i}{(s_i - b_i)^2}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
first1An InputIterator to the first element of the signal.
last1An InputIterator to the one past-the-end element of the signal.
first2An InputIterator to the "noise" range.
Returns
snr of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::snr<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 799 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::snr_dB ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)
inline

Computes the decibel signal to noise ration (snr) of two ranges : $ 20.0*\log{\sum_i \frac{s_i*s_i}{(s_i - b_i)^2}}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.2
Parameters
first1An InputIterator to the first element of the signal.
last1An InputIterator to the one past-the-end element of the signal.
first2An InputIterator to the "noise" range.
Returns
snr in dB unit of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::snr_dB<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 948 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::snr_dB_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the decibel signal to noise ration (snr) of two ranges according to a predicate: $ 20.0*\log{\sum_{i / pred = true} \frac{s_i*s_i}{(s_i - b_i)^2}}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
Returns
snr_dB of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::snr_dB_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 1027 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::snr_dB_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the decibel signal to noise ration (snr) of two ranges according to a mask sequence : $ 20.0*\log{\sum_{i / mask_i = value} \frac{s_i*s_i}{(s_i - b_i)^2}}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
snr_dB of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::snr_dB_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 984 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::snr_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the signal to noise ration (snr) of two ranges according to a Predicate.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
predA predicate.
Returns
snr in dB of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
std::cout<<slip::snr_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 903 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::snr_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the signal to noise ration (snr) of two ranges according to a mask sequence : $\sum_{i / mask_i = value} \frac{s_i*s_i}{(s_i - b_i)^2}$.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/11
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
snr of the two ranges.
Precondition
[first1,last1) is a valid range.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Real must be Assignable.
Example:
float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
float f3[] = {1,1,1,0,0,1};
slip::Matrix<float> Mask(2,3,f3);
std::cout<<slip::snr_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 845 of file compare.hpp.

template<class Matrix1 >
slip::lin_alg_traits<typename Matrix1::value_type>::value_type slip::spectral_radius ( const Matrix1 &  A)
inline

Spectral radius of a matrix $ \rho(A) = \max_i \{ |\lambda_i|\}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2014/03/13
Since
1.0.0
Version
0.0.2
Parameters
AMatrix container
Example:
std::cout<<"Meig = \n"<<Meig<<std::endl;
std::cout<<"spectral radius = \n"<<slip::spectral_radius(Meig)<<std::endl;

Definition at line 268 of file linear_algebra_eigen.hpp.

std::size_t slip::split_extension ( const std::string &  file_path_name,
std::string &  file_path_name_cut,
std::string &  ext 
)
inline

Split a file_name in two substrings: the file_path_name string without the extension and the extension string.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2009/03/27
Since
1.0.0
Parameters
file_path_nameString of the file path name
file_path_name_cutString of the file path name cut
extextension string.
Returns
size_t indicating the position of the . of the extension.
Example1:
std::string ext;
std::string file_path_cut;
std::size_t pos = slip::split_extension("/toto/titi/tutu000_a.tiff",file_path_cut,ext);
std::cout<<"file_path_cut = "<<file_path_cut<<std::endl;
std::cout<<"ext = "<<ext<<std::endl;
std::cout<<"pos = "<<pos<<std::endl;
//will print:
//file_path_cut = /toto/titi/tutu000_a
//ext = .tiff
//pos = 20
Examples:
av_file_io.cpp, fits_file_io.cpp, jpg_file_io.cpp, netcdf_file_io.cpp, and wav_file_io.cpp.

Definition at line 159 of file io_tools.hpp.

template<class InputIter , class OutputIter >
void slip::split_radix_dct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the split radix Discrete Cosinus Transform II of a container (from FFTPACK.hpp).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data)
Postcondition
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$
another normalization by $\frac{1}{2}$ was done in order to obtain the same results than the fftw_dct function
Example:
typedef double tt;
tt a[] = { tt(0), tt(1), tt(3), tt(4), tt(4), tt(3),tt(1),tt(0)};
tt b[8];
for(int i = 0; i < 8; ++i)
std::cout<<b[i]<<" ";
std::cout<<std::endl;

Definition at line 1536 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::split_radix_idct ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the split radix Discrete Cosinus Transform III (i.e. idct) of a container (from FFTPACK.hpp).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/03/20
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
size(b) >= size(a).)
Postcondition
ouput data are normalized by $\frac{1}{\sqrt{2\times N}}$
Example:
...
tt b2[8];
for(int i = 0; i < 8; ++i)
std::cout<<b2[i]<<" ";
std::cout<<std::endl<<std::endl;

Definition at line 1492 of file FFT.hpp.

template<class InputIter , class OutputIter >
void slip::split_radix_ifft ( InputIter  in_begin,
InputIter  in_end,
OutputIter  out_begin 
)
inline

Computes the split radix fft backward of a container (from FFTPACK.hpp).

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_beginA BidirectionalIterator to iterate from the beginning of the input data
in_endA BidirectionalIterator to iterate from the end of the input data
out_beginA BidirectionalIterator to iterate from the beginning of the output data
Precondition
the input data have to be std::complex
Example:
...
slip::Array<cx> b2(N,cx(0));
slip::split_radix_ifft(b.begin(),b.end(),b2.begin());

Definition at line 880 of file FFT.hpp.

template<typename InputBidirectionalIterator2d , typename OutputBidirectionalIterator2d >
void slip::split_radix_ifft2d ( InputBidirectionalIterator2d  in_upper_left,
InputBidirectionalIterator2d  in_bottom_right,
OutputBidirectionalIterator2d  out_upper_left 
)
inline

Computes the split-radix ifft2d of a container with 2d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2007/11/29
Since
1.0.0
Version
0.0.1
Parameters
in_upper_left
in_bottom_right
out_upper_left
Precondition
the input data have to be std::complex
the 2d range must have the same sizes
Example:
...
//ifft2d
slip::split_radix_ifft2d(IFFT.upper_left(),IFFT.bottom_right(),IOut.upper_left());
for(size_t i = 0; i < IOut.dim1(); ++i)
for(size_t j = 0; j < IOut.dim2(); ++j)
INorm[i][j] = std::abs(IOut[i][j]);
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_ifft.png");

Definition at line 1039 of file FFT.hpp.

template<typename InputMatrix , typename OutputMatrix >
void slip::split_radix_ifft2d ( InputMatrix &  datain,
OutputMatrix &  dataout 
)
inline

Computes the split-radix ifft2d of a container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2007/12/05
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain and dataout must have cols and rows iterator
datin and dataout must have the same size
the input data have to be std::complex
Example:
...
//ifft2d
for(size_t i = 0; i < IOut.dim1(); ++i)
for(size_t j = 0; j < IOut.dim2(); ++j)
INorm[i][j] = std::abs(IOut[i][j]);
slip::change_dynamic_01(INorm.begin(),INorm.end(),INorm.begin(),slip::AFFINE_FUNCTION);
INorm.write("lena_ifft.png");

Definition at line 1138 of file FFT.hpp.

template<typename InputBidirectionalIterator3d , typename OutputBidirectionalIterator3d >
void slip::split_radix_ifft3d ( InputBidirectionalIterator3d  in_front_upper_left,
InputBidirectionalIterator3d  in_back_bottom_right,
OutputBidirectionalIterator3d  out_front_upper_left 
)
inline

Computes the split-radix ifft3d of a container with 3d iterators.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/01/29
Since
1.0.0
Version
0.0.1
Parameters
in_front_upper_left
in_back_bottom_right
out_front_upper_left
Precondition
the input data have to be std::complex
the 3d range must have the same sizes
Example:
...
std::complex<double> Czero(0,0);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
slip::split_radix_ifft3d(OFFT.front_upper_left(),OFFT.back_bottom_right(),OC.front_upper_left());
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
{
Out[z][i][j] = std::abs(OC[z][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);
Out.write_raw("volume_ifft.vol");

Definition at line 1251 of file FFT.hpp.

template<typename InputMatrix3d , typename OutputMatrix3d >
void slip::split_radix_ifft3d ( InputMatrix3d &  datain,
OutputMatrix3d &  dataout 
)
inline

Computes the split-radix ifft3d of a container 3d.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr> : conceptor
Date
2008/01/29
Since
1.0.0
Version
0.0.1
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator3d available
datin and dataout must have the same size
the input data have to be std::complex
Example:
...
std::complex<double> Czero(0,0);
slip::Volume<double> Out(M.dim1(),M.dim2(),M.dim3(),1);
for(size_t z = 0; z < OFFT.dim1(); ++z)
for(size_t i = 0; i < OFFT.dim2(); ++i)
for(size_t j = 0; j < OFFT.dim3(); ++j)
{
Out[z][i][j] = std::abs(OC[z][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);
Out.write_raw("volume_ifft.vol");

Definition at line 1455 of file FFT.hpp.

template<typename InputBidirectionalIterator4d , typename OutputBidirectionalIterator4d >
void slip::split_radix_ifft4d ( InputBidirectionalIterator4d  in_first_front_upper_left,
InputBidirectionalIterator4d  in_last_back_bottom_right,
OutputBidirectionalIterator4d  out_first_front_upper_left 
)
inline

Computes the split-radix ifft4d of a container with 4d iterators.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
in_first_front_upper_left
in_last_back_bottom_right
out_first_front_upper_left
Precondition
the input data have to be std::complex
the 4d range must have the same sizes
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix4d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperHyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
slip::split_radix_ifft4d(OFFT.first_front_upper_left(),OFFT.last_back_bottom_right(),OC.first_front_upper_left());
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
{
Out[t][k][i][j] = std::abs(OC[t][k][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);

Definition at line 3293 of file FFT.hpp.

template<typename InputMatrix4d , typename OutputMatrix4d >
void slip::split_radix_ifft4d ( const InputMatrix4d &  datain,
OutputMatrix4d &  dataout 
)
inline

Computes the split-radix ifft4d of a container 4d.

Version
Fluex 1.0
Author
Denis Arrivault <Denis.Arrivault_AT_inria.fr>
Date
2013/08/23
Since
1.4.0
Parameters
datainThe input datas
dataoutThe output datas
Precondition
datain.cols() == dataout.cols()
datain.rows() == dataout.rows()
datain.slices() == dataout.slices()
datain and dataout must have iterator4d available
datin and dataout must have the same size
the input data have to be std::complex
Example:
...
std::complex<double> Czero(0,0);
slip::Matrix4d<std::complex<double> > OC(M.dim1(),M.dim2(),M.dim3(),M.dim4(),Czero);
slip::HyperHyperVolume<double> Out(M.dim1(),M.dim2(),M.dim3(),M.dim4(),1);
for(size_t t = 0; t < OFFT.dim1(); ++t)
for(size_t k = 0; k < OFFT.dim2(); ++k)
for(size_t i = 0; i < OFFT.dim3(); ++i)
for(size_t j = 0; j < OFFT.dim4(); ++j)
{
Out[t][k][i][j] = std::abs(OC[t][k][i][j]);
}
slip::change_dynamic_01(Out.begin(),Out.end(),Out.begin(),slip::AFFINE_FUNCTION);

Definition at line 3456 of file FFT.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::sqrt ( const kvector< T, N > &  V)
related

Definition at line 1445 of file KVector.hpp.

template<typename T >
Vector<T> slip::sqrt ( const Vector< T > &  V)
related

Definition at line 2023 of file Vector.hpp.

template<typename T >
Signal<T> slip::sqrt ( const Signal< T > &  V)
related

Definition at line 2036 of file Signal.hpp.

template<typename T >
Matrix<T> slip::sqrt ( const Matrix< T > &  M)
related

Definition at line 3902 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::sqrt ( const HyperVolume< T > &  M)
related
template<typename T >
Matrix4d<T> slip::sqrt ( const Matrix4d< T > &  M)
related

Definition at line 5083 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::sqrt ( const Matrix3d< T > &  M)
related

Definition at line 5724 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::sqrt ( const Volume< T > &  M)
related

Definition at line 6041 of file Volume.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 >
Real slip::SSIM ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Real  d = static_cast<Real>(255) 
)
inline

Computes the Structural SIMilarity (SSIM) beetween two data ranges

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where.

  • $\mu_x$ is the mean of x
  • $\mu_y$ is the mean of y
  • $\sigma_x^2$ is the variance of x
  • $\sigma_y^2$ is the variance of y
  • $cov_{xy}$ is the covariance of x and y
  • $c_1 = (0.01d)^2$, $c_2 = (0.03d)^2$ two variable to avoid division by 0
    Description:
    The SSIM as been created to measure the quality of a compressed image with the original one. Usually the SSIM is computed on 8x8 windows.
    Reference:
    Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, avril 2004.
    Author
    Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
    Date
    2009/03/30
    Since
    1.2.0
    Version
    0.0.1
    Parameters
    first1An InputIterator.
    last1An InputIterator.
    first2An InputIterator.
    dpixel dynamic (255 by default).
    Returns
    the structural Similarity value
    Precondition
    [first1,last1) is a valid range.
    [first2,first2 + (last1 - first1)) is a valid range.
    Real must be Assignable
    Example1:
    float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
    float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
    std::cout<<slip::SSIM<float>(M1.begin(),M1.end(),M2.begin())<<std::endl;

Definition at line 2222 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename Predicate >
Real slip::SSIM_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred,
Real  d = 255 
)
inline

Computes the Sructural SIMilarity (SSIM) beetween two data ranges according to a predicate

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where.

  • $\mu_x$ is the mean of x
  • $\mu_y$ is the mean of y
  • $\sigma_x^2$ is the variance of x
  • $\sigma_y^2$ is the variance of y
  • $cov_{xy}$ is the covariance of x and y
  • $c_1 = (0.01d)^2$, $c_2 = (0.03d)^2$ two variable to avoid division by 0
    Description:
    The SSIM as been created to measure the quality of a compressed image with the original one. Usually the SSIM is computed on 8x8 windows.
    Reference:
    Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, avril 2004.
    Author
    Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
    Date
    2009/03/30
    Since
    1.2.0
    Version
    0.0.1
    Parameters
    first1An InputIterator.
    last1An InputIterator.
    first2An InputIterator.
    predA predicate.
    dpixel dynamic (255 by default)
    Returns
    the structural Similarity algorithms
    Precondition
    [first1,last1) is a valid range.
    [first2,first2 + (last1 - first1)) is a valid range.
    Real must be Assignable
    Example:
    bool lt5Predicate (const T& val)
    {
    return (val < T(5));
    };
    float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
    float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
    std::cout<<slip::SSIM_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 2367 of file compare.hpp.

template<typename Real , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
Real slip::SSIM_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  maskFirst,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1),
Real  d = static_cast<Real>(255) 
)
inline

Computes the structural similarity beetween two data ranges according to a mask range

\[ SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2cov_{xy}+c_2)}{(\mu_x^2+\mu_y^2+c_1)(\sigma_x^2+\sigma_y^2+c_2)} \]

where.

  • $\mu_x$ is the mean of x
  • $\mu_y$ is the mean of y
  • $\sigma_x^2$ is the variance of x
  • $\sigma_y^2$ is the variance of y
  • $cov_{xy}$ is the covariance of x and y
  • $c_1 = (0.01d)^2$, $c_2 = (0.03d)^2$ two variable to avoid division by 0
    Description:
    The SSIM as been created to measure the quality of a compressed image with the original one. Usually the SSIM is computed on 8x8 windows.
    Reference:
    Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, avril 2004.
    Author
    Thibault Roulier <troulier_AT_sic.univ-poitiers.fr>
    Date
    2009/03/30
    Since
    1.2.0
    Version
    0.0.1
    Parameters
    first1An InputIterator.
    last1An InputIterator.
    maskFirstA MaskIterator
    first2An InputIterator.
    valueA value corresponding to the mask
    dpixel dynamic (255 by default)
    Returns
    the structural Similarity algorithms
    Precondition
    [first1,last1) is a valid range.
    [first2,first2 + (last1 - first1)) is a valid range.
    Real must be Assignable
    Example:
    //compute SSIM
    float f1[] = {1.3,2.0,3.0,4.5,5.0,6.0};
    float f2[] = {5.0,4.0,5.0,4.4,5.0,4.0};
    float f3[] = {1,1,1,0,0,1};
    slip::Matrix<float> Mask(2,3,f3);
    std::cout<<slip::SSIM_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 2288 of file compare.hpp.

template<typename InputIterator , typename T >
void slip::statistics ( InputIterator  first,
InputIterator  last,
slip::Statistics< T > &  statistic 
)

compute all statistics of a range

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
statisticslip::statistics
Returns
a range which contains all its statistics
Example:
int f[]={6, 47, 49, 15, 43, 41, 7, 39, 43, 41, 36};
std::cout<<"M=\n"<<M<<std::endl;
slip::statistics(M.begin(),M.end(),stat);
std::cout<<"min, first quartile, median, third quartile, maximum,
mean, standard deviation, skewness, kurtosis and cardinal"<<std::endl;
std::cout<<stat.all()<<std::endl;
Examples:
statistics_example.cpp.

Definition at line 3665 of file statistics.hpp.

template<typename InputIterator , typename T , typename Predicate >
void slip::statistics_if ( InputIterator  first,
InputIterator  last,
slip::Statistics< T > &  statistic,
Predicate  pred 
)

compute all statistics of a range according to a preidcate.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
statisticslip::statistics
preda predicate function.
Returns
a range which contains all its statistics
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
slip::statistics_if(M.begin(),M.end(),S,myPredicate);
std::cout<<"statistics using a predicate"<<std::endl;
std::cout<<S.all()<<std::endl;

Definition at line 3954 of file statistics.hpp.

template<typename InputIterator , typename T , typename MaskIterator >
void slip::statistics_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
slip::Statistics< T > &  statistic,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)

compute all statistics of a range according to a mask range.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator of the mask
statisticslip::Statistics which contains all the statistics of the range.
valueMask value.
Example1:
slip::Array2d<bool> Mask(4,5,true);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
Mask[i][0]=false;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
Mask[0][j]=false;
}
std::cout << "Data : "<<std::endl<<M<<std::endl;
std::cout << "Mask : "<< std::endl<<Mask<<std::endl;
slip::statistics_mask(M.begin(),M.end(),Mask.begin(),S);
std::cout<<"statistics mask"<<std::endl;
std::cout<<S.all()<<std::endl;
Example2:
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout << "Data : "<<std::endl<<M<<std::endl;
std::cout << "ValuedMask : "<< std::endl<<ValuedMask<<std::endl;
slip::statistics_mask(M.begin(),M.end(),ValuedMask.begin(),S,2);
std::cout<<"statistics mask"<<std::endl;
std::cout<<S.all()<<std::endl;

Definition at line 3791 of file statistics.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 >
T slip::std_crosscorrelation ( InputIterator1  first,
InputIterator1  last,
InputIterator2  first2 
)
inline

Computes the standard crosscorrelation between two sequences: $ \sum_i x_i y_i $. Multiplies successive elements from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/09
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
Returns
A value equals to the standard crosscorrelation of the two sequences.
Precondition
[first,last) must be valid.
[first2,first2 + (last - first)) is a valid range.
Example:
float f[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::std_crosscorrelation<float>(M.begin(),M.end(),M2.begin())<<std::endl;
Example2:
//finding a motif by crosscorrelation
slip::Matrix<float> Motif(8,8,0.0);
slip::iota(Motif.begin(),Motif.end(),8.0,1.0);
slip::Matrix<float> I(128,128,0.0);
slip::iota(Motif.begin(),Motif.end(),0.0,1.0);
slip::Matrix<float> Result(16,16,0.0);
for(std::size_t i = 0; i < I.dim1(); i+=8)
{
for(std::size_t j = 0; j < I.dim2(); j+=8)
{
slip::Box2d<int> box(i,j,i+7,j+7);
Result[i/8][j/8] = slip::std_crosscorrelation<float>(I.upper_left(box),I.bottom_right(box),Motif.begin());
}
}

Definition at line 180 of file correlation.hpp.

template<typename Real , typename InputIterator2d1 , typename InputIterator2d2 , typename OutputIterator2d >
void slip::std_crosscorrelation2d ( InputIterator2d1  in1_upper_left,
InputIterator2d1  in1_bottom_right,
InputIterator2d2  in2_upper_left,
InputIterator2d2  in2_bottom_right,
OutputIterator2d  out_upper_left,
OutputIterator2d  out_bottom_right 
)
inline

Computes the standard crosscorrelation between two Images.

Author
Denis Arrivault <denis.arrivault_AT_sic.univ-poitiers.fr>
Date
2008/01/30
Since
1.0.0
Version
0.0.1
Parameters
in1_upper_left: A 2d input iterator (image).
in1_bottom_right: A 2d input iterator (image).
in2_upper_left: A 2d input iterator (mask).
in2_bottom_right: A 2d input iterator (mask).
out_upper_left: A 2d output iterator (result).
out_bottom_right: A 2d output iterator (result).
Precondition
[in1_upper_left,in1_bottom_right) is valid
[in2_upper_left,in2_upper_left + (in1_bottom_right - in1_upper_left)) must be valid.
(out_bottom_right - out_upper_left) == (in1_bottom_right - in1_upper_left)
the value_type of the input sequences have to be real (not complex)

Definition at line 2117 of file correlation.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 , typename Predicate >
T slip::std_crosscorrelation_if ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
Predicate  pred 
)

Computes the standard crosscorrelation between two sequences according to a Predicate. $ \sum_i x_i y_i $.

Author
Hammoud Mouhamed<hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
first2An InputIterator.
predA predicate.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first1,last1) must be valid.
[first2,first2 + (last1 - first1)) is a valid range.
Example:
bool lt5Predicate (const T& val)
{
return (val < T(5));
};
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
std::cout<<slip::std_crosscorrelation_if<float>(M1.begin(),M1.end(),M2.begin(),lt5Predicate<float>)<<std::endl;

Definition at line 278 of file correlation.hpp.

template<typename T , typename InputIterator1 , typename InputIterator2 , typename MaskIterator >
T slip::std_crosscorrelation_mask ( InputIterator1  first1,
InputIterator1  last1,
MaskIterator  mask_first,
InputIterator2  first2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the standard crosscorrelation between two sequences according to a mask sequence $ \sum_i x_i y_i $. Multiplies successive elements accordind to a mask sequence from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Date
2008/12/15
Since
1.0.0
Version
0.0.1
Parameters
first1An InputIterator.
last1An InputIterator.
mask_firstAn input iterator.
first2An InputIterator.
valuetrue value of the mask range. Default is 1.
Returns
A value equals to the standard crosscorrelation of the two sequences
Precondition
[first1,last1) must be valid.
[first2,first2 + (last1 - first1)) is a valid range.
[mask_first,mask_first + (last1 - first1)) is a valid range.
Example:
float f1[] = {-1.0,0.0,4.0,-7.0,6.0,-18.0};
float f2[] = {-2.0,12.0,5.0,-7.0,6.0,-18.0};
int f3[] = {1,0,1,0,0,0};
slip::Matrix<int> Mask(2,3,f3);
std::cout<<slip::std_crosscorrelation_mask<float>(M1.begin(),M1.end(),Mask.begin(),M2.begin(),1)<<std::endl;

Definition at line 223 of file correlation.hpp.

template<typename T , typename InputIterator >
T slip::std_dev ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the standard deviation of a range

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of standard deviation of the container.
Note
Calls std::sqrt(slip::variance(first,last,first,mean)).
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<float>(M.begin(),M.end());
std::cout<<slip::std_dev(M.begin(),M.end(),mean)<<std::endl;

Definition at line 596 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::std_dev_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the standard deviation of a range using a predicate

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of standard deviation of the range using the predicate.
Note
Calls std::sqrt(slip::variance_if(first,last,first,pred,mean)).
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::std_dev_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 2969 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::std_dev_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the standard deviation of a range over a mask

\[\sqrt{\frac{1}{n}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of standard deviation of the range over the mask.
Note
Calls std::sqrt(slip::variance_mask(first,last,first,mask_first,mean)).
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::std_dev_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1812 of file statistics.hpp.

template<typename RandomAccessIterator , typename RandomAccessIterator2 >
void slip::studentize ( RandomAccessIterator  first,
RandomAccessIterator  last,
RandomAccessIterator2  out_first 
)

Substracts its mean to a range and divide it by its standard deviation.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of the range.
lastRandomAccessIterator to one past-the-end element of the range.
out_firstRandomAccessIterator to the first element of the range.
Precondition
The two range must have the same size.
The value type of the range should be compatible with those of the mean value of the range.
Example:
slip::iota(Mc.begin(),Mc.end(),1.0);
std::cout<<"Mc = \n"<<Mc<<std::endl;
std::cout<<"studentize(Mc) = "<<std::endl;
slip::studentize(Mc.begin(),Mc.end(),Mc2.begin());
std::cout<<"Mc2 = \n"<<Mc2<<std::endl;

Definition at line 1418 of file statistics.hpp.

template<typename InputIterator , typename Predicate , typename OutputIterator >
void slip::studentize_if ( InputIterator  first,
InputIterator  last,
Predicate  pred,
OutputIterator  out_first 
)
inline

Substracts its mean to a range and divide it by its standard deviation using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
preda predicate function
out_firstAn OutputIterator
Precondition
[first,last) must be valid.
the two range must have the same size.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
slip::iota(M.begin(),M.end(),0.0);
slip::studentize_if(M.begin(),M.end(),myPredicate,Mcif2.begin());
std::cout<<"Mcif2 = \n"<<Mcif2<<std::endl;

Definition at line 3600 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator , typename OutputIterator >
void slip::studentize_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
OutputIterator  out_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Substracts its mean to a range and divide it by its standard deviation according a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/21
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator
mask_firstAn InputIterator on the mask
out_firstAn OuputIterator.
valueMask value.
Precondition
[first,last) must be valid.
The two ranges and the Mask must have the same dimensions
The value type of the range should be compatible with those of the mean value of the range.
Example:
slip::iota(Mcmask.begin(),Mcmask.end(),1.0);
std::cout<<"Mcmask = \n"<<Mcmask<<std::endl;
slip::Array2d<float> Mcmask2(4,5);
slip::studentize_mask(Mcmask.begin(),Mcmask.end(),
ValuedMask.begin(),
Mcmask2.begin(),2);
std::cout<<"Mcmask2 = \n"<<Mcmask2<<std::endl;

Definition at line 2540 of file statistics.hpp.

template<typename MatrixIterator >
std::size_t slip::subdiag_smaller_elem ( MatrixIterator  A_up,
MatrixIterator  A_bot,
typename slip::lin_alg_traits< typename std::iterator_traits< MatrixIterator >::value_type >::value_type  precision 
)
inline

find the smaller non null (according to the precision) subdiagonal element of a matrix

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/31
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator on the upper_left element of A container
A_bot2D iterator on the bottom_right element of A container
precisionof the zero
Returns
the smaller non null subdiagonal element position
Precondition
A has to be a square matrix.

Definition at line 419 of file linear_algebra_qr.hpp.

template<typename Matrix1 , typename Matrix2 , typename RandomAccessIterator , typename Matrix3 >
void slip::svd ( const Matrix1 &  M,
Matrix2 &  U,
RandomAccessIterator  S_first,
RandomAccessIterator  S_last,
Matrix3 &  V,
const int  max_it = 75 
)

(thin) Singular Value Decomposition Given a matrix M, this function computes its singular value decomposition, Any n*p matrix M whose number of rows n is greater than or equal to its number of columns p, can be written as the product of an n*p column-orthogonal matrix Up, an p*p diagonal matrix S with positive or zero elements (the singular values), and the hermitian transpose of an p*p orthogonal matrix V

\[ M = \left( \begin{array}{ccc} u_{1,1}&\cdots&u_{1,p}\\ \vdots&&\vdots\\ u_{n,1}&\cdots&u_{n,p}\\ \end{array} \right) \left( \begin{array}{cccc} s_{1,1}&0&\cdots&0\\ 0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&s_{p,p}\\ \end{array} \right) \left( \begin{array}{ccc} v_{1,1}&\cdots&v_{1,p}\\ \vdots&&\vdots\\ v_{p,1}&\cdots&v_{p,p}\\ \end{array} \right)^H \]

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>
Date
2009/02/11
Since
1.0.0
Version
0.0.1
Parameters
Mn*p matrix
Un*p orthogonal matrix
S_firstdiagonal of the Singular matrix with positive or zero elements
S_lastdiagonal of the Singular matrix with positive or zero elements
Vp*p orthogonal matrix (not its transpose)
max_itmaximum number of iterations.
Precondition
M.rows() >= M.cols()
M.rows() == U.rows()
M.cols() == U.cols()
M.cols() == (S_last-S_first)
V.rows() == M.cols()
Example:
slip::iota(X.begin(),X.end(),1.0,1.0);
slip::Matrix<double> U(X.rows(),X.cols());
slip::Matrix<double> V(X.cols(),X.cols());
slip::Vector<double>e(X.cols()-1);
slip::svd(X,U,S,V);
std::cout<<"U="<<std::endl<<U<<std::endl;
std::cout<<"V="<<std::endl<<V<<std::endl;
std::cout<<"S="<<std::endl<<S<<std::endl;
slip::Matrix<double> VT(X.cols(),X.cols());
slip::Matrix<double> US(U.rows(),S.cols());
slip::Matrix<double> USVT(U.rows(),V.cols());
std::cout<<"USVT="<<std::endl<<USVT<<std::endl;
Examples:
svd_decomp.cpp.

Definition at line 591 of file linear_algebra_svd.hpp.

template<typename Matrix , typename Matrix2 >
void slip::svd ( const Matrix &  X,
Matrix &  U,
Matrix2 &  S,
Matrix &  V,
const int  max_it = 75 
)

(thin) Singular Value Decomposition Given a matrix M, this function computes its singular value decomposition, Any n*p matrix M whose number of rows n is greater than or equal to its number of columns p, can be written as the product of an n*p column-orthogonal matrix Up, an p*p diagonal matrix S with positive or zero elements (the singular values), and the transpose of an p*p orthogonal matrix V

\[ M = \left( \begin{array}{ccc} u_{1,1}&\cdots&u_{1,p}\\ \vdots&&\vdots\\ u_{n,1}&\cdots&u_{n,p}\\ \end{array} \right) \left( \begin{array}{cccc} s_{1,1}&0&\cdots&0\\ 0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ 0&\cdots&0&s_{p,p}\\ \end{array} \right) \left( \begin{array}{ccc} v_{1,1}&\cdots&v_{1,p}\\ \vdots&&\vdots\\ v_{p,1}&\cdots&v_{p,p}\\ \end{array} \right)^H \]

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
<hammoud_AT_sic.univ-poitiers.fr>: conceptor
Date
2009/02/11
Since
1.0.0
Version
0.0.1
Parameters
Xn*p matrix
Un*p orthogonal matrix
Sp*p diagonal matrix with positive or zero elements
Vp*p orthogonal matrix (not its transpose)
max_itmaximum number of iterations.
Precondition
X.rows() >= X.cols()
X.rows() == U.rows()
X.cols() == U.cols()
S.rows() == S.cols()
X.cols() == S.cols()
V.rows() == X.cols()
Example:
slip::iota(X.begin(),X.end(),1.0,1.0);
slip::Matrix<double> U(X.rows(),X.cols());
slip::Matrix<double> V(X.cols(),X.cols());
slip::Vector<double>e(X.cols()-1);
slip::svd(X,U,S,V);
std::cout<<"U="<<std::endl<<U<<std::endl;
std::cout<<"V="<<std::endl<<V<<std::endl;
std::cout<<"S="<<std::endl<<S<<std::endl;
slip::Matrix<double> VT(X.cols(),X.cols());
slip::Matrix<double> US(U.rows(),S.cols());
slip::Matrix<double> USVT(U.rows(),V.cols());
std::cout<<"USVT="<<std::endl<<USVT<<std::endl;

Definition at line 774 of file linear_algebra_svd.hpp.

template<typename Matrix1 , typename RandomAccessIterator , typename Matrix2 , typename Matrix3 >
void slip::svd_approx ( const Matrix1 &  U,
RandomAccessIterator  S_first,
RandomAccessIterator  S_last,
const Matrix2 &  V,
const std::size_t  K,
Matrix3 &  X 
)
inline

Singular Value Approximation of a matrix from its Singular Value Decomposition given by U, W and V: $ X_K = \sum_k^K w_k U_kV_k^H $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/03/13
Since
1.0.0
Version
0.0.1
Parameters
Umatrix container
S_firstRandomAccessIterator to the first element of the singular values vector
S_lastRandomAccessIterator to one-past-the-end element of the singular values vector
Vmatrix container
Klength of the approximation
Xmatrix container
Precondition
X.rows() >= X.cols()
V.rows() == V.cols()
X.rows() == U.rows()
X.cols() == U.cols()
int(S_last-S_first) == int(U.cols())
int(S_last-S_first) == int(V.rows())
K <= U.cols()
Remarks
K = U.cols() corresponds to an exact approximation.
Example:
double f[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
slip::Matrix<double> SVDin(4,3,f);
std::cout <<"SVDin = \n"<<SVDin<<std::endl<<std::endl;
slip::Vector<double> Wvect(3,0.0);
slip::svd(SVDin,U,Wvect.begin(),Wvect.end(),V);
std::cout <<"U = \n"<<U<<std::endl<<std::endl;
std::cout <<"Wvect = \n"<<Wvect<<std::endl<<std::endl;
std::cout <<"V = \n"<<V<<std::endl<<std::endl;
slip::svd_approx(U,Wvect.begin(),Wvect.end(),V,U.cols(),SVDin2);
std::cout <<"SVDin2 = \n"<<SVDin2<<std::endl<<std::endl;
Examples:
svd_decomp.cpp.

Definition at line 836 of file linear_algebra_svd.hpp.

template<class Matrix1 , class Matrix2 , class Matrix3 , class Matrix4 >
void slip::svd_approx ( const Matrix1 &  U,
const Matrix2 &  W,
const Matrix3 &  V,
const std::size_t  K,
Matrix4 &  M 
)
inline

Singular Value Approximation of a matrix from its Singular Value Decomposition given by U, W and V: $ M_K = \sum_k^K w_k U_kV_k^H $.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/03/13
Since
1.0.0
Version
0.0.1
Parameters
Umatrix container
WMatrix container
Vmatrix container
Klength of the approximation
Mmatrix container
Precondition
U.rows() >= U.cols()
W.rows() == W.cols()
V.rows() == V.cols()
U.cols() == W.rows()
Remarks
K = U.cols() corresponds to an exact approximation.
Example:
slip::hilbert(SVDinH);
std::cout <<"SVDinH = \n"<<SVDinH<<std::endl<<std::endl;
slip::svd(SVDinH,UH,WH,VH);
std::cout <<"Uh = \n"<<UH<<std::endl<<std::endl;
std::cout <<"Wh = \n"<<WH<<std::endl<<std::endl;
std::cout <<"Vh = \n"<<VH<<std::endl<<std::endl;
slip::Matrix<double> SVDinH2(4,4);
slip::svd_approx(UH,WH,VH,UH.cols(),SVDinH2);
std::cout <<"SVDinH2 = \n"<<SVDinH2<<std::endl<<std::endl;

Definition at line 904 of file linear_algebra_svd.hpp.

template<class Matrix1 , typename RandomAccessIterator1 , class Matrix2 , class Matrix3 >
void slip::svd_inv ( const Matrix1 &  U,
RandomAccessIterator1  W_first,
RandomAccessIterator1  W_last,
const Matrix2 &  V,
Matrix3 &  Ainv 
)
inline

Singular Value inverse of a matrix from its Singular Value Decomposition given by U, W and V.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/03/13
Since
1.0.0
Version
0.0.1
Parameters
Umatrix container
W_firstRandomAccessIterator to the first element of the singular values vector
W_lastRandomAccessIterator to one-past-the-end element of the singular values vector
Vmatrix
AinvInvert matrix.
Precondition
U.rows() >= U.cols()
V.rows() == V.cols()
U.cols() == (W_last_W_first)
U.rows() == Ainv.cols()
U.cols() == Ainv.rows()

Definition at line 1148 of file linear_algebra_svd.hpp.

template<class Matrix1 , class Matrix2 >
void slip::svd_inv ( const Matrix1 &  A,
Matrix2 &  Ainv 
)
inline

Singular Value inverse of a matrix.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/03/13
Since
1.0.0
Version
0.0.1
Parameters
Amatrix to invert.
Ainvinverted matrix.
Precondition
A.rows() >= A.cols()
A.rows() == Ainv.cols()
A.cols() == Ainv.rows()
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0, 33.0 , 37.0, 11.0};
std::fill(Msol.col_begin(0),Msol.col_end(0),1.0);
std::copy(x,x+12,Msol.col_begin(1));
std::copy(y,y+12,Bsol.begin());
std::cout<<"Msol = \n"<<Msol<<std::endl;
slip::Matrix<double> Msolinv(2,12);
slip::svd_inv(Msol,Msolinv);
std::cout<<"Msolinv = \n"<<Msolinv<<std::endl;
slip::matrix_vector_multiplies(Msolinv,Bsol,Xsol);
std::cout<<"Xsol = \n"<<Xsol<<std::endl;

Definition at line 1221 of file linear_algebra_svd.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 , typename RandomAccessIterator4 >
double slip::svd_least_square ( RandomAccessIterator1  x_first,
RandomAccessIterator1  x_last,
RandomAccessIterator2  y_first,
RandomAccessIterator3  s_first,
RandomAccessIterator4  p_first,
RandomAccessIterator4  p_last,
slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &  basis_fun 
)
inline

Linear Least Square fitting using SVD.

Given a set of data points x =(x1,...,xN), y = (y1,..yN) with individual standard deviations s = (s1,..sN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(x). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(xi)/si. The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at x (Fj(xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
x_firstRandomAccessIterator to the x datas
x_lastRandomAccessIterator to the x datas
y_firstRandomAccessIterator to the y datas
s_firstRandomAccessIterator to the sigma datas
p_firstRandomAccessIterator to the estimated parameters
p_lastRandomAccessIterator to the estimated parameters
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPowerBasis gives (1,x,x^2,...,x^M) and is adapted to a polynomial fitting
Returns
the chi2 value.
Precondition
[x_first,x_last) is a valid range
[y_first,y_first + (x_last - x_last)) is a valid range
[s_first,s_first + (x_last - x_last)) is a valid range
(p_last - p_first) == number of element of the basis function
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0,33.0 , 37.0, 11.0};
std::size_t data_size=12;
std::size_t coeff_size=3;
slip::Vector<double> datax(data_size,x);
slip::Vector<double> datay(data_size,y);
slip::Vector<double> datasig(data_size,1.0);
slip::Vector<double> coeff(coeff_size,1.0);
double chisq;
chisq =
slip::svd_least_square(datax.begin(),
datax.end(),
datay.begin(),
datasig.begin(),
coeff.begin(),
coeff.end(),
power_basis);
std::cout<< coeff<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 155 of file linear_least_squares.hpp.

template<typename Vector1 , typename Vector2 , typename Vector3 , typename Vector4 >
double slip::svd_least_square ( Vector1 &  X,
Vector2 &  Y,
Vector3 &  S,
Vector4 &  P,
slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &  basis_fun 
)
inline

Linear Least Square fitting using SVD.

Given a set of data points x =(x1,...,xN), y = (y1,..yN) with individual standard deviations s = (s1,..sN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(x). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(xi)/si. The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at x (Fj(xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
XVector which contains the x datas.
YVector which contains the y datas.
SVector which contains the standard deviation of the datas.
PVector which contains the parameters datas.
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPowerBasis gives (1,x,x^2,...,x^M) and is adapted to a polynomial fitting
Returns
the chi2 value.
Precondition
X.size() == Y.size()
Y.size() == S.size()
P.size() == number of element of the basis function
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0,33.0 , 37.0, 11.0};
std::size_t data_size=12;
std::size_t coeff_size=3;
slip::Vector<double> datax(data_size,x);
slip::Vector<double> datay(data_size,y);
slip::Vector<double> datasig(data_size,1.0);
slip::Vector<double> coeff(coeff_size,1.0);
double chisq;
chisq =
datay,
datasig,
coeff,
power_basis);
std::cout<< coeff<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 269 of file linear_least_squares.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
double slip::svd_least_square ( RandomAccessIterator1  x_first,
RandomAccessIterator1  x_last,
RandomAccessIterator2  y_first,
RandomAccessIterator3  p_first,
RandomAccessIterator3  p_last,
slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &  basis_fun 
)
inline

Linear Least Square fitting using SVD.

Given a set of data points x =(x1,...,xN), y = (y1,..yN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(x). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(xi)/si. The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at x (Fj(xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
x_firstRandomAccessIterator to the x datas
x_lastRandomAccessIterator to the x datas
y_firstRandomAccessIterator to the y datas
p_firstRandomAccessIterator to the estimated parameters
p_lastRandomAccessIterator to the estimated parameters
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPowerBasis gives (1,x,x^2,...,x^M) and is adapted to a polynomial fitting
Returns
the chi2 value.
Precondition
[x_first,x_last) is a valid range
[y_first,y_first + (x_last - x_last)) is a valid range
(p_last - p_first) == number of element of the basis function
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0,33.0 , 37.0, 11.0};
std::size_t data_size=12;
std::size_t coeff_size=3;
slip::Vector<double> datax(data_size,x);
slip::Vector<double> datay(data_size,y);
slip::Vector<double> datasig(data_size,1.0);
slip::Vector<double> coeff(coeff_size,1.0);
double chisq;
chisq =
slip::svd_least_square(datax.begin(),
datax.end(),
datay.begin(),
coeff.begin(),
coeff.end(),
power_basis);
std::cout<< coeff<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 343 of file linear_least_squares.hpp.

template<typename Vector1 , typename Vector2 , typename Vector3 >
double slip::svd_least_square ( Vector1 &  X,
Vector2 &  Y,
Vector3 &  P,
slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &  basis_fun 
)
inline

Linear Least Square fitting using SVD.

Given a set of data points x =(x1,...,xN), y = (y1,..yN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(x). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(xi)/si. The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at x (Fj(xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
XVector which contains the x datas.
YVector which contains the y datas.
PVector which contains the parameters datas.
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPowerBasis gives (1,x,x^2,...,x^M) and is adapted to a polynomial fitting
Returns
the chi2 value.
Precondition
X.size() == Y.size()
P.size() == number of element of the basis function
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0,33.0 , 37.0, 11.0};
std::size_t data_size=12;
std::size_t coeff_size=3;
slip::Vector<double> datax(data_size,x);
slip::Vector<double> datay(data_size,y);
slip::Vector<double> datasig(data_size,1.0);
slip::Vector<double> coeff(coeff_size,1.0);
double chisq;
chisq =
datay,
coeff,
power_basis);
std::cout<< coeff<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 443 of file linear_least_squares.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 , typename RandomAccessIterator4 >
double slip::svd_least_square_nd ( RandomAccessIterator1  x_first,
RandomAccessIterator1  x_last,
RandomAccessIterator2  y_first,
RandomAccessIterator3  s_first,
RandomAccessIterator4  p_first,
RandomAccessIterator4  p_last,
const std::size_t  order,
slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &  basis_fun 
)
inline

nd Linear Least Square fitting using SVD.

Given a set of data points X =(X1,...,XN) of dimension N, y = (y1,..yN) with individual standard deviations s = (s1,..sN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(X). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(Xi)/si. The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at x (Fj(Xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
x_firstRandomAccessIterator to the x datas
x_lastRandomAccessIterator to the x datas
y_firstRandomAccessIterator to the y datas
s_firstRandomAccessIterator to the sigma datas
p_firstRandomAccessIterator to the estimated parameters
p_lastRandomAccessIterator to the estimated parameters
orderOrder of the process.
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPower2dBasis gives (1,x1,x1^2,x2,x1x2,x2^2...) and is adapted to a 2d-polynomial fitting
Returns
the chi2 value.
Precondition
[x_first,x_last) is a valid range
[y_first,y_first + (x_last - x_last)) is a valid range
[s_first,s_first + (x_last - x_last)) is a valid range
(p_last - p_first) == number of element of the basis function
Example:
//construction of the 2d-polynomial data
std::size_t n = 32;
slip::iota(x2.begin(),x2.end(),-1.0,1.0/double(n));
slip::Vector<slip::Vector2d<double> > datax2(x2.size()*x2.size());
std::size_t k = 0;
for(std::size_t i = 0; i < y2.size(); ++i)
{
for(std::size_t j = 0; j < x2.size(); ++j)
{
datax2[k][0] = x2[i];
datax2[k][1] = y2[j];
k++;
}
}
slip::Vector<double> datay2(datax2.size(),0.0);
for(std::size_t k = 0; k < datax2.size(); ++k)
{
double x = datax2[k][0];
double y = datax2[k][1];
datay2[k] = 1.2 + 2.0 * x + 0.5* x*x - 1.0 * y + 0.8 * x *
y + 0.3 * y * y;
}
//polynomial fitting
slip::Vector<double> datasig2(datax2.size(),1.0);
std::size_t coeff_size2 = 6;
slip::Vector<double> coeff2(coeff_size2,1.0);
power2d_basis(datax2[3],2,power_2d.begin(),power_2d.end());
std::cout<<power_2d<<std::endl;
chisq =
datax2.end(),
datay2.begin(),
datasig2.begin(),
coeff2.begin(),
coeff2.end(),
power2d_basis);
std::cout<< coeff2<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 549 of file linear_least_squares.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
double slip::svd_least_square_nd ( RandomAccessIterator1  x_first,
RandomAccessIterator1  x_last,
RandomAccessIterator2  y_first,
RandomAccessIterator3  p_first,
RandomAccessIterator3  p_last,
const std::size_t  order,
slip::EvalBasis< typename std::iterator_traits< RandomAccessIterator1 >::value_type, RandomAccessIterator2 > &  basis_fun 
)
inline

nd Linear Least Square fitting using SVD.

Given a set of N points of dimension dim X =(X1,...,XN), y = (y1,..yN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(X). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(Xi). The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at X (Fj(Xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
x_firstRandomAccessIterator to the x datas
x_lastRandomAccessIterator to the x datas
y_firstRandomAccessIterator to the y datas
p_firstRandomAccessIterator to the estimated parameters
p_lastRandomAccessIterator to the estimated parameters
orderOrder of the process.
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPower2dBasis gives (1,x1,x1^2,x2,x1x2,x2^2...) and is adapted to a 2d-polynomial fitting
Returns
the chi2 value.
Precondition
[x_first,x_last) is a valid range
[y_first,y_first + (x_last - x_last)) is a valid range
(p_last - p_first) == number of element of the basis function
Example:
//construction of the 2d-polynomial data
std::size_t n = 32;
slip::iota(x2.begin(),x2.end(),-1.0,1.0/double(n));
slip::Vector<slip::Vector2d<double> > datax2(x2.size()*x2.size());
std::size_t k = 0;
for(std::size_t i = 0; i < y2.size(); ++i)
{
for(std::size_t j = 0; j < x2.size(); ++j)
{
datax2[k][0] = x2[i];
datax2[k][1] = y2[j];
k++;
}
}
slip::Vector<double> datay2(datax2.size(),0.0);
for(std::size_t k = 0; k < datax2.size(); ++k)
{
double x = datax2[k][0];
double y = datax2[k][1];
datay2[k] = 1.2 + 2.0 * x + 0.5* x*x - 1.0 * y + 0.8 * x *
y + 0.3 * y * y;
}
//polynomial fitting
slip::Vector<double> datasig2(datax2.size(),1.0);
std::size_t coeff_size2 = 6;
slip::Vector<double> coeff2(coeff_size2,1.0);
power2d_basis(datax2[3],2,power_2d.begin(),power_2d.end());
std::cout<<power_2d<<std::endl;
chisq =
datax2.end(),
datay2.begin(),
coeff2.begin(),
coeff2.end(),
power2d_basis);
std::cout<< coeff2<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 697 of file linear_least_squares.hpp.

template<typename Vector1 , typename Vector2 , typename Vector3 >
double slip::svd_least_square_nd ( Vector1 &  X,
Vector2 &  Y,
Vector3 &  P,
const std::size_t  order,
slip::EvalBasis< typename Vector1::value_type, typename Vector2::iterator > &  basis_fun 
)
inline

nd Linear Least Square fitting using SVD.

Given a set of data points of N dimension X =(X1,...,XN), y = (y1,..yN) use chi2 minimization to determine the coefficients p = (p1,...,pM) of the fitting function y = sum_j pj Fj(X). Here we solve the fitting equations using singular value decomposition (SVD) of the NxM matrix A such that aij = Fj(Xi). The program returns values for the fit parameters [p_first,p_last) and chi2. The user supplies a functor EvalBasis that return a basis function evaluated at X (Fj(Xi)).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/10
Since
1.0.0
Version
0.0.1
Parameters
XVector which contains the x datas.
YVector which contains the y datas.
PVector which contains the parameters datas.
orderOrder of the approximation.
basis_funfunctor to the function which gives the values obtained by the basis functions Fj. For example, slip::EvalPower2dBasis gives (1,x1,x1^2,x2,x1x2,x2^2...) and is adapted to a 2d polynomial fitting
Returns
the chi2 value.
Precondition
X.size() == Y.size()
P.size() == number of element of the basis function
Example:
//construction of the 2d-polynomial data
std::size_t n = 32;
slip::iota(x2.begin(),x2.end(),-1.0,1.0/double(n));
slip::Vector<slip::Vector2d<double> > datax2(x2.size()*x2.size());
std::size_t k = 0;
for(std::size_t i = 0; i < y2.size(); ++i)
{
for(std::size_t j = 0; j < x2.size(); ++j)
{
datax2[k][0] = x2[i];
datax2[k][1] = y2[j];
k++;
}
}
slip::Vector<double> datay2(datax2.size(),0.0);
for(std::size_t k = 0; k < datax2.size(); ++k)
{
double x = datax2[k][0];
double y = datax2[k][1];
datay2[k] = 1.2 + 2.0 * x + 0.5* x*x - 1.0 * y + 0.8 * x *
y + 0.3 * y * y;
}
//polynomial fitting
slip::Vector<double> datasig2(datax2.size(),1.0);
std::size_t coeff_size2 = 6;
slip::Vector<double> coeff2(coeff_size2,1.0);
power2d_basis(datax2[3],2,power_2d.begin(),power_2d.end());
std::cout<<power_2d<<std::endl;
chisq =
datay2,
coeff2,
power2d_basis);
std::cout<< coeff2<<std::endl;
std::cout<< chisq<<std::endl;

Definition at line 826 of file linear_least_squares.hpp.

template<class Matrix1 , typename RandomAccessIterator1 , class Matrix2 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::svd_solve ( const Matrix1 &  U,
RandomAccessIterator1  W_first,
RandomAccessIterator1  W_last,
const Matrix2 &  V,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
RandomAccessIterator3  X_first,
RandomAccessIterator3  X_last 
)
inline

Solve Linear (USV^H).X = B where U, S and V are provided by a svd decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>: conceptor
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>: adapt to complex data
Date
2009/03/23
Since
1.0.0
Version
0.0.2
Parameters
Umatrix U.
W_firstRandomAccesIterator to the first element of the singular values vector
W_lastRandomAccesIterator to one-past-the-end element of singular values vector
Vmatrix V.
B_firstRandomAccesIterator to the first element of the vector to match
B_lastRandomAccesIterator to one-past-the-end element of the vector to match
X_firstRandomAccesIterator to the first element of the Result vector
X_lastRandomAccesIterator to one-past-the-end element of the Result vector

Definition at line 950 of file linear_algebra_svd.hpp.

template<class Matrix1 , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::svd_solve ( const Matrix1 &  A,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last 
)
inline

Solve Linear Equation A.X = B using SVD decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>: conceptor
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>: adapt to complex data
Date
2009/03/23
Since
1.0.0
Version
0.0.2
Parameters
Amatrix A.
X_firstRandomAccesIterator to the first element of the Result vector
X_lastRandomAccesIterator to one-past-the-end element of the Result vector
B_firstRandomAccesIterator to the first element of the vector to match
B_lastRandomAccesIterator to one-past-the-end element of the vector to match
Remarks
A svd truncature is done: small singular values (less than Smax * slip::epsilon<value_type>(), with Smax the greatest singular value) are put to 0
Precondition
A.rows() >= A.cols()
(X_last - X_first) == A.cols()
(B_last - B_first) == A.rows()
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0, 33.0 , 37.0, 11.0};
std::fill(Msol.col_begin(0),Msol.col_end(0),1.0);
std::copy(x,x+12,Msol.col_begin(1));
std::copy(y,y+12,Bsol.begin());
std::cout<<"Msol = \n"<<Msol<<std::endl;
std::cout<<"Bsol = \n"<<Bsol<<std::endl;
slip::svd_solve(Msol,Xsol.begin(),Xsol.end(),Bsol.begin(),Bsol.end());
std::cout<<"Xsol = \n"<<Xsol<<std::endl;
std::cout<<"Bsol2 = \n"<<Bsol2<<std::endl;

Definition at line 1035 of file linear_algebra_svd.hpp.

template<class Matrix1 , class Vector1 , class Vector2 >
void slip::svd_solve ( const Matrix1 &  A,
Vector1 &  X,
const Vector2 &  B 
)
inline

Solve Linear Equation A.X = B using SVD decomposition.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>: conceptor
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>: adapt to complex data
Date
2009/03/23
Since
1.0.0
Version
0.0.2
Parameters
Amatrix A.
XResult vector
Bvector to match
Remarks
A svd truncature is done: small singular values (less than Smax * slip::epsilon<value_type>(), with Smax the greatest singular value) are put to 0
Precondition
A.rows() >= A.cols()
X.size() == A.cols()
B.size() == A.rows()
Example:
double x[] ={3.0, 7.0, 5.0, 10.0, 7.0, 8.0, 15.0, 11.0, 12.0, 16.0 , 18.0, 5.0};
double y[] ={7.0, 14.0, 11.0, 21.0, 15.0, 17.0, 31.0, 23.0, 25.0, 33.0 , 37.0, 11.0};
std::fill(Msol.col_begin(0),Msol.col_end(0),1.0);
std::copy(x,x+12,Msol.col_begin(1));
std::copy(y,y+12,Bsol.begin());
std::cout<<"Msol = \n"<<Msol<<std::endl;
std::cout<<"Bsol = \n"<<Bsol<<std::endl;
slip::svd_solve(Msol,Xsol,Bsol);
std::cout<<"Xsol = \n"<<Xsol<<std::endl;
std::cout<<"Bsol2 = \n"<<Bsol2<<std::endl;

Definition at line 1114 of file linear_algebra_svd.hpp.

template<class Matrix1 , class Matrix2 >
bool slip::Sylvester_solve ( const Matrix1 &  S,
slip::Box2d< int > &  b11,
slip::Box2d< int > &  b22,
double &  g,
Matrix2 &  X 
)
inline

Solve the sylvester equation (from Z.Bai and J.W. Demmel article : -On Swapping Diagonal Blocks in Real Schur Form- In Linear Algebra and its Applications 186:73-95(1993)) : $ A_{11}X - XA_{22} = \gamma A_{12} $.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/08/26
Since
1.0.0
Version
0.0.1
Parameters
Sthe Schur matrix
b11the A11 box2d
b22the A22 box2d
ggamma factor
Xthe resulting matrix
Precondition
b11 and b22 must be adjacent diagonal blocks of 1*1 or 2*2 dimensions
X must be of dimension 1*1,1*2 or 2*2 depending on b11 and b22 dimensions

Definition at line 1169 of file linear_algebra_qr.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::tan ( const kvector< T, N > &  V)
related

Definition at line 1528 of file KVector.hpp.

template<typename T >
Vector<T> slip::tan ( const Vector< T > &  V)
related

Definition at line 2101 of file Vector.hpp.

template<typename T >
Signal<T> slip::tan ( const Signal< T > &  V)
related

Definition at line 2114 of file Signal.hpp.

template<typename T >
Matrix<T> slip::tan ( const Matrix< T > &  M)
related

Definition at line 3979 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::tan ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5119 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::tan ( const Matrix4d< T > &  M)
related

Definition at line 5128 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::tan ( const Matrix3d< T > &  M)
related

Definition at line 5769 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::tan ( const Volume< T > &  M)
related

Definition at line 6086 of file Volume.hpp.

template<typename T , std::size_t N>
kvector<T,N> slip::tanh ( const kvector< T, N > &  V)
related

Definition at line 1602 of file KVector.hpp.

template<typename T >
Vector<T> slip::tanh ( const Vector< T > &  V)
related

Definition at line 2170 of file Vector.hpp.

template<typename T >
Signal<T> slip::tanh ( const Signal< T > &  V)
related

Definition at line 2183 of file Signal.hpp.

template<typename T >
Matrix<T> slip::tanh ( const Matrix< T > &  M)
related

Definition at line 4049 of file Matrix.hpp.

template<typename T >
HyperVolume<T> slip::tanh ( const HyperVolume< T > &  M)
related
Examples:
test_math.cpp.

Definition at line 5173 of file HyperVolume.hpp.

template<typename T >
Matrix4d<T> slip::tanh ( const Matrix4d< T > &  M)
related

Definition at line 5182 of file Matrix4d.hpp.

template<typename T >
Matrix3d<T> slip::tanh ( const Matrix3d< T > &  M)
related

Definition at line 5823 of file Matrix3d.hpp.

template<typename T >
Volume<T> slip::tanh ( const Volume< T > &  M)
related

Definition at line 6140 of file Volume.hpp.

template<typename RandomAccessIterator >
std::iterator_traits<RandomAccessIterator>::value_type slip::third_quartile ( RandomAccessIterator  first,
RandomAccessIterator  last 
)
inline

Computes the third quartile value from a non sorted range.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/26
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
Returns
The third quartile value of the range.
Precondition
[first,last) must be valid.
Example:
std::generate(M2.begin(),M2.end(),std::rand);
std::cout<<slip::third_quartile(M2.begin(),M2.end())<<std::endl;

Definition at line 1230 of file statistics.hpp.

template<typename InputIterator , typename Predicate >
std::iterator_traits<InputIterator>::value_type slip::third_quartile_if ( InputIterator  first,
InputIterator  last,
Predicate  pred 
)
inline

Computes the third quartile value from a non sorted range using a predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
preda predicate function
Returns
The third quartile value of the range.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
std::cout<<slip::third_quartile_if(M.begin(),M.end(),myPredicate)<<std::endl;

Definition at line 3494 of file statistics.hpp.

template<typename InputIterator , typename MaskIterator >
std::iterator_traits<InputIterator>::value_type slip::third_quartile_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the third quartile value from a non sorted range over a mask.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
mask_firstAn InputIterator of the mask
valueMask value.
Returns
The first quartile value of the range.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout<<slip::third_quartile_mask(M.begin(),M.end(),ValuedMask.begin(),2)<<std::endl;

Definition at line 2438 of file statistics.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::thomas_inv ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

Invert a tridiagonal squared matrix A with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/04/12
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
low_diag_firstRandomAccessIterator to the beginning of the first lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(low_diag_last - low_diag_first) == (up_diag_last - up_diag_first)
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (diag_last - diag_first)
Complexity: 8n^2 - 7n flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double d[]= {1.0,2.0,3.0,4.0};
double dup[]= {3.0,1.0,1.0};
slip::Array<double> diag_up(3,dup);
double ddown[]= {2.0,2.0,2.0};
slip::Array<double> diag_down(3,ddown);
slip::set_diagonal(diag.begin(),diag.end(),D3);
slip::set_diagonal(diag_up.begin(),diag_up.end(),D3,1);
slip::set_diagonal(diag_down.begin(),diag_down.end(),D3,-1);
std::cout<<"D3 = \n"<<D3<<std::endl;
slip::Matrix<double> D3inv(D3.rows(),D3.cols());
slip::thomas_inv(diag.begin(),diag.end(),
diag_up.begin(),diag_up.end(),
diag_down.begin(),diag_down.end(),
D3inv.upper_left(),D3inv.bottom_right());
std::cout<<"D3inv = \n "<<D3inv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> D3D3inv(D3.rows(),D3.cols());
std::cout<<"D3D3inv = \n "<<D3D3inv<< std::endl;

Definition at line 9000 of file linear_algebra.hpp.

template<typename Container2d1 , typename Container2d2 >
void slip::thomas_inv ( const Container2d1 &  A,
Container2d2 &  Ainv,
typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Container2d1::value_type>::value_type(1.0E-6) 
)

Invert a tridiagonal squared matrix A with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/04/12
Since
1.0.0
Version
0.0.1
Parameters
A2d container of the matrix to invert.
Ainv2d container of the matrix the inverse matrix.
precision1.0E-6 by default.
Precondition
A.dim1() == A.dim2()
Ainv.dim1() == Ainv.dim2()
Complexity: 8n^2 - 7n flops + (3n - 2) flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double d[]= {1.0,2.0,3.0,4.0};
double dup[]= {3.0,1.0,1.0};
slip::Array<double> diag_up(3,dup);
double ddown[]= {2.0,2.0,2.0};
slip::Array<double> diag_down(3,ddown);
slip::set_diagonal(diag.begin(),diag.end(),D3);
slip::set_diagonal(diag_up.begin(),diag_up.end(),D3,1);
slip::set_diagonal(diag_down.begin(),diag_down.end(),D3,-1);
std::cout<<"D3 = \n"<<D3<<std::endl;
slip::Matrix<double> D3inv(D3.rows(),D3.cols());
slip::thomas_inv(D3,D3inv);
std::cout<<"D3inv = \n "<<D3inv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> D3D3inv(D3.rows(),D3.cols());
std::cout<<"D3D3inv = \n "<<D3D3inv<< std::endl;

Definition at line 9078 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::thomas_solve ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

Solve the tridiagonal system A*X=B with the Thomas method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
low_diag_firstRandomAccessIterator to the beginning of the first lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (X_last - X_first)
(diag_last - diag_first) == (B_last - B_first)
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(low_diag_last - low_diag_first) == (up_diag_last - up_diag_first)
Complexity: 8n - 7 flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double d[]= {1.0,2.0,3.0,4.0};
double dup[]= {3.0,1.0,1.0};
slip::Array<double> diag_up(3,dup);
double ddown[]= {2.0,2.0,2.0};
slip::Array<double> diag_down(3,ddown);
double b[]= {4.0,2.0,3.0,1.0};
std::cout<<B<<std::endl;
slip::thomas_solve(diag.begin(),diag.end(),
diag_up.begin(),diag_up.end(),
diag_down.begin(),diag_down.end(),
X.begin(),X.end(),
B.begin(),B.end());
std::cout<<X<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"D3 * X = "<<std::endl;
std::cout<<B2<<std::endl;

Definition at line 8795 of file linear_algebra.hpp.

template<typename Container2d , typename Vector1 , typename Vector2 >
void slip::thomas_solve ( const Container2d &  A,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Container2d::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Container2d::value_type>::value_type(1.0E-6) 
)

Solve the tridiagonal system Tx=B

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/04
Since
1.0.0
Version
0.0.1
Parameters
AA matrix.
XX Vector.
BB Vector.
precision1.0E-6 by default.
Precondition
A.dim1() == A.dim2()
X.size() == A.dim1()
B.size() == A.dim1()
Complexity: 8n - 7 flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double d[]= {1.0,2.0,3.0,4.0};
double dup[]= {3.0,1.0,1.0};
slip::Array<double> diag_up(3,dup);
double ddown[]= {2.0,2.0,2.0};
slip::Array<double> diag_down(3,ddown);
double b[]= {4.0,2.0,3.0,1.0};
slip::set_diagonal(diag.begin(),diag.end(),D3);
slip::set_diagonal(diag_up.begin(),diag_up.end(),D3,1);
slip::set_diagonal(diag_down.begin(),diag_down.end(),D3,-1);
std::cout<<"D3 = "<<std::endl;
std::cout<<D3<<std::endl;
std::cout<<"B = "<<std::endl;
std::cout<<B<<std::endl;
std::cout<<std::endl;
std::cout<<"X = "<<std::endl;
std::cout<<X<<std::endl;
std::cout<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"D3 * X = "<<std::endl;
std::cout<<B2<<std::endl;

Definition at line 8911 of file linear_algebra.hpp.

template<typename InputIterator , typename OutputIterator >
void slip::threshold ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
const typename std::iterator_traits< InputIterator >::value_type &  t_value,
const typename std::iterator_traits< OutputIterator >::value_type &  false_value 
)
inline

threshold algorithm

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/12/10
Version
0.0.1
Parameters
firstbegin InputIterator of the range to threshold
lastpast-the-end InputIterator of the range to threshold
resultbegin OutputIterator of the resulting range
t_valuethreshold value
false_valueresult value when *first <= t_value
Precondition
[first, last) must be valid.
[result, result + (last-first)) must be valid.
Example:
//values less than 120 are set to 0
I1.read("lena.gif");
slip::threshold(I1.begin(),I1.end(),I2.begin(),120,0);
I2.write("lena_threshold.gif");

Definition at line 235 of file threshold.hpp.

template<typename RandomAccessIterator , typename Matrix >
void slip::toeplitz ( RandomAccessIterator  first,
RandomAccessIterator  last,
Matrix &  A 
)
inline

Constructs the Toeplitz matrix from given a range.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/22
Since
1.0.0
Version
0.0.1
Parameters
firstRandomAccessIterator to the first element of the Toeplitz vector
lastRandomAccessIterator to one past-the-end element of the Toeplitz vector
AToplitz matrix.
Precondition
(A.cols() == A.rows())
A.rows == last - first
Example:
slip::iota(Vtoep.begin(),Vtoep.end(),1.0);
std::cout<<"Vtoeplitz = \n"<<Vtoep<<std::endl;
slip::Matrix<float> Atoep(Vtoep.size(),Vtoep.size());
slip::toeplitz(Vtoep.begin(),Vtoep.end(),Atoep);
std::cout<<"Atoeplitz = \n"<<Atoep<<std::endl;

Definition at line 3758 of file linear_algebra.hpp.

template<typename _InputIterator , typename _OutputIterator , typename _UnaryOperation , typename _Predicate >
_OutputIterator slip::transform_if ( _InputIterator  first,
_InputIterator  last,
_OutputIterator  result,
_UnaryOperation  unary_op,
_Predicate  pred 
)

Perform an operation on a sequence according to a Predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
resultAn output iterator.
unary_opA unary operator.
predA predicate.
Returns
An output iterator equal to result+(last-first).
Description:
Applies the operator to each element in the input range according to the predicate pred and assigns the results to successive elements of the output sequence. Evaluates *(result+N)=unary_op(*(first+N)) for each N in the range [0,last-first) verifying pred(*first);
Precondition
[first,last) must be valid.
[result,result + (last-first)) must be valid
unary_op must not alter its argument.
Example1:
//definition of a predicate
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
}
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
slip::transform_if(v1.begin(),v1.end(),
v2.begin(),
std::negate<int>(),
lt5Predicate<int>);
std::cout<<"v2 = "<<v2<<std::endl;

Definition at line 308 of file stl_algo_ext.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation , typename _Predicate >
_OutputIterator slip::transform_if ( _InputIterator1  first1,
_InputIterator1  last1,
_InputIterator2  first2,
_OutputIterator  result,
_BinaryOperation  binary_op,
_Predicate  pred 
)

Perform an operation on corresponding elements of two sequences according to a Predicate.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
first2An input iterator.
resultAn output iterator.
binary_opA binary operator.
predA predicate.
Returns
An output iterator equal to result+(last-first).
Description:
Applies the operator to the corresponding elements in the two input ranges according to the predicate pred and assigns the results to successive elements of the output sequence. Evaluates *(result+N)=binary_op(*(first1+N),*(first2+N)) for each N in the range [0,last1-first1) verifying pred(*first1).
Precondition
[first1,last1) must be valid.
[first2,first2 + (last1-first1)) must be valid
[result,result + (last1-first1)) must be valid
binary_op must not alter either of its arguments.
Example1:
//definition of a predicate
template<typename T>
bool lt5Predicate (const T& val)
{
return (val < T(5));
}
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
v2.begin(),
v3.begin(),
std::plus<int>(),
lt5Predicate<int>);
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 378 of file stl_algo_ext.hpp.

template<typename _InputIterator1 , typename _InputIterator2 , typename _MaskIterator , typename _OutputIterator , typename _BinaryOperation >
_OutputIterator slip::transform_mask_bin ( _InputIterator1  first1,
_InputIterator1  last1,
_MaskIterator  mask_first,
_InputIterator2  first2,
_OutputIterator  result,
_BinaryOperation  binary_op,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Perform an operation on corresponding elements of two sequences according to a mask sequence.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
first1An input iterator.
last1An input iterator.
mask_firstAn input iterator.
first2An input iterator.
resultAn output iterator.
binary_opA binary operator.
valuetrue value of the mask range. Default is 1.
Returns
An output iterator equal to result+(last-first).
Description:
Applies the operator to the corresponding elements in the two input ranges according to the input mask range and assigns the results to successive elements of the output sequence. Evaluates *(result+N)=binary_op(*(first1+N),*(first2+N)) for each N in the range [0,last1-first1) verifying *mask_first == value.
Precondition
[first1,last1) must be valid.
[first2,first2 + (last1-first1)) must be valid
[mask_first,mask_first + (last1-first1)) must be valid
[result,result + (last-first)) must be valid
binary_op must not alter either of its arguments.
Example1:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> mask(v1.size());
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
mask.begin(),
v2.begin(),
v3.begin(),
std::plus<int>());
std::cout<<"v3 = "<<v3<<std::endl;
Example1:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
std::cout<<"v2 = "<<v2<<std::endl;
slip::Array<bool> maskint(v1.size());
mask[2] = 2;
mask[4] = 2;
mask[9] = 2;
mask.begin(),
v2.begin(),
v3.begin(),
std::plus<int>(),int(2));
std::cout<<"v3 = "<<v3<<std::endl;

Definition at line 240 of file stl_algo_ext.hpp.

template<typename _InputIterator , typename _MaskIterator , typename _OutputIterator , typename _UnaryOperation >
_OutputIterator slip::transform_mask_un ( _InputIterator  first,
_InputIterator  last,
_MaskIterator  mask_first,
_OutputIterator  result,
_UnaryOperation  unary_op,
typename std::iterator_traits< _MaskIterator >::value_type  value = typename std::iterator_traits<_MaskIterator>::value_type(1) 
)

Perform an operation on a sequence according to a mask sequence.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/09/27
Since
1.0.0
Version
0.0.1
Parameters
firstAn input iterator.
lastAn input iterator.
mask_firstAn input iterator.
resultAn output iterator.
unary_opA unary operator.
valuetrue value of the mask range. Default is 1.
Returns
An output iterator equal to result+(last-first).
Description:
Applies the operator to each element in the input range according to the input mask range and assigns the results to successive elements of the output sequence. Evaluates *(result+N)=unary_op(*(first+N)) for each N in the range [0,last-first) verifying *mask_first == value
Precondition
[first,last) must be valid.
[mask_first,mask_first + (last-first)) must be valid
[result,result + (last-first)) must be valid
unary_op must not alter its argument.
Example1:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
mask[2] = 1;
mask[4] = 1;
mask[9] = 1;
std::cout<<"mask = "<<mask<<std::endl;
mask.begin(),
v2.begin(),
std::negate<int>());
std::cout<<"v2 = "<<v2<<std::endl;
Example2:
slip::iota(v1.begin(),v1.end(),1,1);
std::cout<<"v1 = "<<v1<<std::endl;
maskint[2] = 2;
maskint[4] = 2;
maskint[9] = 2;
std::cout<<"mask = "<<mask<<std::endl;
mask.begin(),
v2.begin(),
std::negate<int>(),int(2));
std::cout<<"v2 = "<<v2<<std::endl;

Definition at line 152 of file stl_algo_ext.hpp.

template<class Matrix1 , class Matrix2 >
void slip::transpose ( const Matrix1 &  M,
const std::size_t  nr1,
const std::size_t  nc1,
Matrix2 &  TM,
const std::size_t  nr2,
const std::size_t  nc2 
)
inline

Computes the transpose of a matrix $M^T$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/14
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
nr1The number of rows of M
nc1The number of columns of M
TMresult of the transposition
nr2The number of rows of TM
nc2The number of columns of TM
Precondition
M, TM must have the double bracket element accessor
Matrix are supposed to be allocated first
nr1 == nc2
nc1 == nr2

Definition at line 2516 of file linear_algebra.hpp.

template<class Matrix1 , class Matrix2 >
void slip::transpose ( const Matrix1 &  M,
Matrix2 &  TM 
)
inline

Computes the transpose of a matrix $M^T$.

Author
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
Date
2006/11/14
Since
1.0.0
Version
0.0.1
Parameters
MMatrix container
TMresult of the transposition
Precondition
M, TM must have cols() and rows() methods
M, TM must have the double bracket element accessor
Matrix are supposed to be allocated first
Matrix shoud have the same data types.
M.cols() == TM.rows()
M.rows() == TM.cols()
Remarks
Works with real and complex matrix.
Example:
slip::iota(M.begin(),M.end(),0.0,1.0);

Definition at line 2562 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::tridiagonal_cholesky ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2  R_diag_first,
RandomAccessIterator2  R_diag_last,
RandomAccessIterator3  R_low_first,
RandomAccessIterator3  R_low_last 
)

Tridiagonal symmetric positive decomposition

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) = \left( \begin{array}{ccccc} d_{1} & 0&\cdots&\cdots&0\\ r_1 & d_{2} & \ddots&&\vdots\\ 0&r_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&r_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{ccccc} d_{1} & \bar{r}_{1}&0&\cdots&0\\ 0 & d_{2} & \bar{r}_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\bar{r}_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
R_diag_firstRandomAccessIterator to the beginning of the first diagonal of R.
R_diag_lastRandomAccessIterator to one-past-the-end of the first diagonal of R.
R_low_firstRandomAccessIterator to the beginning of the first lower diagonal.
R_low_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(R_diag_last-R_diag_first) == (diag_last - diag_first)
(R_diag_last-R_diag_first) == (R_low_last - R_low_first + 1)
Remarks
Works with real and complex data.
Will raise an exception if the matrix is not hermitian positive definite
Example:
slip::Array2d<float> TriChol(4,4);
slip::fill_diagonal(TriChol,2.0);
slip::fill_diagonal(TriChol,-1.0,-1);
slip::fill_diagonal(TriChol,-1.0,1);
std::cout<<"TriChol = "<<std::endl;
std::cout<<TriChol<<std::endl;
slip::Array<float> TriChol_diag(4);
slip::get_diagonal(TriChol,TriChol_diag.begin(),TriChol_diag.end());
slip::Array<float> TriChol_low_diag(3);
slip::get_diagonal(TriChol,TriChol_low_diag.begin(),TriChol_low_diag.end(),1);
std::cout<<"TriChol_diag = "<<std::endl;
std::cout<<TriChol_diag <<std::endl;
std::cout<<"TriChol_low_diag = "<<std::endl;
std::cout<<TriChol_low_diag<<std::endl;
slip::Array<float> R_TriChol_diag(4);
slip::Array<float> R_TriChol_low_diag(3);
slip::tridiagonal_cholesky(TriChol_diag.begin(),TriChol_diag.end(),
TriChol_low_diag.begin(),TriChol_low_diag.end(),
R_TriChol_diag.begin(),R_TriChol_diag.end(),
R_TriChol_low_diag.begin(),R_TriChol_low_diag.end());
std::cout<<"R_TriChol_diag = "<<std::endl;
std::cout<<R_TriChol_diag <<std::endl;
std::cout<<"R_TriChol_low_diag = "<<std::endl;
std::cout<<R_TriChol_low_diag<<std::endl;
slip::Array2d<float> LTriChol(4,4);
slip::Array2d<float> LTriCholT(4,4);
slip::set_diagonal(R_TriChol_diag.begin(),R_TriChol_diag.end(),LTriChol);
slip::set_diagonal(R_TriChol_low_diag.begin(),R_TriChol_low_diag.end(),LTriChol,-1);
slip::transpose(LTriChol,LTriCholT);
std::cout<<"LTriChol = "<<std::endl;
std::cout<<LTriChol <<std::endl;
std::cout<<"LTriCholT = "<<std::endl;
std::cout<<LTriCholT<<std::endl;
slip::Array2d<float> LTriCholxLTriCholT(4,4);
slip::matrix_matrix_multiplies(LTriChol,LTriCholT,LTriCholxLTriCholT);
std::cout<<"LTriCholxLTriChol^T = "<<std::endl;
std::cout<<LTriCholxLTriCholT<<std::endl;

Definition at line 9203 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::tridiagonal_cholesky_inv ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot 
)

Invert the tridiagonal symmetric positive definite system T:

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/04/12
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (diag_last - diag_first)
Complexity: 5n^2 - n flops + n^2 sqrt
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
slip::fill_diagonal(TriCholc,std::complex<float>(2.0,0.0));
slip::fill_diagonal(TriCholc,std::complex<float>(-1.0,0.5),-1);
slip::fill_diagonal(TriCholc,std::complex<float>(-1.0,-0.5),1);
std::cout<<"TriCholc = \n"<<TriCholc<<std::endl;
slip::get_diagonal(TriCholc,TriChol_diagc.begin(),TriChol_diagc.end());
slip::Array<std::complex<float> > TriChol_low_diagc(3);
slip::get_diagonal(TriCholc,TriChol_low_diagc.begin(),TriChol_low_diagc.end(),1);
slip::Matrix<std::complex<float> > TriCholinvc (TriCholc.rows(),TriCholc.cols());
slip::tridiagonal_cholesky_inv(TriChol_diagc.begin(),TriChol_diagc.end(),
TriChol_low_diagc.begin(),TriChol_low_diagc.end(),TriCholinvc.upper_left(),TriCholinvc.bottom_right());
std::cout<<"TriCholinvc = \n"<<TriCholinvc<<std::endl;
slip::Matrix<std::complex<float> > TriCholcTriCholinvc(TriCholc.rows(),TriCholc.cols());
std::cout<<"Check "<<std::endl;
slip::matrix_matrix_multiplies(TriCholc,TriCholinvc,TriCholcTriCholinvc);
std::cout<<"TriCholcTriCholinvc = \n"<<TriCholcTriCholinvc<<std::endl;

Definition at line 9516 of file linear_algebra.hpp.

template<typename Container2d1 , typename Container2d2 >
void slip::tridiagonal_cholesky_inv ( const Container2d1 &  A,
Container2d2 &  Ainv 
)

Invert the tridiagonal symmetric positive definite system T:

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right)^{-1} \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/04/12
Since
1.0.0
Version
0.0.1
Parameters
A2d container of the matrix to invert.
Ainv2d container of the matrix the inverse matrix.
Precondition
A.dim1() == A.dim2()
Ainv.dim1() == Ainv.dim2()
Complexity: 5n^2 - n flops + n^2 sqrt + (2n - 1) flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
slip::fill_diagonal(TriCholc,std::complex<float>(2.0,0.0));
slip::fill_diagonal(TriCholc,std::complex<float>(-1.0,0.5),-1);
slip::fill_diagonal(TriCholc,std::complex<float>(-1.0,-0.5),1);
std::cout<<"TriCholc = \n"<<TriCholc<<std::endl;
slip::get_diagonal(TriCholc,TriChol_diagc.begin(),TriChol_diagc.end());
slip::Array<std::complex<float> > TriChol_low_diagc(3);
slip::get_diagonal(TriCholc,TriChol_low_diagc.begin(),TriChol_low_diagc.end(),1);
slip::Matrix<std::complex<float> > TriCholinvc (TriCholc.rows(),TriCholc.cols());
slip::tridiagonal_cholesky_inv(TriCholc,TriCholinvc);
std::cout<<"TriCholinvc = \n"<<TriCholinvc<<std::endl;
slip::Matrix<std::complex<float> > TriCholcTriCholinvc(TriCholc.rows(),TriCholc.cols());
std::cout<<"Check "<<std::endl;
slip::matrix_matrix_multiplies(TriCholc,TriCholinvc,TriCholcTriCholinvc);
std::cout<<"TriCholcTriCholinvc = \n"<<TriCholcTriCholinvc<<std::endl;

Definition at line 9589 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::tridiagonal_cholesky_solve ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last 
)

Solve the tridiagonal symmetric positive definite system T*X=B with the Cholesky method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
Precondition
T must be symmetric positive definite matrix.
(X_last - X_first) == (B_last - B_first)
(diag_last - diag_first) == (X_last - X_first)
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
Complexity: 3n + n sqrt
Remarks
Works with real and complex data
Raise an exception if T is not a symmetric positive definite matrix.
Example:
slip::Array2d<float> TriChol(4,4);
slip::fill_diagonal(TriChol,2.0);
slip::fill_diagonal(TriChol,-1.0,-1);
slip::fill_diagonal(TriChol,-1.0,1);
std::cout<<"TriChol = "<<std::endl;
std::cout<<TriChol<<std::endl;
slip::Array<float> TriChol_diag(4);
slip::get_diagonal(TriChol,TriChol_diag.begin(),TriChol_diag.end());
slip::Array<float> TriChol_low_diag(3);
slip::get_diagonal(TriChol,TriChol_low_diag.begin(),TriChol_low_diag.end(),1);
std::cout<<"TriChol_diag = "<<std::endl;
std::cout<<TriChol_diag <<std::endl;
std::cout<<"TriChol_low_diag = "<<std::endl;
std::cout<<TriChol_low_diag<<std::endl;
std::cout<<"TriChol = "<<std::endl;
std::cout<<TriChol<<std::endl;
float btricol[] = {1.0,2.0,3.0,4.0};
slip::Array<float> BTriChol(4,btricol);
std::cout<<"BTriChol = \n"<<BTriChol<<std::endl;
slip::Array<float> XTriChol(4);
slip::tridiagonal_cholesky_solve(TriChol_diag.begin(),TriChol_diag.end(),
TriChol_low_diag.begin(),TriChol_low_diag.end(),
XTriChol.begin(),XTriChol.end(),
BTriChol.begin(),BTriChol.end());
std::cout<<"XTriChol = \n"<<XTriChol<<std::endl;
std::cout<<"Check: "<<std::endl;
slip::Array<float> BTriChol2(4);
slip::matrix_vector_multiplies(TriChol,XTriChol,BTriChol2);
std::cout<<"BTriChol2 = \n"<<BTriChol2<<std::endl;

Definition at line 9321 of file linear_algebra.hpp.

template<typename Container2d , typename Vector1 , typename Vector2 >
void slip::tridiagonal_cholesky_solve ( const Container2d &  A,
Vector1 &  X,
const Vector2 &  B 
)

Solve the tridiagonal symmetric positive definite system T*X=B with the Cholesky method

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ \bar{u}_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&\bar{u}_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&\bar{u}_{n-1}&d_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ \vdots\\ \vdots\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ \vdots\\ \vdots\\ \vdots\\ b_{n}\\ \end{array}\right) \]

where: $\bar{u}_{i}$ is the conjugate of $u_{i}$ and $d_{i} = \bar{d}_{i}$.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
AThe matrix A.
XThe vector X.
BThe vector to match B.
Precondition
T must be symmetric positive definite matrix.
X.size() == B.size()
T.cols() == X.size()
T.rows() == T.cols()
Complexity: 5n - 1 + n sqrt
Remarks
Works with real and complex data
Raise an exception if T is not a symmetric positive definite matrix.
Example:
slip::Array2d<float> TriChol(4,4);
slip::fill_diagonal(TriChol,2.0);
slip::fill_diagonal(TriChol,-1.0,-1);
slip::fill_diagonal(TriChol,-1.0,1);
std::cout<<"TriChol = "<<std::endl;
std::cout<<TriChol<<std::endl;
slip::Array<float> TriChol_diag(4);
slip::get_diagonal(TriChol,TriChol_diag.begin(),TriChol_diag.end());
slip::Array<float> TriChol_low_diag(3);
slip::get_diagonal(TriChol,TriChol_low_diag.begin(),TriChol_low_diag.end(),1);
std::cout<<"TriChol_diag = "<<std::endl;
std::cout<<TriChol_diag <<std::endl;
std::cout<<"TriChol_low_diag = "<<std::endl;
std::cout<<TriChol_low_diag<<std::endl;
std::cout<<"TriChol = "<<std::endl;
std::cout<<TriChol<<std::endl;
float btricol[] = {1.0,2.0,3.0,4.0};
slip::Array<float> BTriChol(4,btricol);
std::cout<<"BTriChol = \n"<<BTriChol<<std::endl;
slip::Array<float> XTriChol(4);
slip::tridiagonal_cholesky_solve(TriChol,XTriChol,BTriChol);
std::cout<<"XTriChol = \n"<<XTriChol<<std::endl;
std::cout<<"Check: "<<std::endl;
slip::Array<float> BTriChol2(4);
slip::matrix_vector_multiplies(TriChol,XTriChol,BTriChol2);
std::cout<<"BTriChol2 = \n"<<BTriChol2<<std::endl;

Definition at line 9437 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::tridiagonal_lu ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2  L_low_first,
RandomAccessIterator2  L_low_last,
RandomAccessIterator3  U_up_first,
RandomAccessIterator3  U_up_last,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

Computes the LU decomposition for a tridiagonal matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ l_{1} & d_{2} & u_{2}&\ddots&\vdots\\ 0&l_{2}&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&0&l_{n-1}&d_{n}\\ \end{array}\right) = \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ ll_1 & 1 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&1\\ \end{array}\right) \left( \begin{array}{ccccc} du_{1} & uu_{1}&0&\cdots&0\\ 0 & du_{2} & uu_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&du_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
low_diag_firstRandomAccessIterator to the beginning of the first lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
L_low_firstRandomAccessIterator to the beginning of the first element of the lower diagonal of L.
L_low_lastRandomAccessIterator to one-past-the-end element of the lower diagonal of L.
U_up_firstRandomAccessIterator to the beginning of the first element of the upper diagonal of U.
U_up_lastRandomAccessIterator to one-past-the-end of the first element of the upper diagonal of U.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(diag_last - diag_first) == (low_diag_last - low_diag_first + 1)
(L_low_last-L_low_first) == (diag_last - diag_first - 1)
(U_up_last-U_up_first) == (diag_last - diag_first)
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular
Complexity: 3(n-1) flops
Example:
double dtlu_diag[] = {2.0, 1.0, 5.0, -0.2, 7.0, 9.0, 8.0};
double dtlu_up_diag[] = {1.0, 1.0, 1.0, 1.2, 1.0, 1.0};
double dtlu_low_diag[] = {1.0, 1.0, 1.0, 1.2, 1.0, 1.0};
slip::Array<double> Dtlu_diag(7,dtlu_diag);
slip::Array<double> Dtlu_up_diag(6,dtlu_up_diag);
slip::Array<double> Dtlu_low_diag(6,dtlu_low_diag);
std::cout<<"Dtlu_diag = "<<Dtlu_diag<<std::endl;
std::cout<<"Dtlu_up_diag = "<<Dtlu_up_diag<<std::endl;
std::cout<<"Dtlu_low_diag = "<<Dtlu_low_diag<<std::endl;
slip::tridiagonal_lu(dtlu_diag,dtlu_diag+7,
dtlu_up_diag,dtlu_up_diag+6,
dtlu_low_diag,dtlu_low_diag+6,
dtlu_l.begin(),dtlu_l.end(),
dtlu_u.begin(),dtlu_u.end());
slip::set_diagonal(dtlu_l.begin(),dtlu_l.end(),dtlu_L,-1);
slip::fill_diagonal(dtlu_L,1.0);
slip::set_diagonal(dtlu_u.begin(),dtlu_u.end(),dtlu_U,0);
slip::set_diagonal(Dtlu_up_diag.begin(),Dtlu_up_diag.end(),dtlu_U,1);
slip::Array2d<double> dtlu_Lxdtlu_U(7,7);
slip::matrix_matrix_multiplies(dtlu_L,dtlu_U,dtlu_Lxdtlu_U);
std::cout<<"dtlu_l = \n"<<dtlu_l<<std::endl;
std::cout<<"dtlu_u = \n"<<dtlu_u<<std::endl;
std::cout<<"dtlu_L = \n"<<dtlu_L<<std::endl;
std::cout<<"dtlu_U = \n"<<dtlu_U<<std::endl;
std::cout<<"dtlu_Lxdtlu_U = \n"<<dtlu_Lxdtlu_U<<std::endl;

Definition at line 7846 of file linear_algebra.hpp.

template<class RandomAccessIterator2d , class RandomAccessIterator1 , class RandomAccessIterator2 >
void slip::tvector_matrix_multiplies ( RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
RandomAccessIterator2d  M_up,
RandomAccessIterator2d  M_bot,
RandomAccessIterator2  result_first,
RandomAccessIterator2  result_last 
)
inline

Computes the transpose left multiplication:

\[R = V^T M\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the first element of the Vector.
V_lastRandomAccessIterator to one-past-the-end element of the vector.
M_upRandomAccessIterator2d to the upper_left matrix element.
M_botRandomAccessIterator2d to the bottom_right matrix element.
result_firstRandomAccessIterator to the first element of the Vector R.
result_lastRandomAccessIterator to one-past-the-end element of the vector R.
Precondition
(M_bottom_right - M_upper_left)[0] == (V_last - V_first)
(M_bottom_right - M_upper_left)[1] == (result_last - result_first)
Remarks
Works with real and complex data.
Example:
slip::iota(M.begin(),M.end(),0.0);
std::cout<<"M = "<<std::endl;
std::cout<<M<<std::endl;
slip::iota(Vtt.begin(),Vtt.end(),1.0);
std::cout<<"Vtt = "<<std::endl;
std::cout<<Vtt<<std::endl;
slip::tvector_matrix_multiplies(Vtt.begin(),Vtt.end(),
M.upper_left(),M.bottom_right(),
Vttr.begin(),Vttr.end());
std::cout<<"Vttr = "<<std::endl;
std::cout<<Vttr<<std::endl;

Definition at line 1189 of file linear_algebra.hpp.

template<class Vector1 , class Matrix , class Vector2 >
void slip::tvector_matrix_multiplies ( const Vector1 &  V,
const Matrix &  M,
Vector2 &  R 
)
inline

Computes the transpose left multiplication:

\[R = V^T M\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
VVector V.
MMatrix M.
RResulting vector R.
Precondition
M.rows() == V.size()
M.cols() == R.size()
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
TC dc[] = {TC(1,1),TC(0,1),TC(0,1),TC(0,1),
TC(1,0),TC(1,1),TC(0,1),TC(0,1),
TC(1,2),TC(1,2),TC(1,2),TC(1,2)};
slip::Matrix<TC> Mcc(3,4,dc);
slip::iota(Vcc.begin(),Vcc.end(),std::complex<double>(1.0,1.0));
std::cout<<"Vcc = "<<std::endl;
std::cout<<Vcc<<std::endl;
std::cout<<"Vrcc = "<<std::endl;
std::cout<<Vrcc<<std::endl;

Definition at line 1237 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unbiased_autocorrelation ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the unbiased autocorrelations from lag -(last-first) to (last-first) of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \frac{1}{N-j}\sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::unbiased_autocorrelation(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1689 of file correlation.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unbiased_autocovariance ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  auto_first,
RandomAccessIterator2  auto_last 
)
inline

Computes the unbiased autocovariance from lag -(last-first) to 0 of a range [first,last).

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/05/21
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator to the data.
lastA RandomAccessIterator to the data.
auto_firstA RandomAccessIterator to the autocorrelations range.
auto_lastA RandomAccessIterator to the autocorrelations range.
Precondition
[first,last) must be valid.
[auto_first, auto_last) must be valid.
(auto_last - auto_first) == (last-first) - 1
(last-first) > 0
Description:
Computes the autocorrelations from lag -(last-first) to (last-first) of a range [first,last).
  • $ R(j) = \frac{1}{N-j}\sum_n first_n first_{n-j} $
  • $ R(0) $ corresponds the energy of the data
Example:
slip::iota(V.begin(),V.end(),1.0f,1.0f);
std::cout<<V<<std::endl;
slip::Array<float> Auto(V.size());
slip::unbiased_autocovariance(V.begin(),V.end(),Auto.begin(),Auto.end());
std::cout<<Auto<<std::endl;

Definition at line 1860 of file correlation.hpp.

template<typename T , typename InputIterator , typename InputIterator2 >
T slip::unbiased_covariance ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
mean1,
mean2 
)
inline

Computes the unbiased covariance of a two sequences

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1The mean of the first container.
mean2The mean of the second container.
Returns
The value of the covariance of the two containers.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Example:
slip::iota(M1.begin(),M1.end(),1,1);
double mean1 = slip::mean<double>(M1.begin(),M1.end());
slip::iota(M2.begin(),M2.end(),4,1);
double mean2 = slip::mean<double>(M2.begin(),M2.end());
std::cout<<slip::unbiased_covariance<float>(M1.begin(),M1.end(),M2.begin(),mean1,mean2)<<std::endl;

Definition at line 488 of file statistics.hpp.

template<typename T , typename InputIterator , typename InputIterator2 , typename Predicate >
T slip::unbiased_covariance_if ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
mean1,
mean2,
Predicate  pred 
)
inline

Computes the unbiased covariance of a two sequences using a predicate on the first one

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mean1The mean of the first range using the predicate.
mean2The mean of the second range using the predicate.
preda predicate function
Returns
The value of the unbiased covariance of the two ranges using the predicate.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::unbiased_covariance_if(M.begin(),M.end(),M.begin(),mean_if,mean_if,myPredicate)<<std::endl;

Definition at line 2827 of file statistics.hpp.

template<typename T , typename InputIterator , typename InputIterator2 , typename MaskIterator >
T slip::unbiased_covariance_mask ( InputIterator  first,
InputIterator  last,
InputIterator2  first2,
MaskIterator  mask_first,
mean1,
mean2,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the unbiased covariance of a two sequences over a mask

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})(y_i-\overline{y})\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
first2An InputIterator.
mask_firstAn InputIterator on the mask
mean1The mean of the first range over the mask.
mean2The mean of the second range over the mask.
valueMask value.
Returns
The value of the covariance of the two ranges over the mask.
Precondition
[first,last) must be valid.
The two conainers must have the same sizes.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::unbiased_covariance_mask(M.begin(),M.end(),,M.begin(),ValuedMask.begin(),mean_mask2,mean_mask2,2)<<std::endl;

Definition at line 1664 of file statistics.hpp.

template<typename T , typename InputIterator >
T slip::unbiased_kurtosis ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the unbiased kurtosis of a range

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of the kurtosis of the container.
Precondition
[first,last) must be valid.
slip::cardinal<int>(last-first) > 3
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<double>(M.begin(),M.end());
std::cout<<slip::unbiased_kurtosis(M.begin(),M.end(),mean)<<std::endl;

Definition at line 715 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::unbiased_kurtosis_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the unbiased kurtosis of a range using a predicate

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of the unbiased kurtosis of the range using the predicate.
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::unbiased_kurtosis_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 3121 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::unbiased_kurtosis_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the unbiased kurtosis of a range over a mask

\[\frac{(n+1)n(n-1)}{(n-2)(n-3)}\frac{\sum_i (x_i-\overline{x})^4}{\left[\sum_i (x_i-\overline{x})^2\right]^2}- \frac{3(n-1)^2}{(n-2)(n-3)} + 3\]

A high kurtosis distribution has a sharper peak and longer, fatter tails, while a low kurtosis distribution has a more rounded peak and shorter thinner tails.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of the kurtosis of the range over the mask.
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::unbiased_kurtosis_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1971 of file statistics.hpp.

template<typename T , typename InputIterator >
T slip::unbiased_skewness ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the unbiased skewness of a range

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
    Date
    2009/09/09
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    std_devThe standard deviation of the container itself.
    Returns
    The value of the skewness of the container.
    Precondition
    [first,last) must be valid.
    (last-first) > 2
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    double mean = slip::mean<double>(M.begin(),M.end());
    std::cout<<slip::skewness(M.begin(),M.end(),mean)<<std::endl;

Definition at line 820 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::unbiased_skewness_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the unbiased skewness of a range using a predicate

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    meanThe mean of the range itself using the predicate.
    preda predicate function
    Returns
    The value of the skewness of the range using the predicate.
    Precondition
    [first,last) must be valid.
    Example:
    //definition of the predicate less than 10
    bool myPredicate (const double& val)
    {
    return (val<10);
    }
    //construction of the array
    slip::iota(M.begin(),M.end(),1,1);
    double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
    std::cout<<slip::unbiased_skewness_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 3250 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::unbiased_skewness_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the unbiased skewness of a range over a mask

\[\frac{n}{(n-1)(n-2)}\frac{\sum_i (x_i-\overline{x})^3}{\left(\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\right)^3}\]

skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable.

  • negative skew: The left tail is longer; the mass of the distribution is concentrated on the right
  • positive skew: The right tail is longer; the mass of the distribution is concentrated on the left
  • 0 skew: the distribution is symmetric (Normal distribution for example)
    Author
    Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
    Date
    2007/05/25
    Since
    1.0.0
    Version
    0.0.1
    Parameters
    firstAn InputIterator.
    lastAn InputIterator.
    mask_firstAn InputIterator on the mask
    meanThe mean of the range itself over the mask.
    valueMask value.
    Returns
    The value of the skewness of the range over the mask.
    Precondition
    [first,last) must be valid.
    Range and the Mask must have the same dimensions
    Example:
    slip::iota(M.begin(),M.end(),1,1);
    slip::Array2d<int> ValuedMask(4,5,2);
    for(std::size_t i = 0; i < M.dim1(); ++i)
    {
    ValuedMask[i][0]= 0;
    }
    for(std::size_t j = 0; j < M.dim2(); ++j)
    {
    ValuedMask[0][j]=0;
    }
    double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
    std::cout<<slip::unbiased_skewness_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 2118 of file statistics.hpp.

template<typename InputIterator , typename T >
void slip::unbiased_statistics ( InputIterator  first,
InputIterator  last,
slip::Statistics< T > &  statistic 
)

compute all unbiased statistics of a range

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
statisticslip::statistics
Returns
a range which contains all its statistics
Example:
int f[]={6, 47, 49, 15, 43, 41, 7, 39, 43, 41, 36};
std::cout<<"M=\n"<<M<<std::endl;
std::cout<<"min, first quartile, median, third quartile, maximum,
mean, unbiased standard deviation, unbiased skewness, unbiased kurtosis and cardinal"<<std::endl;
std::cout<<stat.all()<<std::endl;

Definition at line 3714 of file statistics.hpp.

template<typename InputIterator , typename T , typename Predicate >
void slip::unbiased_statistics_if ( InputIterator  first,
InputIterator  last,
slip::Statistics< T > &  statistic,
Predicate  pred 
)

compute all unbiased statistics of a range according to a preidcate.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
statisticslip::statistics
preda predicate function.
Returns
a range which contains all its unbiased statistics
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
slip::unbiased_statistics_if(M.begin(),M.end(),S,myPredicate);
std::cout<<"unbiased_statistics using a predicate"<<std::endl;
std::cout<<S.all()<<std::endl;

Definition at line 4022 of file statistics.hpp.

template<typename InputIterator , typename T , typename MaskIterator >
void slip::unbiased_statistics_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
slip::Statistics< T > &  statistic,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)

compute all unbiased statistics of a range according to a mask range.

Author
Mouhamed Hammoud <hammoud_AT_sic.univ-poitiers.fr>
Date
2009/08/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator of the mask
statisticslip::Statistics which contains all the unbiased statistics of the range.
valueMask value.
Example1:
slip::Array2d<bool> Mask(4,5,true);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
Mask[i][0]=false;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
Mask[0][j]=false;
}
std::cout << "Data : "<<std::endl<<M<<std::endl;
std::cout << "Mask : "<< std::endl<<Mask<<std::endl;
slip::unbiased_statistics_mask(M.begin(),M.end(),Mask.begin(),S);
std::cout<<"unbiased statistics mask"<<std::endl;
std::cout<<S.all()<<std::endl;
Example2:
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
std::cout << "Data : "<<std::endl<<M<<std::endl;
std::cout << "ValuedMask : "<< std::endl<<ValuedMask<<std::endl;
slip::unbiased_statistics_mask(M.begin(),M.end(),ValuedMask.begin(),S,2);
std::cout<<"unbiased statistics mask"<<std::endl;
std::cout<<S.all()<<std::endl;

Definition at line 3884 of file statistics.hpp.

template<typename T , typename InputIterator >
T slip::unbiased_std_dev ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the unbiased standard deviation of a range

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of standard deviation of the container.
Note
Calls std::sqrt(slip::unbiased_variance(first,last,first,mean)).
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<float>(M.begin(),M.end());
std::cout<<slip::unbiased_std_dev(M.begin(),M.end(),mean)<<std::endl;

Definition at line 626 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::unbiased_std_dev_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the unbiased standard deviation of a range using a predicate

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of unbiased standard deviation of the range using the predicate.
Note
Calls std::sqrt(slip::unbiased_variance_if(first,last,first,pred,mean)).
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::unbiased_std_dev_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 3011 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::unbiased_std_dev_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the unbiased standard deviation of a range over a mask

\[\sqrt{\frac{1}{n-1}\sum_i (x_i-\overline{x})^2}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of standard deviation of the range over the mask.
Note
Calls std::sqrt(slip::variance_mask(first,last,first,mask_first,mean)).
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::unbiased_std_dev_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1855 of file statistics.hpp.

template<typename T , typename InputIterator >
T slip::unbiased_variance ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the unbiased variance of a range

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of the variance of the container.
Note
Calls slip::unbiased_covariance(first,last,first,mean,mean).
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<double>(M.begin(),M.end());
std::cout<<slip::unbiased_variance(M.begin(),M.end(),mean)<<std::endl;

Definition at line 566 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::unbiased_variance_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the unbiased variance of a range using a predicate

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of the unbiased variance of the range using the predicate.
Note
Calls slip::unbiased_covariance_if(first,last,first,pred, mean,mean).
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::unbiased_variance_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 2928 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::unbiased_variance_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the unbiased variance of a range over a mask

\[\frac{1}{n-1}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of the variance of the range over the mask.
Note
Calls slip::covariance_mask(first,last,first,mask_first, mean,mean).
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::unbiased_variance_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1770 of file statistics.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unit_lower_band_solve ( MatrixIterator  L_up,
MatrixIterator  L_bot,
int  p,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last 
)
inline

Solve the linear system L*X=B when L is unit p lower banded

\[ \left( \begin{array}{ccccccc} 1 & 0&\cdots&\cdots&\cdots&\cdots&0\\ l_{2,1} & 1 & \ddots&&&&\vdots\\ \vdots&\ddots&\ddots&\ddots&&&\vdots\\ l_{p+1,1}&&\ddots&\ddots&\ddots&&\vdots\\ 0&\ddots&&\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&&\ddots&1&0\\ 0&\cdots&0&l_{n,n-q}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
pWidth of the lower band.
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
Precondition
L must be lower triangular
(L_bot - L_up)[0] == (L_bot - L_up)[1]
(L_bot - L_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
p < int((L_bot - L_up)[0])
Remarks
If L is singular an exception will be raised.
Works with real and complex data.
Complexity: np - p^2/2 flops
Example:
slip::Matrix<double> Gulband(5,5);
slip::hilbert(Gulband);
slip::fill_diagonal(Gulband,0.0,1);
slip::fill_diagonal(Gulband,0.0,2);
slip::fill_diagonal(Gulband,0.0,3);
slip::fill_diagonal(Gulband,0.0,4);
slip::fill_diagonal(Gulband,0.0,-4);
slip::fill_diagonal(Gulband,0.0,-3);
slip::fill_diagonal(Gulband,1.0);
double bulband[] = {22.0,7.0,4.5,1.0,2.0};
slip::Vector<double> Bulband(5,bulband);
std::cout<< "Gulband : " <<std::endl;
std::cout<< Gulband <<std::endl;
std::cout<< "Bulband : " <<std::endl;
std::cout<< Bulband <<std::endl;
slip::unit_lower_band_solve(Gulband.upper_left(),Gulband.bottom_right(),
2,
Xulband.begin(),Xulband.end(),
Bulband.begin(),Bulband.end(),1.0e-06);
std::cout<< "Xulband : \n" <<Xulband<<std::endl;
std::cout<< "Check: "<<std::endl;
slip::matrix_vector_multiplies(Gulband,Xulband,Bulband2);
std::cout<< "Bulband2 : \n" <<Bulband2<<std::endl;

Definition at line 7400 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::unit_lower_bidiagonal_inv ( RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot 
)

Invert a lower unit bidiagonal matrix:

\[ \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ l_{1} & 1 & \ddots&&\vdots\\ 0&l_{2}&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&l_{n-1}&1\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
low_diag_firstRandomAccessIterator to the beginning of the first lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end of the first lower diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
Precondition
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (low_diag_last - low_diag_first + 1)
Complexity: 2n^2 - n flops
Remarks
Works with real and complex data
Example:
double lb_low[] = {2.0,2.0,1.0};
slip::Vector<double> LB_low(3,lb_low);
slip::Matrix<double> LB(LB_diag.size(),LB_diag.size());
slip::set_diagonal(LB_low.begin(),LB_low.end(),LB,-1);
std::cout<<"LB = \n"<<LB<<std::endl;
slip::Matrix<double> LBinv(LB.rows(),LB.cols());
slip::unit_lower_bidiagonal_inv(LB_low.begin(),LB_low.end(),
LBinv.upper_left(),LBinv.bottom_right());
std::cout<<"LBinv = \n"<<LBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> LBLBinv(LB.rows(),LB.cols());
std::cout<<"LBLBinv = \n"<<LBLBinv<< std::endl;

Definition at line 8007 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::unit_lower_bidiagonal_solve ( RandomAccessIterator1  low_diag_first,
RandomAccessIterator1  low_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last 
)

solve Ax = B with A unit lower bidiagonal

\[ \left( \begin{array}{ccccc} 1 & 0&\cdots&\cdots&0\\ ll_1 & 1 & \ddots&&\vdots\\ 0&ll_2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ 0&\cdots&0&ll_{n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
low_diag_firstRandomAccessIterator to the first element of the lower diagonal.
low_diag_lastRandomAccessIterator to one-past-the-end element of the lower diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
Precondition
low_diag_last != low_diag_first
(low_diag_last - low_diag_first) == (X_last - X_first - 1)
(low_diag_last - low_diag_first) == (B_last - B_first - 1)
Complexity: 2(n-1) flops
Remarks
Works with real and complex data
Example:
double lb_low[] = {2.0,2.0,1.0};
double b_lb[] = {3.0,2.0,1.0};
slip::Vector<double> LB_diag(4,lb_diag);
slip::Vector<double> LB_low(3,lb_low);
slip::Matrix<double> LB(LB_diag.size(),LB_diag.size());
slip::set_diagonal(LB_low.begin(),LB_low.end(),LB,-1);
std::cout<<"LB = \n"<<LB<<std::endl;
slip::Vector<double> B_lb(4,b_lb);
slip::unit_lower_bidiagonal_inv(LB_diag.begin(),LB_diag.end(),
LB_low.begin(),LB_low.end(),
X_lb.begin(),X_lb.end(),
B_lb.begin(),B_lb.end());
std::cout<<"X_lb = \n"<<X_lb<< std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"X_lb2 = \n"<<X_lb2<< std::endl;

Definition at line 7946 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unit_lower_triangular_solve ( MatrixIterator  L_up,
MatrixIterator  L_bot,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last 
)
inline

Solve the linear system L*X=B when L is unit lower triangular

\[ \left( \begin{array}{cccc} 1 & 0&\cdots&0\\ l_{2,1} & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
L_up2D iterator corresponding to the upper_left element of the matrix L
L_bot2D iterator corresponding to one past-the-end bottom_right of the matrix L
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
Precondition
L must be lower triangular
(L_bot - L_up)[0] == (L_bot - L_up)[1]
(L_bot - L_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
Remarks
Works with real and complex data.
Complexity: n^2 flops
Example:
double dlow[] = {2.0, 0.0, 0.0, 1.0, 5.0, 0.0, 7.0, 9.0, 8.0};
slip::Array2d<double> Alow(3,3,dlow);
std::cout<<"Alow ="<<std::endl;
std::cout<<Alow<<std::endl;
double blow[] = {6.0,2.0,5.0};
slip::Array<double> Blow(3,blow);
std::cout<<"Blow ="<<std::endl;
std::cout<<Blow<<std::endl;
slip::unit_lower_triangular_solve(Alow.upper_left(),Alow.bottom_right(),
Xlow.begin(),Xlow.end(),
Blow.begin(),Blow.end(),10E-6);
std::cout<<"Xlow = "<<Xlow<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Alow * Xlow = "<<std::endl;
std::cout<<Blow2<<std::endl;

Definition at line 6539 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::unit_lower_triangular_solve ( const Matrix &  L,
Vector1 &  X,
const Vector2 &  B 
)
inline

Solve the linear system L*X=B when L is unit lower triangular

\[ \left( \begin{array}{cccc} 1 & 0&\cdots&0\\ l_{2,1} & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&0\\ l_{n,1}&\cdots&l_{n,n-1}&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/05
Since
1.0.0
Version
0.0.1
Parameters
L2D container
X1D container
B1D container
Precondition
L should be unit lower triangular
L.rows() == L.cols()
L.cols() == X.size()
X.size() == B.size()
Complexity: n^2 flops
Remarks
Works with real and complex data.
Example:
double dllow[] = {1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 4.0, 1.0};
slip::Array2d<double> Allow(3,3,dllow);
std::cout<<"Allow ="<<std::endl;
std::cout<<Allow<<std::endl;
double bllow[] = {6.0,2.0,5.0};
slip::Array<double> Bllow(3,bllow);
std::cout<<"Bllow ="<<std::endl;
std::cout<<Bllow<<std::endl;
std::cout<<"Xllow = "<<Xllow<<std::endl;
std::cout<<"Xllow = "<<Xllow<<std::endl;
std::cout<<"Check:"<<std::endl;
slip::matrix_vector_multiplies(Allow,Xllow,Bllow2);
std::cout<<"Allow * Xllow = "<<std::endl;
std::cout<<Bllow2<<std::endl;

Definition at line 6631 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unit_upper_band_solve ( MatrixIterator  U_up,
MatrixIterator  U_bot,
int  q,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision 
)
inline

Solve the linear system U*X=B when U is unit q width upper banded

\[ \left( \begin{array}{cccccc} 1 & \cdots&u_{1,q+1}&0&\cdots&0\\ 0 & 1 &\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\ddots&u_{n-q,n}\\ \vdots&&&\ddots&\ddots&\vdots\\ 0&\cdots&\cdots&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
U_up2D iterator corresponding to the upper_left element of the matrix U
U_bot2D iterator corresponding to one past-the-end bottom_right of the matrix U
qSize of the upper band.
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
U must be upper triangular
(U_bot - U_up)[0] == (U_bot - U_up)[1]
(U_bot - U_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
q < int((U_bot - U_up)[0])
Complexity: n(q+1) - q^2/2 flops
Remarks
Works with real and complex data.
Example:
slip::Matrix<double> Guuband(5,5);
slip::hilbert(Guuband);
slip::fill_diagonal(Guuband,0.0,-1);
slip::fill_diagonal(Guuband,0.0,-2);
slip::fill_diagonal(Guuband,0.0,-3);
slip::fill_diagonal(Guuband,0.0,-4);
slip::fill_diagonal(Guuband,0.0,4);
slip::fill_diagonal(Guuband,0.0,3);
slip::fill_diagonal(Guuband,1.0);
double buuband[] = {22.0,7.0,4.5,1.0,2.0};
slip::Vector<double> Buuband(5,buuband);
std::cout<< "Guuband : " <<std::endl;
std::cout<< Guuband <<std::endl;
std::cout<< "Buuband : " <<std::endl;
std::cout<< Buuband <<std::endl;
slip::upper_band_solve(Guuband.upper_left(),Guuband.bottom_right(),
2,
Xuuband.begin(),Xuuband.end(),
Buuband.begin(),Buuband.end(),1.0e-06);
std::cout<< "Xuuband : \n" <<Xuuband<<std::endl;
std::cout<< "Check: "<<std::endl;
slip::matrix_vector_multiplies(Guuband,Xuuband,Buuband2);
std::cout<< "Buuband2 : \n" <<Buuband2<<std::endl;

Definition at line 7154 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::unit_upper_bidiagonal_inv ( RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot 
)

Invert an unit upper bidiagonal matrix:

\[ \left( \begin{array}{ccccc} 1 & u_{1}&0&\cdots&0\\ 0 & 1 & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&1\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
Precondition
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (up_diag_last - up_diag_first + 1)
Complexity: 2n^2 - n flops
Remarks
Works with real and complex data
Example:
double ub_up[] = {2.0,2.0,1.0};
slip::Vector<double> UB_up(3,ub_up);
slip::Matrix<double> UB(UB_diag.size(),UB_diag.size());
slip::set_diagonal(UB_up.begin(),UB_up.end(),UB,1);
std::cout<<"UB = \n"<<UB<<std::endl;
slip::Matrix<double> UBinv(UB.rows(),UB.cols());
slip::unit_upper_bidiagonal_inv(UB_up.begin(),UB_up.end(),
UBinv.upper_left(),UBinv.bottom_right());
std::cout<<"UBinv = \n"<<UBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> UBUBinv(UB.rows(),UB.cols());
std::cout<<"UBUBinv = \n"<<UBUBinv<< std::endl;

Definition at line 8690 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::unit_upper_bidiagonal_solve ( RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last 
)

solve Ax = B with A unit upper bidiagonal

\[ \left( \begin{array}{ccccc} 1 & uu_1&0&\cdots&0\\ 0 & \ddots & \ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
up_diag_firstRandomAccessIterator to the first element of the upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end element of the upper diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
Precondition
X_last != X_first
(X_last - X_first) == (B_last - B_first)
(diag_last - diag_first) == (B_last - B_first)
(X_last - X_first) == (up_diag_last - up_diag_first + 1)
Complexity: 2n - 1 flops
Remarks
Works with real and complex data
Example:
double ub_up[] = {2.0,2.0,1.0};
double b_ub[] = {2.0,1.0,4.0,3.0};
slip::Vector<double> UB_up(3,ub_up);
slip::Matrix<double> UB(UB_diag.size(),UB_diag.size());
slip::set_diagonal(UB_up.begin(),UB_up.end(),UB,1);
std::cout<<"UB = \n"<<UB<<std::endl;
slip::Vector<double> B_ub(4,b_ub);
slip::Matrix<double> X_ub(B_ub.size());
slip::unit_upper_bidiagonal_solve(UB_up.begin(),UB_up.end(),
X_ub.begin(),X_ub.end(),
B_ub.begin(),B_ub.bottom_right());
std::cout<<"X_ub = \n"<<X_ub<< std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"B_ub2 = \n"<<B_ub2<< std::endl;

Definition at line 8620 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::unit_upper_triangular_solve ( MatrixIterator  U_up,
MatrixIterator  U_bot,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last 
)
inline

Solve the linear system U*X=B when U is unit upper triangular

\[ \left( \begin{array}{cccc} 1 & u_{1,2}&\cdots&u_{1,n}\\ 0 & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
U_up2D iterator corresponding to the upper_left element of the matrix U
U_bot2D iterator corresponding to one past-the-end bottom_right of the matrix U
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
Precondition
U should be unit upper triangular
(U_bot - U_up)[0] == (U_bot - U_up)[1]
(U_bot - U_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
Complexity: n^2 flops
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
std::complex<double> dup2c[] = {TC(1.0,0.0), TC(1.0,0.3), TC(5.0,1.2),
TC(0.0,0.0), TC(1.0,0.0), TC(3.0,-0.1),
TC(0.0,0.0), TC(0.0,0.0), TC(1.0,1.0)};
std::cout<<"Aupc ="<<std::endl;
std::cout<<Aupc<<std::endl;
std::complex<double> bupc[] = {TC(6.0,0.5),TC(2.0,1.1),TC(5.0,4.7)};
std::cout<<"Bupc ="<<std::endl;
std::cout<<Bupc<<std::endl;
slip::unit_upper_triangular_solve(Aupc.upper_left(),Aupc.bottom_right(),
Xupc.begin(),Xupc.end(),
Bupc.begin(),Bupc.end());
std::cout<<"Xupc = "<<Xupc<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aupc * Xupc = "<<std::endl;
std::cout<<Bup2c<<std::endl;

Definition at line 6363 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::unit_upper_triangular_solve ( const Matrix &  U,
Vector1 &  X,
const Vector2 &  B 
)
inline

Solve the linear system U*X=B when U is unit upper triangular

\[ \left( \begin{array}{cccc} 1 & u_{1,2}&\cdots&u_{1,n}\\ 0 & 1 & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&1\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/01
Since
1.0.0
Version
0.0.2
Parameters
U2D container
X1D container
B1D container
Precondition
U should be unit upper triangular
U.rows() == U.cols()
U.cols() == X.size()
X.size() == B.size()
Complexity: n^2 flops
Remarks
Works with real and complex data.
Example:
typedef std::complex<double> TC;
std::complex<double> dup2c[] = {TC(1.0,0.0), TC(1.0,0.3), TC(5.0,1.2),
TC(0.0,0.0), TC(1.0,0.0), TC(3.0,-0.1),
TC(0.0,0.0), TC(0.0,0.0), TC(1.0,1.0)};
std::cout<<"Aupc ="<<std::endl;
std::cout<<Aupc<<std::endl;
std::complex<double> bupc[] = {TC(6.0,0.5),TC(2.0,1.1),TC(5.0,4.7)};
std::cout<<"Bupc ="<<std::endl;
std::cout<<Bupc<<std::endl;
std::cout<<"Xupc = "<<Xupc<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aupc * Xupc = "<<std::endl;
std::cout<<Bup2c<<std::endl;

Definition at line 6461 of file linear_algebra.hpp.

template<typename _II >
void slip::update_border ( _II  first,
_II  last,
const slip::BORDER_TREATMENT  border,
const std::size_t  b_size = 1 
)

Updates the border of the range [first,last) according to b_size and border condition: border.

Since
1.0.0
Parameters
firstRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
lastRandomAccessIterator or RandomAccessIterator2d or RandomAccessIterator3d.
borderslip::BORDER_TREATMENT border condition.
b_sizeSize of the border (1 by default).
Precondition
first, last must be of the same iterator_category.
Example:
//The input grayscale image
slip::iota(I2.begin(),I2.end(),1.0);
//The enlarged grayscale image
slip::GrayscaleImage<double> tmp2(I2.rows()+(2*b_size),
I2.cols()+(2*b_size));
//add border to I2 in tmp2 with slip::BORDER_TREATMENT_NEUMANN conditions
//and a border size of 2
std::size_t b_size = 2;
slip::add_border(I2.upper_left(),I2.bottom_right(),
tmp2.upper_left(),tmp2.bottom_right(),
//fill border of tmp2 with 4
slip::fill_border(tmp2.upper_left(),tmp2.bottom_right(),
b_size,double(4));
//update border with slip::BORDER_TREATMENT_NEUMANN condition
slip::update_border(tmp.begin(),tmp.end(),

Definition at line 802 of file border_treatment.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::upper_band_solve ( MatrixIterator  U_up,
MatrixIterator  U_bot,
int  q,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision 
)
inline

Solve the linear system U*X=B when U is q width upper banded

\[ \left( \begin{array}{cccccc} u_{1,1} & \cdots&u_{1,q+1}&0&\cdots&0\\ 0 & u_{2,2} &\ddots&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&\ddots&u_{n-q,n}\\ \vdots&&&\ddots&\ddots&\vdots\\ 0&\cdots&\cdots&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/03
Since
1.0.0
Version
0.0.1
Parameters
U_up2D iterator corresponding to the upper_left element of the matrix U
U_bot2D iterator corresponding to one past-the-end bottom_right of the matrix U
qSize of the upper band.
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
U must be upper triangular
(U_bot - U_up)[0] == (U_bot - U_up)[1]
(U_bot - U_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
q < int((U_bot - U_up)[0])
Complexity: n(q+1) - q^2/2 flops
Remarks
If U is singular an exception will be raised.
Works with real and complex data.
Example:
slip::hilbert(Guband);
slip::fill_diagonal(Guband,0.0,-1);
slip::fill_diagonal(Guband,0.0,-2);
slip::fill_diagonal(Guband,0.0,-3);
slip::fill_diagonal(Guband,0.0,-4);
slip::fill_diagonal(Guband,0.0,4);
slip::fill_diagonal(Guband,0.0,3);
double buband[] = {22.0,7.0,4.5,1.0,2.0};
slip::Vector<double> Buband(5,buband);
std::cout<< "Guband : " <<std::endl;
std::cout<< Guband <<std::endl;
std::cout<< "Buband : " <<std::endl;
std::cout<< Buband <<std::endl;
slip::upper_band_solve(Guband.upper_left(),Guband.bottom_right(),
2,
Xuband.begin(),Xuband.end(),
Buband.begin(),Buband.end(),1.0e-06);
std::cout<< "Xuband : \n" <<Xuband<<std::endl;
std::cout<< "Check: "<<std::endl;
slip::matrix_vector_multiplies(Guband,Xuband,Buband2);
std::cout<< "Buband2 : \n" <<Buband2<<std::endl;

Definition at line 7025 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2d >
void slip::upper_bidiagonal_inv ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2d  Ainv_up,
RandomAccessIterator2d  Ainv_bot,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

Invert an upper bidiagonal squared matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ 0 & d_{2} & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the beginning of the main diagonal.
diag_lastRandomAccessIterator to one-past-the-end of the main diagonal.
up_diag_firstRandomAccessIterator to the beginning of the first upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end of the first upper diagonal.
Ainv_upRandomAccessIterator2d to the upper_left element of the 2d range of the inverse matrix.
Ainv_botRandomAccessIterator2d to the one past the bottom_right element of the 2d range of the inverse matrix.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1])
(Ainv_bot - Ainv_up)[0] == (diag_last - diag_first)
Complexity: 3n^2 - 2n flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double ub_diag[] = {1.0,2.0,3.0,4.0};
double ub_up[] = {2.0,2.0,1.0};
slip::Vector<double> UB_diag(4,ub_diag);
slip::Vector<double> UB_up(3,ub_up);
slip::Matrix<double> UB(UB_diag.size(),UB_diag.size());
slip::set_diagonal(UB_diag.begin(),UB_diag.end(),UB);
slip::set_diagonal(UB_up.begin(),UB_up.end(),UB,1);
std::cout<<"UB = \n"<<UB<<std::endl;
slip::Matrix<double> UBinv(UB.rows(),UB.cols());
slip::upper_bidiagonal_inv(UB_diag.begin(),UB_diag.end(),
UB_up.begin(),UB_up.end(),
UBinv.upper_left(),UBinv.bottom_right());
std::cout<<"UBinv = \n"<<UBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> UBUBinv(UB.rows(),UB.cols());
std::cout<<"UBUBinv = \n"<<UBUBinv<< std::endl;

Definition at line 8451 of file linear_algebra.hpp.

template<typename Container2d1 , typename Container2d2 >
void slip::upper_bidiagonal_inv ( const Container2d1 &  A,
Container2d2 &  Ainv,
typename slip::lin_alg_traits< typename Container2d1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Container2d1::value_type>::value_type(1.0E-6) 
)

Invert an upper bidiagonal squared matrix

\[ \left( \begin{array}{ccccc} d_{1} & u_{1}&0&\cdots&0\\ 0 & d_{2} & u_{2}&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&u_{n-1}\\ 0&\cdots&\cdots&0&d_{n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/17
Since
1.0.0
Version
0.0.1
Parameters
A2d container of the matrix to invert.
Ainv2d container of the matrix the inverse matrix.
precision1.0E-6 by default.
Precondition
A.dim1() == A.dim2()
Ainv.dim1() == Ainv.dim2()
Complexity: 3n^2 - 2n flops + (2n - 1) flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular
Example:
double ub_diag[] = {1.0,2.0,3.0,4.0};
double ub_up[] = {2.0,2.0,1.0};
slip::Vector<double> UB_diag(4,ub_diag);
slip::Vector<double> UB_up(3,ub_up);
slip::Matrix<double> UB(UB_diag.size(),UB_diag.size());
slip::set_diagonal(UB_diag.begin(),UB_diag.end(),UB);
slip::set_diagonal(UB_up.begin(),UB_up.end(),UB,1);
std::cout<<"UB = \n"<<UB<<std::endl;
slip::Matrix<double> UBinv(UB.rows(),UB.cols());
std::cout<<"UBinv = \n"<<UBinv<< std::endl;
std::cout<<"Check:"<<std::endl;
slip::Matrix<double> UBUBinv(UB.rows(),UB.cols());
std::cout<<"UBUBinv = \n"<<UBUBinv<< std::endl;

Definition at line 8526 of file linear_algebra.hpp.

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename RandomAccessIterator3 >
void slip::upper_bidiagonal_solve ( RandomAccessIterator1  diag_first,
RandomAccessIterator1  diag_last,
RandomAccessIterator1  up_diag_first,
RandomAccessIterator1  up_diag_last,
RandomAccessIterator2  X_first,
RandomAccessIterator2  X_last,
RandomAccessIterator3  B_first,
RandomAccessIterator3  B_last,
typename slip::lin_alg_traits< typename std::iterator_traits< RandomAccessIterator1 >::value_type >::value_type  precision = typename slip::lin_alg_traits<typename std::iterator_traits<RandomAccessIterator1>::value_type>::value_type(1.0E-6) 
)

solve Ax = B with A upper bidiagonal

\[ \left( \begin{array}{ccccc} du_1 & uu_1&0&\cdots&0\\ 0 & \ddots & \ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&0\\ \vdots&&\ddots&\ddots&uu_{n-1}\\ 0&\cdots&\cdots&0&du_{n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_n\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_n\\ \end{array}\right) \]

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/04
Since
1.0.0
Version
0.0.1
Parameters
diag_firstRandomAccessIterator to the first element of thediagonal.
diag_lastRandomAccessIterator to one-past-the-end element of the diagonal.
up_diag_firstRandomAccessIterator to the first element of the upper diagonal.
up_diag_lastRandomAccessIterator to one-past-the-end element of the upper diagonal.
X_firstRandomAccessIterator to the begenning of the result range.
X_lastRandomAccessIterator to one-past-the-end of the result range.
B_firstRandomAccessIterator to the begenning of the B range.
B_lastRandomAccessIterator to one-past-the-end of the B range.
precision1.0E-6 by default.
Precondition
diag_last != diag_first
(diag_last - diag_first) == (X_last - X_first)
(diag_last - diag_first) == (B_last - B_first)
(diag_last - diag_first) == (up_diag_last - up_diag_first + 1)
Complexity: 3n - 2 flops
Remarks
Works with real and complex data
Will raise an exception if the matrix is singular.
Example:
double ub_diag[] = {1.0,2.0,3.0,4.0};
double ub_up[] = {2.0,2.0,1.0};
double b_ub[] = {2.0,1.0,4.0,3.0};
slip::Vector<double> UB_diag(4,ub_diag);
slip::Vector<double> UB_up(3,ub_up);
slip::Matrix<double> UB(UB_diag.size(),UB_diag.size());
slip::set_diagonal(UB_diag.begin(),UB_diag.end(),UB);
slip::set_diagonal(UB_up.begin(),UB_up.end(),UB,1);
std::cout<<"UB = \n"<<UB<<std::endl;
slip::Vector<double> B_ub(4,b_ub);
slip::Matrix<double> X_ub(B_ub.size());
slip::upper_bidiagonal_solve(UB_diag.begin(),UB_diag.end(),
UB_up.begin(),UB_up.end(),
X_ub.begin(),X_ub.end(),
B_ub.begin(),B_ub.bottom_right());
std::cout<<"X_ub = \n"<<X_ub<< std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"B_ub2 = \n"<<B_ub2<< std::endl;

Definition at line 8360 of file linear_algebra.hpp.

template<typename MatrixIterator1 , typename MatrixIterator2 >
void slip::upper_triangular_inv ( MatrixIterator1  A_up,
MatrixIterator1  A_bot,
MatrixIterator2  Ainv_up,
MatrixIterator2  Ainv_bot,
typename slip::lin_alg_traits< typename MatrixIterator1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename MatrixIterator1::value_type>::value_type(1.0E-6) 
)
inline

Invert an upper triangular Matrix

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
A_up2D iterator corresponding to the upper_left element of the matrix A
A_bot2D iterator corresponding to one past-the-end bottom_right of the matrix A
Ainv_up2D iterator corresponding to the upper_left element of the inverse matrix.
Ainv_bot2D iterator corresponding to one past-the-end bottom_right of the inverse matrix.
precision1.0E-6 by default.
Precondition
(A_bot - A_up)[0] == (A_bot - A_up)[1];
(Ainv_bot - Ainv_up)[0] == (Ainv_bot - Ainv_up)[1];
(A_bot - A_up)[0] == (Ainv_bot - Ainv_up)[0]
(A_bot - A_up)[1] == (Ainv_bot - Ainv_up)[1]
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular
Complexity: n^3 flops
Example:
double dup2[] = {2.0, 3.0, 4.5, 0.0, 1.0, 3.0, 0.0, 0.0, 2.0};
slip::Array2d<double> Aup(3,3,dup2);
std::cout<<"Aup =\n "<<Aup<<std::endl;
slip::upper_triangular_inv(Aup.upper_left(),Aup.bottom_right(),
invAup.upper_left(),invAup.bottom_right(),
1.0e-8);
std::cout<<"invAup = \n"<<invAup<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aup * invAup = \n"<<IAup<<std::endl;

Definition at line 5895 of file linear_algebra.hpp.

template<typename Matrix1 , typename Matrix2 >
void slip::upper_triangular_inv ( Matrix1  A,
Matrix2  Ainv,
typename slip::lin_alg_traits< typename Matrix1::value_type >::value_type  precision = typename slip::lin_alg_traits<typename Matrix1::value_type>::value_type(1.0E-6) 
)
inline

Invert an upper triangular Matrix

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right)^{-1} \]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/03/08
Since
1.0.0
Version
0.0.1
Parameters
AThe matrix to invert.
AinvThe inverted matrix.
precision1.0E-6 by default.
Precondition
A.rows() == A.cols()
Ainv.rows() == Ainv.cols()
A.rows() == Ainv.rows()
Remarks
Works with real and complex data.
Will raise an exception if the matrix is singular
Complexity: n^3 flops
Example:
double dup2[] = {2.0, 3.0, 4.5, 0.0, 1.0, 3.0, 0.0, 0.0, 2.0};
slip::Array2d<double> Aup(3,3,dup2);
std::cout<<"Aup =\n "<<Aup<<std::endl;
slip::upper_triangular_inv(Aup,invAup,1.0e-8);
std::cout<<"invAup = \n"<<invAup<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aup * invAup = \n"<<IAup<<std::endl;

Definition at line 5970 of file linear_algebra.hpp.

template<typename MatrixIterator , typename RandomAccessIterator1 , typename RandomAccessIterator2 >
void slip::upper_triangular_solve ( MatrixIterator  U_up,
MatrixIterator  U_bot,
RandomAccessIterator1  X_first,
RandomAccessIterator1  X_last,
RandomAccessIterator2  B_first,
RandomAccessIterator2  B_last,
typename slip::lin_alg_traits< typename MatrixIterator::value_type >::value_type  precision 
)
inline

Solve the linear system U*X=B when U is upper triangular

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr> : adaptor
Date
2009/02/27
Since
1.0.0
Version
0.0.2
Parameters
U_up2D iterator corresponding to the upper_left element of the matrix U
U_bot2D iterator corresponding to one past-the-end bottom_right of the matrix U
X_firstRandomAccessIterator point to the first element of X.
X_lastRandomAccessIterator point one-past-the-end element of X.
B_firstRandomAccessIterator point to the first element of B.
B_lastRandomAccessIterator to one-past-the-end element of B.
precision
Precondition
U must be upper triangular
(U_bot - U_up)[0] == (U_bot - U_up)[1]
(U_bot - U_up)[1] == (X_last - X_first)
(X_last - X_first) == (B_last - B_first)
Complexity: n^2 flops
Remarks
If U is singular an exception will be raised.
Works with real and complex data.
Example:
typedef std::complex<double> TC;
std::complex<double> dup2c[] = {TC(2.0,0.5), TC(1.0,0.3), TC(5.0,1.2),
TC(0.0,0.0), TC(1.0,2.1), TC(3.0,-0.1),
TC(0.0,0.0), TC(0.0,0.0), TC(2.0,4.1)};
std::cout<<"Aupc ="<<std::endl;
std::cout<<Aupc<<std::endl;
std::complex<double> bupc[] = {TC(6.0,0.5),TC(2.0,1.1),TC(5.0,4.7)};
std::cout<<"Bupc ="<<std::endl;
std::cout<<Bupc<<std::endl;
slip::upper_triangular_solve(Aupc.upper_left(),Aupc.bottom_right(),
Xupc.begin(),Xupc.end(),
Bupc.begin(),Bupc.end(),10E-6);
std::cout<<"Xupc = "<<Xupc<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aupc * Xupc = "<<std::endl;
std::cout<<Bup2c<<std::endl;

Definition at line 5722 of file linear_algebra.hpp.

template<class Matrix , class Vector1 , class Vector2 >
void slip::upper_triangular_solve ( const Matrix &  U,
Vector1 &  X,
const Vector2 &  B,
typename slip::lin_alg_traits< typename Matrix::value_type >::value_type  precision 
)
inline

Solve the linear system U*X=B when U is upper triangular

\[ \left( \begin{array}{cccc} u_{1,1} & u_{1,2}&\cdots&u_{1,n}\\ 0 & u_{2,2} & \ddots&\vdots\\ \vdots&\ddots&\ddots&u_{n-1,n}\\ 0&\cdots&0&u_{n,n}\\ \end{array}\right) \left( \begin{array}{c} x_{1}\\ x_{2}\\ \vdots\\ x_{n}\\ \end{array}\right) = \left( \begin{array}{c} b_{1}\\ b_{2}\\ \vdots\\ b_{n}\\ \end{array}\right) \]

.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/08/25
Since
1.0.0
Version
0.0.1
Parameters
U2D container
X1D container
B1D container
precision
Precondition
U must be upper triangular
U.row() == U.cols()
U.cols() == X.size()
X.size() == B.size()
Remarks
If U is singular an exception will be raised.
Works with real and complex data.
Complexity: n^2 flops
Example:
typedef std::complex<double> TC;
std::complex<double> dup2c[] = {TC(2.0,0.5), TC(1.0,0.3), TC(5.0,1.2),
TC(0.0,0.0), TC(1.0,2.1), TC(3.0,-0.1),
TC(0.0,0.0), TC(0.0,0.0), TC(2.0,4.1)};
std::cout<<"Aupc ="<<std::endl;
std::cout<<Aupc<<std::endl;
std::complex<double> bupc[] = {TC(6.0,0.5),TC(2.0,1.1),TC(5.0,4.7)};
std::cout<<"Bupc ="<<std::endl;
std::cout<<Bupc<<std::endl;
slip::upper_triangular_solve(Aupc,Xupc,Bupc,10E-6);
std::cout<<"Xupc = "<<Xupc<<std::endl;
std::cout<<"Check:"<<std::endl;
std::cout<<"Aupc * Xupc = "<<std::endl;
std::cout<<Bup2c<<std::endl;

Definition at line 5836 of file linear_algebra.hpp.

template<typename SrcIter , typename KernelIter , typename ResIter >
void slip::valid_convolution ( SrcIter  first,
SrcIter  last,
KernelIter  kernel_first,
KernelIter  kernel_last,
std::size_t  ksize_left,
std::size_t  ksize_right,
ResIter  result 
)
inline

Computes the valid convolution of signal by a 1d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/09/12
Since
1.0.0
Version
0.0.1
Parameters
firstA RandomAccessIterator.
lastA RandomAccessIterator.
kernel_firstA RandomAccessIterator.
kernel_lastA RandomAccessIterator.
ksize_leftkernel size left to the "center" of the kernel.
ksize_rightkernel size right to the "center" of the kernel.
resultA RandomAccessIterator.
Precondition
size(result) = size(last - first - ksize_left - ksize_right)
asymetric_kernel1d.png
asymmetric 1d kernel support
Description:
Only non zero-padded points (kernel is fully inside) are computed: if the signal size is N, and the kernel size is K = ksize_left + ksize_right + 1, the size of the result will be N - (ksize_left + ksize_right).
Example:
std::vector<float> v(16);
for(int i = 0; i < 16; ++i)
v[i] = i + 1;
slip::block<float,7> kernel = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
7.0};
std::vector<float> result(10);
slip::valid_convolution(v.begin(),v.end(),
kernel.begin(),kernel.end(),4,2,
result.begin());

Definition at line 134 of file convolution.hpp.

template<typename SrcIter2d , typename KernelIter2d , typename ResIter2d >
void slip::valid_convolution2d ( SrcIter2d  S_up,
SrcIter2d  S_bot,
KernelIter2d  kernel_up,
KernelIter2d  kernel_bot,
std::size_t  ksize_left,
std::size_t  ksize_right,
std::size_t  ksize_up,
std::size_t  ksize_bot,
ResIter2d  R_up,
ResIter2d  R_bot 
)
inline

Computes the valid convolution of 2d signal by a 2d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/21
Since
1.0.0
Version
0.0.1
Parameters
S_upA RandomAccessIterator2d.
S_botA RandomAccessIterator2d.
kernel_upA RandomAccessIterator2d.
kernel_botA RandomAccessIterator2d.
ksize_leftNumber of elements left to the central point of the mask.
ksize_rightNumber of elements right to the central point of the mask.
ksize_upNumber of elements up to the central point of the mask.
ksize_botNumber of elements bottom to the central point of the mask
R_upA RandomAccessIterator2d.
R_botA RandomAccessIterator2d.
Precondition
(R_bot - R_up)[0] == ((S_bot - S_up)[0] - (kernel_bot - kernel_up)[0] + 1)
(R_bot - R_up)[1] == ((S_bot - S_up)[1] - (kernel_bot - kernel_up)[1] + 1)
(kernel_bot - kernel_up)[1] == ksize_left + ksize_right + 1
(kernel_bot - kernel_up)[0] == ksize_top + ksize_up + 1
asymmetric_kernel2d.png
asymmetric 2d kernel support
Description:
Only non zero-padded points (kernel is fully inside) are computed if the signal size is NxP, and the kernel size is KxL = (ksize_left + ksize_right + 1) x (ksize_top + ksize_up + 1), the size of the result will be (N - (ksize_left + ksize_right)) x (P - (ksize_top + ksize_up))
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask2d.begin(),Mask2d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask2d<<std::endl;
slip::Array2d<float> ConvAv(A.rows()-Mask2d.rows()+1,A.cols() - Mask2d.cols()+1);
std::cout<<ConvAv.rows()<<"x"<<ConvAv.cols()<<std::endl;
slip::valid_convolution2d(A.upper_left(),A.bottom_right(),
Mask2d.upper_left(),Mask2d.bottom_right(),
2,1,
0,2,
ConvAv.upper_left(),ConvAv.bottom_right());
std::cout<<"ConvAv = \n"<<ConvAv<<std::endl;

Definition at line 1273 of file convolution.hpp.

template<typename SrcIter3d , typename KernelIter3d , typename ResIter3d >
void slip::valid_convolution3d ( SrcIter3d  S_up,
SrcIter3d  S_bot,
KernelIter3d  kernel_up,
KernelIter3d  kernel_bot,
std::size_t  ksize_front,
std::size_t  ksize_back,
std::size_t  ksize_left,
std::size_t  ksize_right,
std::size_t  ksize_up,
std::size_t  ksize_bot,
ResIter3d  R_up,
ResIter3d  R_bot 
)
inline

Computes the valid convolution of 3d signal by a 3d-kernel.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2009/05/21
Since
1.0.0
Version
0.0.1
Parameters
S_upA RandomAccessIterator3d.
S_botA RandomAccessIterator3d.
ksize_frontNumber of elements front to the central point of the mask.
ksize_backNumber of elements back to the central point of the mask
kernel_upA RandomAccessIterator3d.
kernel_botA RandomAccessIterator3d.
ksize_leftNumber of elements left to the central point of the mask.
ksize_rightNumber of elements right to the central point of the mask.
ksize_upNumber of elements up to the central point of the mask.
ksize_botNumber of elements bottom to the central point of the mask.
R_upA RandomAccessIterator3d.
R_botA RandomAccessIterator3d.
Precondition
(R_bot - R_up)[0] == ((S_bot - S_up)[0] - (kernel_bot - kernel_up)[0] + 1)
(R_bot - R_up)[1] == ((S_bot - S_up)[1] - (kernel_bot - kernel_up)[1] + 1)
(R_bot - R_up)[2] == ((S_bot - S_up)[2] - (kernel_bot - kernel_up)[2] + 1)
(kernel_bot - kernel_up)[0] == ksize_front + ksize_back + 1
(kernel_bot - kernel_up)[1] == ksize_left + ksize_right + 1
(kernel_bot - kernel_up)[2] == ksize_top + ksize_up + 1
Description:
Only non zero-padded points (kernel is fully inside) are computed if the signal size is NxPxQ, and the kernel size is KxLxM = (ksize_front + ksize_back + 1) x (ksize_left + ksize_right + 1) x (ksize_top + ksize_up + 1), the size of the result will be (K - (ksize_front + ksize_back)) x (L - (ksize_left + ksize_right)) x (M - (ksize_top + ksize_up))
Example:
slip::iota(A.begin(),A.end(),1.0);
std::cout<<"A = \n"<<A<<std::endl;
slip::iota(Mask3d.begin(),Mask3d.end(),10.0,1.0);
std::cout<<"Mask = \n"<<Mask3d<<std::endl;
std::cout<<"valid convolution3d "<<std::endl;
slip::Array3d<float> ConvAv3(A3.slices() - Mask3d.slices() + 1,
A3.rows() - Mask3d.rows() + 1,
A3.cols() - Mask3d.cols() + 1);
std::cout<<ConvAv3.slices()<<"x"<<ConvAv3.rows()<<"x"<<ConvAv3.cols()<<std::endl;
slip::valid_convolution3d(A3.front_upper_left(),A3.back_bottom_right(),
Mask3d.front_upper_left(),Mask3d.back_bottom_right(),
1,0,
2,1,
0,2,
ConvAv3.front_upper_left(),ConvAv3.back_bottom_right());
std::cout<<"ConvAv3 = \n"<<ConvAv3<<std::endl;

Definition at line 3434 of file convolution.hpp.

template<typename DataT , typename VarT >
void slip::var_next ( const int  n,
const VarT &  prev_mean,
const VarT &  prev_var,
const DataT &  xnp1,
VarT &  next_mean,
VarT &  next_var 
)

Recursive variance algorithm.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2012/04/24
Since
1.2.0
Version
0.0.1
Parameters
nCurrent element index.
prev_meanPrevious mean value.
xnp1Next value of the serie.
Returns
the next mean value.
Example:
slip::iota(x.begin(),x.end(),1,1);
double mu = static_cast<double>(x[0]);
double var = 0.0;
std::cout<<"mu = "<<mu<<" var = "<<var<<std::endl;
for(int i = 1; i < 8; ++i)
{
slip::var_next(i,mu,var,x[i],mu,var);
std::cout<<"mu = "<<mu<<" var = "<<var<<std::endl;
}
std::cout<<"slip::mean = "<<slip::mean<double>(x.begin(),x.end())<<std::endl;
std::cout<<"slip::variance = "<<slip::variance(x.begin(),x.end(),slip::mean<double>(x.begin(),x.end()))<<std::endl;

Definition at line 4127 of file statistics.hpp.

template<typename T , typename InputIterator >
T slip::variance ( InputIterator  first,
InputIterator  last,
mean 
)
inline

Computes the variance of a range

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2006/07/29
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the container itself.
Returns
The value of the variance of the container.
Note
Calls slip::covariance(first,last,first,mean,mean).
Precondition
[first,last) must be valid.
Example:
slip::iota(M.begin(),M.end(),1,1);
double mean = slip::mean<double>(M.begin(),M.end());
std::cout<<slip::variance(M.begin(),M.end(),mean)<<std::endl;

Definition at line 535 of file statistics.hpp.

template<typename T , typename InputIterator , typename Predicate >
T slip::variance_if ( InputIterator  first,
InputIterator  last,
mean,
Predicate  pred 
)
inline

Computes the variance of a range using a predicate

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
meanThe mean of the range itself using the predicate.
preda predicate function
Returns
The value of the variance of the range using the predicate.
Note
Calls slip::covariance_if(first,last,first,pred, mean,mean).
Precondition
[first,last) must be valid.
Example:
//definition of the predicate less than 10
bool myPredicate (const double& val)
{
return (val<10);
}
//construction of the array
slip::iota(M.begin(),M.end(),1,1);
double mean_if = slip::mean_if<double>(M.begin(),M.end(),myPredicate);
std::cout<<slip::variance_if(M.begin(),M.end(),mean_if,myPredicate)<<std::endl;

Definition at line 2886 of file statistics.hpp.

template<typename T , typename InputIterator , typename MaskIterator >
T slip::variance_mask ( InputIterator  first,
InputIterator  last,
MaskIterator  mask_first,
mean,
typename std::iterator_traits< MaskIterator >::value_type  value = typename std::iterator_traits<MaskIterator>::value_type(1) 
)
inline

Computes the variance of a range over a mask

\[\frac{1}{n}\sum_i (x_i-\overline{x})^2\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2007/05/25
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
mask_firstAn InputIterator on the mask
meanThe mean of the range itself over the mask.
valueMask value.
Returns
The value of the variance of the range over the mask.
Note
Calls slip::covariance_mask(first,last,first,mask_first, mean,mean).
Precondition
[first,last) must be valid.
Range and the Mask must have the same dimensions
Example:
slip::iota(M.begin(),M.end(),1,1);
slip::Array2d<int> ValuedMask(4,5,2);
for(std::size_t i = 0; i < M.dim1(); ++i)
{
ValuedMask[i][0]= 0;
}
for(std::size_t j = 0; j < M.dim2(); ++j)
{
ValuedMask[0][j]=0;
}
double mean_mask2=slip::mean_mask<double>(M.begin(),M.end(),ValuedMask.begin(),2);
std::cout<<slip::variance_mask(M.begin(),M.end(),ValuedMask.begin(),mean_mask2,2)<<std::endl;

Definition at line 1726 of file statistics.hpp.

template<typename RandomAccessIterator1 , typename T , typename RandomAccessIterator2 >
void slip::vector_scalar_multiplies ( RandomAccessIterator1  V_first,
RandomAccessIterator1  V_last,
const T &  scal,
RandomAccessIterator2  result_first 
)
inline

Computes the multiplication of a vector V by a scalar scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
V_firstRandomAccessIterator to the first element of the Vector.
V_lastRandomAccessIterator to one-past-the-end element of the vector.
scalA scalar value.
result_firstRandomAccessIterator to the first element of the result vector.
Precondition
[V_first,V_last) must be valid
[result_first, result_first + (V_last-V_first) must be valid
The result range must be larger than the vector range.
result should be of scal type
Example1:
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
float scal = 3.3;
slip::vector_scalar_multiplies(V1.begin(),V1.end(),scal,Vscal1.begin());
std::cout<<"Vscal1 = "<<std::endl;
std::cout<<Vscal1<<std::endl;
Example2:
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
std::complex<float> scalc(2.2,2.2);
slip::vector_scalar_multiplies(V1.begin(),V1.end(),scalc,Vscalc1.begin());
std::cout<<"Vscalc1 = "<<std::endl;
std::cout<<Vscalc1<<std::endl;

Definition at line 688 of file linear_algebra.hpp.

template<typename Vector1 , typename T , typename Vector2 >
void slip::vector_scalar_multiplies ( const Vector1 &  V,
const T &  scal,
Vector2 &  Result 
)
inline

Computes the multiplication of a vector V by a scalar scal.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/10/28
Since
1.0.0
Version
0.0.1
Parameters
VThe Vector.
scalA scalar value.
ResultThe result of the scalar multplication.
Precondition
V.size() <= Result.size()
result should be of scal type
Example1:
slip::iota(V1.begin(),V1.end(),1.0);
std::cout<<"V = "<<std::endl;
std::cout<<V1<<std::endl;
float scal = 3.3;
std::cout<<"Vscal1 = "<<std::endl;
std::cout<<Vscal1<<std::endl;

Definition at line 733 of file linear_algebra.hpp.

template<class Vector , typename MatrixIterator >
void slip::VectorHouseholder ( Vector &  V,
MatrixIterator  M_up,
MatrixIterator  M_bot 
)
inline

Computes a Householder vector V from a matrix M :

\[ V = M_{.0} - \alpha \times e_0 \]

with $ M_{.0} $ represents the first column of M and

\[ \alpha = - \frac{ M_{00}}{abs( M_{00})} \times \|M_{.0}\| \]

.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Date
2008/07/16
Since
1.0.0
Version
0.0.1
Parameters
Va 1d container for the householder vector
M_up2D iterator on the upper_left element of M container
M_bot2D iterator on the bottom_right element of M container
Precondition
MatrixIterator have to be iterator2d_box type.
NbRows(M) == SizeOf(V)

Definition at line 716 of file linear_algebra_qr.hpp.

template<typename Value_T , typename InputIterator >
Value_T slip::weighted_mean ( InputIterator  first,
InputIterator  last,
InputIterator  w_first,
InputIterator  w_last 
)
inline

Computes the weighted mean value of a range:

\[\frac{\sum_i w_ix_i}{\sum_i w_i}\]

.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Date
2008/04/08
Since
1.0.0
Version
0.0.1
Parameters
firstAn InputIterator.
lastAn InputIterator.
w_firstAn InputIterator to the weight container.
w_lastAn InputIterator to the weight container.
Returns
The weighted mean value of the container.
Precondition
[first,last) must be valid.
The two container must have the same size.
Example:
slip::block<float,3> weight = {1.0,2.0,1.0};
slip::block<float,3> values = {5.0,4.0,12.0};
std::cout<<slip::weighted_mean<float>(values.begin(),value.end(),weight.begin(),weight.end())<<std::endl;

Definition at line 352 of file statistics.hpp.

template<typename InputIterator , typename WriteType >
void slip::write_ascii_1d ( InputIterator  first,
InputIterator  last,
const std::string &  file_path_name 
)
inline

Write a Container1d to an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2008/02/12
Since
1.0.0
Parameters
firstInputIterator to the first element of the range.
lastInputIterator to one past-the-end element of the range.
file_path_nameString of the file path name
Remarks
This file format is compatible with matlab, octave and gnuplot ASCII files
Write is useful to write char or unsigned char value
Example:
float tab[] = {1.0,2.0,3.0,4.0,5.0,6.0};
slip::Array<float> Tab(6,tab);
slip::write_ascii_1d<slip::Array<float>::iterator,float>(Tab.begin(),Tab.end(),"test.dat");

Definition at line 2475 of file io_tools.hpp.

template<typename RandomAccessIterator2d , typename WriteType >
void slip::write_ascii_2d ( RandomAccessIterator2d  upper_left,
RandomAccessIterator2d  bottom_right,
const std::string &  file_path_name 
)
inline

Write a Container2d to an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2007/12/19
Since
1.0.0
Parameters
upper_leftRandomAccessIterator2d.
bottom_rightRandomAccessIterator2d.
file_path_nameString of the file path name.
Remarks
This file format is compatible with matlab, octave and gnuplot ASCII files
Write is useful to write char or unsigned char value
Example:
double d[] = {1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,
15.0,16.0,17.0,18.0};
std::cout<<A<<std::endl;
slip::write_ascii_2d<slip::Array2d<double>::iterator2d,double>(A.upper_left(),A.bottom_right(),"A.dat");
slip::Range<int> r1(0,2,1);
slip::Range<int> r2(1,5,2);
slip::write_ascii_2d<slip::Array2d<double>::iterator2d_range,double>(A.upper_left(r1,r2),A.bottom_right(r1,r2),"Arange.dat");
slip::read_ascii_2d(AAA,"Arange.dat");
std::cout<<"read ascii2d "<<std::endl;
std::cout<<AAA<<std::endl;

Definition at line 408 of file io_tools.hpp.

template<typename Container2d , typename WriteType >
void slip::write_ascii_2d ( const Container2d &  cont,
const std::string &  file_path_name 
)
inline

Write a Container2d to an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2007/12/19
Since
1.0.0
Parameters
cont2d container to write.
file_path_nameString of the file path name.
Remarks
This file format is compatible with matlab, octave and gnuplot ASCII files
Write is useful to write char or unsigned char value
Example:
double d[] = {1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,
15.0,16.0,17.0,18.0};
std::cout<<A<<std::endl;
slip::write_ascii_2d<slip::Array2d<double>::iterator2d,double>(A,"A.dat");

Definition at line 475 of file io_tools.hpp.

template<typename MultiContainer2d >
void slip::write_gnuplot_vect2d ( const MultiContainer2d &  field,
const std::string &  file_path_name,
const int  precision = 6 
)
inline

Write a DenseVector2dField2D to a gnuplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2010/04/27
Since
1.0.0
Parameters
fieldDenseVector2dField2D.
file_path_nameString of the file path name
precisionPrint precision of float values (6 by default). The data format is the following :
x y Vx(x,y) Vy(x,y)
x vary first then y. y is written according to the increase order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:

Definition at line 777 of file io_tools.hpp.

template<typename MultiContainer2d , typename T >
void slip::write_gnuplot_vect2d ( const MultiContainer2d &  field,
const slip::Point2d< T > &  init_point,
const slip::Point2d< T > &  step,
const std::string &  file_path_name,
const int  precision = 6 
)
inline

Write a DenseVector2dField2D to a gnuplot file handle real regular grid 2d.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2010/04/27
Since
1.0.0
Parameters
fieldDenseVector2dField2D.
init_pointPoint2d corresponding to the point having the smallest x and y coordinates.
stepPoint2d corresponding to the steps of the regular grid.
file_path_nameString of the file path name
precisionPrint precision of float values (6 by default). The data format is the following :
x y Vx(x,y) Vy(x,y)
x vary first then y. y is written according to the increase order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::Point2d<double> init_point(1.1,1.1);
slip::Point2d<double> step(0.2,0.1);
slip::write_gnuplot_vect2d(Field,init_point,step,"field.gnu");

Definition at line 844 of file io_tools.hpp.

template<typename InputIterator >
void slip::write_raw ( InputIterator  first,
InputIterator  last,
const std::string &  file_path_name 
)
inline

Write a Container to an raw file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/02/14
Since
1.0.0
Parameters
firstInputIterator.
lastInputIterator.
file_path_nameString of the file path name
Example:
int tabi[] = {1,2,3,4,5,6};
slip::Matrix<int> Mi(2,3,tabi);
std::cout<<Mi<<std::endl;
slip::write_raw(Mi.begin(),Mi.end(),"Mi.raw");
slip::read_raw("Mi.raw",Mi2.begin(),Mi2.end());
std::cout<<Mi2<<std::endl;
slip::read_raw("Mi.raw",AA.begin(),AA.end());
std::cout<<AA<<std::endl;

Definition at line 290 of file io_tools.hpp.

template<typename RandomAccessIterator2d , typename WriteType >
void slip::write_tecplot_2d ( RandomAccessIterator2d  upper_left,
RandomAccessIterator2d  bottom_right,
const std::string &  file_path_name,
const std::string &  title,
const std::string &  zone,
const int  precision = 6 
)
inline

Write a Container2d to an ASCII file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2014/04/10
Since
1.0.0
Parameters
upper_leftRandomAccessIterator2d.
bottom_rightRandomAccessIterator2d.
file_path_nameString of the file path name.
titletecplot title string.
zonetecplot zone string.
precisionPrint precision of float values (6 by default).
Data format:
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= << cols()
x y U(x,y) V(x,y)
Remarks
x = j and y = (dim1 - 1) - i
Write is useful to write char or unsigned char value

Definition at line 702 of file io_tools.hpp.

template<typename MultiContainer2d >
void slip::write_tecplot_vect2d ( const MultiContainer2d &  field,
const std::string &  file_path_name,
const std::string &  title,
const std::string &  zone,
const int  precision = 6 
)
inline

Write a DenseVector2dField2D to a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2009/04/27
Since
1.0.0
Parameters
fieldDenseVector2dField2D.
file_path_nameString of the file path name
titleTitle of the data.
zoneName of the zone.
precisionPrint precision of float values (6 by default). The data format is the following :
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
x vary first then y. y is written according to the increase order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:

Definition at line 914 of file io_tools.hpp.

template<typename MultiContainer2d , typename T >
void slip::write_tecplot_vect2d ( const MultiContainer2d &  field,
const slip::Point2d< T > &  init_point,
const slip::Point2d< T > &  step,
const std::string &  file_path_name,
const std::string &  title,
const std::string &  zone,
const int  precision = 6 
)
inline

Write a DenseVector2dField2D to a tecplot file handle real regular grid 2d.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2009/04/27
Since
1.0.0
Parameters
fieldDenseVector2dField2D.
init_pointPoint2d corresponding to the point having the smallest x and y coordinates.
stepPoint2d corresponding to the steps of the regular grid.
file_path_nameString of the file path name
titleTitle of the data.
zoneName of the zone. The data format is the following :
TITLE= title
VARIABLES= X Y U V
ZONE T= zone, I= rows(), J= cols()
x y U(x,y) V(x,y)
x vary first then y. y is written according to the increase order
Remarks
x = j and y = (dim1 - 1) - i
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::Point2d<double> init_point(0.5,0.5);
slip::Point2d<double> step(0.3,0.1)
slip::DenseVector2dField2d<double> Field(4,5);
slip::write_tecplot_vect2d(Field,init_point,step,"field.gnu");

Definition at line 991 of file io_tools.hpp.

template<typename DenseVector3dField3d >
void slip::write_tecplot_vect3d ( const DenseVector3dField3d &  field,
const std::string &  file_path_name,
const std::string &  title,
const std::string &  zone,
const int  precision = 6 
)
inline

Write a DenseVector3dField3D to a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.3
Date
2010/04/20
Since
1.0.0
Parameters
fieldDenseVector3dField3D.
file_path_nameString of the file path name
title
zone
precisionPrint precision of float values (6 by default). The data format is the following :
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K = slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
Remarks
x = j and y = (rows() - 1) - i and z = (slices() - 1) - k
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::write_tecplot_vect3d(Field,"field.gnu","title","zone");

Definition at line 1685 of file io_tools.hpp.

template<typename DenseVector3dField3d , typename T >
void slip::write_tecplot_vect3d ( const DenseVector3dField3d &  field,
const slip::Point3d< T > &  init_point,
const slip::Point3d< T > &  step,
const std::string &  file_path_name,
const std::string &  title,
const std::string &  zone,
const int  precision = 6 
)
inline

Write a DenseVector3dField3D to a tecplot file handle 3d real regular grid.

Author
Hammoud Mouhamed <hammoud_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2010/04/20
Since
1.0.0
Parameters
fieldDenseVector3dField3D.
init_pointPoint3d corresponding to the point having the smallest x, y and z coordinates.
stepPoint3d corresponding to the steps of the regular grid.
file_path_nameString of the file path name
title
zone
precisionPrint precision of float values (6 by default). The data format is the following :
TITLE= title
VARIABLES= X Y Z U V W
ZONE T= zone, I= rows(), J= cols(), K = slices()
x y z U(x,y,z) V(x,y,z) W(x,y,z)
Remarks
x = j and y = (rows() - 1) - i and z = (slices() - 1) - k
This function is provided in the hope to be usefull but WITHOUT ANY WARRANTY
Example:
slip::Point3d<double> init_point(0.5,0.5,0.5);
slip::Point3d<double> step(0.1,0.2,0.1);
slip::write_tecplot_vect3d(Field,init_point,step"field.gnu","title","zone");

Definition at line 1769 of file io_tools.hpp.

template<typename Container3d >
void slip::write_tecplot_vol ( const Container3d &  container,
const std::string &  file_path_name,
const std::string &  title 
)
inline

Write a Container3D to a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/02/14
Since
1.0.0
Parameters
containerContainer3d.
file_path_nameString of the file path name
titleThe data format is the following : TITLE= title VARIABLES= X Y Z I ZONE T= data, I= rows() J= cols() K= slices() F=POINT x y z I(x,y,z)
Remarks
x = j and y = (dim1 - 1) - i and z = k

Definition at line 3531 of file io_tools.hpp.

template<typename Container3d >
void slip::write_to_images_tecplot ( Container3d &  container,
const std::string &  file_path_name,
const std::string &  title,
const std::size_t  from,
const std::size_t  to 
)

Write slices of a Container3D to a tecplot file.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/02/14
Since
1.0.0
Parameters
containerContainer3d.
file_path_nameString of the file path name
titleTitle of the file.
fromIndex of the first slice.
toIndex of the last slice.
The data format is the following:
TITLE= title
VARIABLES= X Y I
ZONE T= image to I= rows() J= cols() F=POINT
<data of the first slice>
ZONE T= image (to+1) I= rows() J= cols() F=POINT
<data of the second slice>
...
Remarks
x = j and y = (dim1 - 1) - i

Definition at line 3597 of file io_tools.hpp.

Variable Documentation

const std::string slip::BAD_DIMENSION = "Bad dimension parameter."

Definition at line 92 of file error.hpp.

const std::string slip::BAD_PARAMETER = "Bad parameter."

Definition at line 93 of file error.hpp.

const std::string slip::CROSSCORRELATION_BAD_ALGO = "Bad crosscorrelation algorithm selection: standard algorithm by default"

Definition at line 83 of file error.hpp.

const std::string slip::FILE_OPEN_ERROR = "Fail to open file: "

Definition at line 82 of file error.hpp.

const std::string slip::FILE_READ_ERROR = "Unable to read the file "

Definition at line 90 of file error.hpp.

const std::string slip::FILE_WRITE_ERROR = "Unable to write into the file "

Definition at line 91 of file error.hpp.

const std::string slip::GRID_INIT_POINT_ERROR = "The init points of the grid are different"

Definition at line 87 of file error.hpp.

const std::string slip::GRID_STEP_ERROR = "The grid steps of the grid are different"

Definition at line 88 of file error.hpp.

const std::string slip::POSITIVE_DEFINITE_MATRIX_ERROR = "This matrix is not positive definite"

Definition at line 85 of file error.hpp.

const std::string slip::SINGULAR_MATRIX_ERROR = "This matrix is singular"

Definition at line 84 of file error.hpp.