From af3a30483180271cbfd84f2ae43dc7607f17f57b Mon Sep 17 00:00:00 2001
From: Lorenzo Moneta <Lorenzo.Moneta@cern.ch>
Date: Mon, 19 Jun 2006 08:44:08 +0000
Subject: [PATCH] - add 48 bit version of Ranlux (gsl_rng_ranlxd2 and double
 precision version   (gsl_rng_ranlxs2) - adjust indentation for coding
 convention

git-svn-id: http://root.cern.ch/svn/root/trunk@15465 27541ba8-7e3a-0410-8455-c3a389f83636
---
 mathmore/inc/Math/GSLRndmEngines.h  |  22 +-
 mathmore/src/GSLIntegrator.cxx      |  10 +-
 mathmore/src/GSLIntegrator.h        | 546 ++++++++++++++--------------
 mathmore/src/GSLInterpolator.h      | 110 +++---
 mathmore/src/GSLRndmEngines.cxx     |  12 +-
 mathmore/src/GSLRootFinderDeriv.cxx |   4 +-
 mathmore/src/GSLRootHelper.cxx      |  40 +-
 mathmore/test/testRandom.cxx        |   4 +
 8 files changed, 391 insertions(+), 357 deletions(-)

diff --git a/mathmore/inc/Math/GSLRndmEngines.h b/mathmore/inc/Math/GSLRndmEngines.h
index 3133b667945..3659aa79065 100644
--- a/mathmore/inc/Math/GSLRndmEngines.h
+++ b/mathmore/inc/Math/GSLRndmEngines.h
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLRndmEngines.h,v 1.1 2006/05/26 14:26:08 moneta Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLRndmEngines.h,v 1.2 2006/05/30 16:03:46 moneta Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005 
 
  /**********************************************************************
@@ -223,6 +223,26 @@ namespace Math {
     GSLRngRanLux(); 
   };
 
+  /**
+     Second generation of Ranlux generator (with  luxury level of 2)
+
+     @ingroup Random
+   */
+  class GSLRngRanLux2 : public GSLRandomEngine { 
+  public: 
+    GSLRngRanLux2(); 
+  };
+
+  /**
+     48 bits version of Second generation of Ranlux generator (with  luxury level of 2)
+
+     @ingroup Random
+   */
+  class GSLRngRanLux48 : public GSLRandomEngine { 
+  public: 
+    GSLRngRanLux48(); 
+  };
+
 
   /**
      Tausworthe generator by L'Ecuyer
diff --git a/mathmore/src/GSLIntegrator.cxx b/mathmore/src/GSLIntegrator.cxx
index b28663d6559..7f48b00dd6c 100644
--- a/mathmore/src/GSLIntegrator.cxx
+++ b/mathmore/src/GSLIntegrator.cxx
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLIntegrator.cxx,v 1.3 2006/04/20 14:36:48 rdm Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLIntegrator.cxx,v 1.4 2006/06/16 10:34:08 moneta Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005
 
  /**********************************************************************
@@ -227,11 +227,11 @@ double  GSLIntegrator::Integral(double a, double b) {
       fError = 0;
       fStatus = -1;
       throw std::exception(); //"Unknown integration type");
-    }
+   }
    
    return fResult;
    
-  }
+}
 
 
 double  GSLIntegrator::Integral( const std::vector<double> & pts) {
@@ -246,9 +246,9 @@ double  GSLIntegrator::Integral( const std::vector<double> & pts) {
       fError = 0;
       fStatus = -1;
       throw std::exception(); //"Wrong integration type or no singular points defined");
-    }
+   }
    return fResult;
-  }
+}
 
 
 
diff --git a/mathmore/src/GSLIntegrator.h b/mathmore/src/GSLIntegrator.h
index 688102dede9..78275a00601 100644
--- a/mathmore/src/GSLIntegrator.h
+++ b/mathmore/src/GSLIntegrator.h
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLIntegrator.h,v 1.2 2005/09/18 20:41:25 brun Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLIntegrator.h,v 1.3 2006/04/20 14:36:48 rdm Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005
 
  /**********************************************************************
@@ -51,308 +51,308 @@ namespace ROOT {
 namespace Math {
 
 
-
-  class GSLIntegrationWorkspace;
-  class GSLFunctionWrapper;
-
-
- /**
-
-Class for performing numerical integration of a function in one dimension.
-It uses the numerical integration algorithms of GSL, which reimplements the
-algorithms used in the QUADPACK, a numerical integration package written in Fortran.
-
-Various types of adaptive and non-adaptive integration are supported. These include
-integration over infinite and semi-infinite ranges and singular integrals.
-
-The integration type is selected using the Integration::type enumeration
-in the class constructor.
-The default type is adaptive integration with singularity
-(ADAPTIVESINGULAR or QAGS in the QUADPACK convention) applying a Gauss-Kronrod 21-point integration rule.
-In the case of ADAPTIVE type, the integration rule can also be specified via the
-Integration::GKRule. The default rule is 31 points.
-
-In the case of integration over infinite and semi-infinite ranges, the type used is always
-ADAPTIVESINGULAR applying a transformation from the original interval into (0,1).
-
-The ADAPTIVESINGULAR type is the most sophicticated type. When performances are
-important, it is then recommened to use the NONADAPTIVE type in case of smooth functions or
- ADAPTIVE with a lower Gauss-Kronrod rule.
-
-For detailed description on GSL integration algorithms see the
-<A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_16.html#SEC248">GSL Manual</A>.
-
-
-  @ingroup Integration
- */
-
-
-  class GSLIntegrator {
-
-  public:
-
-
-
-    // constructors
-
-
-    /** Default constructor of GSL Integrator for Adaptive Singular integration
-
-       @param absTol desired absolute Error
-       @param relTol desired relative Error
-       @param size maximum number of sub-intervals
-    */
-
-    GSLIntegrator(const IGenFunction &f, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-
-    GSLIntegrator(GSLFuncPointer f, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-
-    /** constructor of GSL Integrator. In the case of Adaptive integration the Gauss-Krond rule of 31 points is used
-
-       @param type type of integration. The possible types are defined in the Integration::Type enumeration
-       @param absTol desired absolute Error
-       @param relTol desired relative Error
-       @param size maximum number of sub-intervals
+   
+   class GSLIntegrationWorkspace;
+   class GSLFunctionWrapper;
+   
+   
+   /**
+      
+    Class for performing numerical integration of a function in one dimension.
+    It uses the numerical integration algorithms of GSL, which reimplements the
+    algorithms used in the QUADPACK, a numerical integration package written in Fortran.
+    
+    Various types of adaptive and non-adaptive integration are supported. These include
+    integration over infinite and semi-infinite ranges and singular integrals.
+    
+    The integration type is selected using the Integration::type enumeration
+    in the class constructor.
+    The default type is adaptive integration with singularity
+    (ADAPTIVESINGULAR or QAGS in the QUADPACK convention) applying a Gauss-Kronrod 21-point integration rule.
+    In the case of ADAPTIVE type, the integration rule can also be specified via the
+    Integration::GKRule. The default rule is 31 points.
+    
+    In the case of integration over infinite and semi-infinite ranges, the type used is always
+    ADAPTIVESINGULAR applying a transformation from the original interval into (0,1).
+    
+    The ADAPTIVESINGULAR type is the most sophicticated type. When performances are
+    important, it is then recommened to use the NONADAPTIVE type in case of smooth functions or
+    ADAPTIVE with a lower Gauss-Kronrod rule.
+    
+    For detailed description on GSL integration algorithms see the
+    <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_16.html#SEC248">GSL Manual</A>.
+    
+    
+    @ingroup Integration
     */
-
-
-    GSLIntegrator(const IGenFunction &f, const Integration::Type type, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-    GSLIntegrator(GSLFuncPointer f, const Integration::Type type, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-    /**
-       generic constructor for GSL Integrator
-
+   
+   
+   class GSLIntegrator {
+      
+    public:
+      
+      
+      
+      // constructors
+      
+      
+      /** Default constructor of GSL Integrator for Adaptive Singular integration
+      
+      @param absTol desired absolute Error
+      @param relTol desired relative Error
+      @param size maximum number of sub-intervals
+      */
+      
+      GSLIntegrator(const IGenFunction &f, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      
+      GSLIntegrator(GSLFuncPointer f, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      
+      /** constructor of GSL Integrator. In the case of Adaptive integration the Gauss-Krond rule of 31 points is used
+         
+         @param type type of integration. The possible types are defined in the Integration::Type enumeration
+         @param absTol desired absolute Error
+         @param relTol desired relative Error
+         @param size maximum number of sub-intervals
+         */
+      
+      
+      GSLIntegrator(const IGenFunction &f, const Integration::Type type, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      GSLIntegrator(GSLFuncPointer f, const Integration::Type type, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      /**
+         generic constructor for GSL Integrator
+       
        @param type type of integration. The possible types are defined in the Integration::Type enumeration
        @param rule Gauss-Kronrod rule. It is used only for ADAPTIVE::Integration types. The possible rules are defined in the Integration::GKRule enumeration
        @param absTol desired absolute Error
        @param relTol desired relative Error
        @param size maximum number of sub-intervals
-
-    */
-
-    GSLIntegrator(const IGenFunction &f, const Integration::Type type, const Integration::GKRule rule, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-    GSLIntegrator(GSLFuncPointer f, const Integration::Type type, const Integration::GKRule rule, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
-
-  virtual ~GSLIntegrator();
-  //~GSLIntegrator();
-
-    // disable copy ctrs
-  private:
-
-    GSLIntegrator(const GSLIntegrator &);
-    GSLIntegrator & operator=(const GSLIntegrator &);
-
-  public:
-
-
-  // template methods for generic functors
-
-  /**
-     method to set the a generic integration function
-
-     @param f integration function. The function type must implement the assigment operator, <em>  double  operator() (  double  x ) </em>
-
-  */
-
-
-  void SetFunction(const IGenFunction &f) {
-    //const void * p = &f;
-    //FillGSLFunction(  &GSLFunctionAdapter<IGenFunction>::F, const_cast<void *>(p) );
-    FillGSLFunction(f);
-  }
-
-     inline void SetFunction( const GSLFuncPointer &f) {
-        FillGSLFunction( f, 0);
-     }
-
-    // methods using IGenFunction
-
-    /**
-       evaluate the Integral of a function f over the defined interval (a,b)
+       
+       */
+      
+      GSLIntegrator(const IGenFunction &f, const Integration::Type type, const Integration::GKRule rule, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      GSLIntegrator(GSLFuncPointer f, const Integration::Type type, const Integration::GKRule rule, double absTol = 1.E-9, double relTol = 1E-6, size_t size = 1000);
+      
+      virtual ~GSLIntegrator();
+      //~GSLIntegrator();
+      
+      // disable copy ctrs
+    private:
+         
+      GSLIntegrator(const GSLIntegrator &);
+      GSLIntegrator & operator=(const GSLIntegrator &);
+      
+    public:
+         
+         
+         // template methods for generic functors
+         
+         /**
+         method to set the a generic integration function
+          
+          @param f integration function. The function type must implement the assigment operator, <em>  double  operator() (  double  x ) </em>
+          
+          */
+         
+         
+         void SetFunction(const IGenFunction &f) {
+            //const void * p = &f;
+            //FillGSLFunction(  &GSLFunctionAdapter<IGenFunction>::F, const_cast<void *>(p) );
+            FillGSLFunction(f);
+         }
+      
+      inline void SetFunction( const GSLFuncPointer &f) {
+         FillGSLFunction( f, 0);
+      }
+      
+      // methods using IGenFunction
+      
+      /**
+         evaluate the Integral of a function f over the defined interval (a,b)
        @param f integration function. The function type must implement the mathlib::IGenFunction interface
        @param a lower value of the integration interval
        @param b upper value of the integration interval
-    */
-
-    double Integral(const IGenFunction & f, double a, double b);
-
-
-    /**
-       evaluate the Integral of a function f over the infinite interval (-inf,+inf)
+       */
+      
+      double Integral(const IGenFunction & f, double a, double b);
+      
+      
+      /**
+         evaluate the Integral of a function f over the infinite interval (-inf,+inf)
        @param f integration function. The function type must implement the mathlib::IGenFunction interface
-    */
-    double Integral(const IGenFunction & f);
-
-    /**
-       evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
+       */
+      double Integral(const IGenFunction & f);
+      
+      /**
+         evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
        @param f integration function. The function type must implement the mathlib::IGenFunction interface
        @param a lower value of the integration interval
-
-    */
-    double IntegralUp(const IGenFunction & f, double a );
-
-    /**
-       evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
+       
+       */
+      double IntegralUp(const IGenFunction & f, double a );
+      
+      /**
+         evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
        @param f integration function. The function type must implement the mathlib::IGenFunction interface
        @param b upper value of the integration interval
-    */
-    double IntegralLow(const IGenFunction & f, double b );
-
-    /**
-       evaluate the Integral of a function f with known singular points over the defined Integral (a,b)
+       */
+      double IntegralLow(const IGenFunction & f, double b );
+      
+      /**
+         evaluate the Integral of a function f with known singular points over the defined Integral (a,b)
        @param f integration function. The function type must implement the mathlib::IGenFunction interface
        @param pts vector containing both the function singular points and the lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upper value.
-
-    */
-    double Integral(const IGenFunction & f, const std::vector<double> & pts );
-
-    // evaluate using cached function
-
-    /**
-       evaluate the Integral over the defined interval (a,b) using the function previously set with GSLIntegrator::SetFunction method
+       
+       */
+      double Integral(const IGenFunction & f, const std::vector<double> & pts );
+      
+      // evaluate using cached function
+      
+      /**
+         evaluate the Integral over the defined interval (a,b) using the function previously set with GSLIntegrator::SetFunction method
        @param a lower value of the integration interval
        @param b upper value of the integration interval
-    */
-
-    double Integral(double a, double b);
-
-    /**
-       evaluate the Integral over the infinite interval (-inf,+inf) using the function previously set with GSLIntegrator::SetFunction method.
-    */
-    double Integral( );
-
-    /**
-       evaluate the Integral of a function f over the semi-infinite interval (a,+inf) using the function previously set with GSLIntegrator::SetFunction method.
+       */
+      
+      double Integral(double a, double b);
+      
+      /**
+         evaluate the Integral over the infinite interval (-inf,+inf) using the function previously set with GSLIntegrator::SetFunction method.
+       */
+      double Integral( );
+      
+      /**
+         evaluate the Integral of a function f over the semi-infinite interval (a,+inf) using the function previously set with GSLIntegrator::SetFunction method.
        @param a lower value of the integration interval
-    */
-    double IntegralUp(double a );
-
-    /**
-       evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) using the function previously set with GSLIntegrator::SetFunction method.
+       */
+      double IntegralUp(double a );
+      
+      /**
+         evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) using the function previously set with GSLIntegrator::SetFunction method.
        @param b upper value of the integration interval
-    */
-    double IntegralLow( double b );
-
-    /**
-       evaluate the Integral over the defined interval (a,b) using the function previously set with GSLIntegrator::SetFunction method. The function has known singular points.
+       */
+      double IntegralLow( double b );
+      
+      /**
+         evaluate the Integral over the defined interval (a,b) using the function previously set with GSLIntegrator::SetFunction method. The function has known singular points.
        @param pts vector containing both the function singular points and the lower/upper edges of the interval. The vector must have as first element the lower edge of the integration Integral ( \a a) and last element the upper value.
-
-    */
-    double Integral( const std::vector<double> & pts);
-
-    // evaluate using free function pointer (same GSL signature)
-
-    /**
-       signature for function pointers used by GSL
-    */
-    //typedef double ( * GSLFuncPointer ) ( double, void * );
-
-    /**
-       evaluate the Integral of  of a function f over the defined interval (a,b) passing a free function pointer
+       
+       */
+      double Integral( const std::vector<double> & pts);
+      
+      // evaluate using free function pointer (same GSL signature)
+      
+      /**
+         signature for function pointers used by GSL
+       */
+      //typedef double ( * GSLFuncPointer ) ( double, void * );
+      
+      /**
+         evaluate the Integral of  of a function f over the defined interval (a,b) passing a free function pointer
        The integration function must be a free function and have a signature consistent with GSL functions:
-
+       
        <em>double my_function ( double x, void * p ) { ...... } </em>
-
+       
        This method is the most efficient since no internal adapter to GSL function is created.
        @param f pointer to the integration function
        @param p pointer to the Parameters of the function
        @param a lower value of the integration interval
        @param b upper value of the integration interval
-
-     */
-    double Integral(GSLFuncPointer f, void * p, double a, double b);
-
-    /**
-       evaluate the Integral  of a function f over the infinite interval (-inf,+inf) passing a free function pointer
-    */
-    double Integral(GSLFuncPointer f, void * p);
-
-    /**
-       evaluate the Integral of a function f over the semi-infinite interval (a,+inf) passing a free function pointer
-    */
-    double IntegralUp(GSLFuncPointer f, void * p, double a);
-
-    /**
-       evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) passing a free function pointer
-     */
-    double IntegralLow(GSLFuncPointer f, void * p, double b);
-
-    /**
-       evaluate the Integral of a function f with knows singular points over the over a defined interval passing a free function pointer
-     */
-    double Integral(GSLFuncPointer f, void * p, const std::vector<double> & pts);
-
-    /**
-       return  the Result of the last Integral calculation
-    */
-    double Result() const;
-
-    /**
-       return the estimate of the absolute Error of the last Integral calculation
-    */
-    double Error() const;
-
-    /**
-       return the Error Status of the last Integral calculation
-    */
-    int Status() const;
-
-
-    // setter for control Parameters  (getters are not needed so far )
-
-    /**
-       set the desired relative Error
-    */
-    void SetRelTolerance(double relTolerance);
-
-
-    /**
-       set the desired absolute Error
-    */
-    void SetAbsTolerance(double absTolerance);
-
-    /**
-       set the integration rule (Gauss-Kronrod rule).
+       
+       */
+      double Integral(GSLFuncPointer f, void * p, double a, double b);
+      
+      /**
+         evaluate the Integral  of a function f over the infinite interval (-inf,+inf) passing a free function pointer
+       */
+      double Integral(GSLFuncPointer f, void * p);
+      
+      /**
+         evaluate the Integral of a function f over the semi-infinite interval (a,+inf) passing a free function pointer
+       */
+      double IntegralUp(GSLFuncPointer f, void * p, double a);
+      
+      /**
+         evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) passing a free function pointer
+       */
+      double IntegralLow(GSLFuncPointer f, void * p, double b);
+      
+      /**
+         evaluate the Integral of a function f with knows singular points over the over a defined interval passing a free function pointer
+       */
+      double Integral(GSLFuncPointer f, void * p, const std::vector<double> & pts);
+      
+      /**
+         return  the Result of the last Integral calculation
+       */
+      double Result() const;
+      
+      /**
+         return the estimate of the absolute Error of the last Integral calculation
+       */
+      double Error() const;
+      
+      /**
+         return the Error Status of the last Integral calculation
+       */
+      int Status() const;
+      
+      
+      // setter for control Parameters  (getters are not needed so far )
+      
+      /**
+         set the desired relative Error
+       */
+      void SetRelTolerance(double relTolerance);
+      
+      
+      /**
+         set the desired absolute Error
+       */
+      void SetAbsTolerance(double absTolerance);
+      
+      /**
+         set the integration rule (Gauss-Kronrod rule).
        The possible rules are defined in the Integration::GKRule enumeration.
        The integration rule can be modified only for ADAPTIVE type integrations
-    */
-    void SetIntegrationRule(Integration::GKRule );
-
-
-
-protected:
-
-    // internal method to create GSL function adapter
-    void FillGSLFunction( GSLFuncPointer fp, void *);
-    void FillGSLFunction(const IGenFunction & f);
-
-private:
-
-    Integration::Type fType;
-    Integration::GKRule fRule;
-    double fAbsTol;
-    double fRelTol;
-    size_t fSize;
-    size_t fMaxIntervals;
-
-    // cache Error, Result and Status of integration
-
-    double fResult;
-    double fError;
-    int fStatus;
-
-    // GSLIntegrationAlgorithm * fAlgorithm;
-
-    GSLIntegrationWorkspace * fWorkspace;
-    GSLFunctionWrapper * fFunction;
-
-  };
-
-
+       */
+      void SetIntegrationRule(Integration::GKRule );
+      
+      
+      
+    protected:
+         
+      // internal method to create GSL function adapter
+      void FillGSLFunction( GSLFuncPointer fp, void *);
+      void FillGSLFunction(const IGenFunction & f);
+      
+    private:
+         
+      Integration::Type fType;
+      Integration::GKRule fRule;
+      double fAbsTol;
+      double fRelTol;
+      size_t fSize;
+      size_t fMaxIntervals;
+      
+      // cache Error, Result and Status of integration
+      
+      double fResult;
+      double fError;
+      int fStatus;
+      
+      // GSLIntegrationAlgorithm * fAlgorithm;
+      
+      GSLIntegrationWorkspace * fWorkspace;
+      GSLFunctionWrapper * fFunction;
+     
+   };
+   
+   
 
 
 
diff --git a/mathmore/src/GSLInterpolator.h b/mathmore/src/GSLInterpolator.h
index 00bead87676..184af13e180 100644
--- a/mathmore/src/GSLInterpolator.h
+++ b/mathmore/src/GSLInterpolator.h
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLInterpolator.h,v 1.2 2005/09/18 20:41:25 brun Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLInterpolator.h,v 1.3 2006/06/08 16:36:17 moneta Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005 
 
  /**********************************************************************
@@ -44,60 +44,60 @@ namespace ROOT {
 namespace Math {
 
 
-  /**
-     Interpolation class based on GSL interpolation functions
-     @ingroup Interpolation
-   */
-
-  class GSLInterpolator {
-
-  public: 
-    GSLInterpolator(const Interpolation::Type type, const std::vector<double> & x, const std::vector<double> & y ); 
-    virtual ~GSLInterpolator(); 
-
-  private:
-    // usually copying is non trivial, so we make this unaccessible
-    GSLInterpolator(const GSLInterpolator &); 
-    GSLInterpolator & operator = (const GSLInterpolator &); 
-    
-  public: 
-
-    double Eval( double x ) const
-    {
-      return gsl_spline_eval(fSpline, x, fAccel ); 
-    }
-
-    double Deriv( double x ) const 
-    {
-      return gsl_spline_eval_deriv(fSpline, x, fAccel );  
-    }
-    
-    double Deriv2( double x ) const {  
-      return gsl_spline_eval_deriv2(fSpline, x, fAccel );  
-    }
-    
-    double Integ( double a, double b) const { 
-      return gsl_spline_eval_integ(fSpline, a, b, fAccel );  
-    }
-
-    std::string Name() { 
-      //return gsl_interp_name(fInterp); 
-      // Name not impl for gsl_spline objects
-      return fName;
-    }
-
-
-  protected: 
-
-
-  private: 
-
-    std::string  fName;
-    gsl_interp_accel * fAccel; 
-    gsl_spline * fSpline; 
-
-}; 
-
+   /**
+   Interpolation class based on GSL interpolation functions
+    @ingroup Interpolation
+    */
+   
+   class GSLInterpolator {
+      
+   public: 
+      GSLInterpolator(const Interpolation::Type type, const std::vector<double> & x, const std::vector<double> & y ); 
+      virtual ~GSLInterpolator(); 
+      
+   private:
+         // usually copying is non trivial, so we make this unaccessible
+         GSLInterpolator(const GSLInterpolator &); 
+      GSLInterpolator & operator = (const GSLInterpolator &); 
+      
+   public: 
+         
+         double Eval( double x ) const
+      {
+         return gsl_spline_eval(fSpline, x, fAccel ); 
+      }
+      
+      double Deriv( double x ) const 
+      {
+         return gsl_spline_eval_deriv(fSpline, x, fAccel );  
+      }
+      
+      double Deriv2( double x ) const {  
+         return gsl_spline_eval_deriv2(fSpline, x, fAccel );  
+      }
+      
+      double Integ( double a, double b) const { 
+         return gsl_spline_eval_integ(fSpline, a, b, fAccel );  
+      }
+      
+      std::string Name() { 
+         //return gsl_interp_name(fInterp); 
+         // Name not impl for gsl_spline objects
+         return fName;
+      }
+      
+      
+   protected: 
+         
+         
+   private: 
+         
+      std::string  fName;
+      gsl_interp_accel * fAccel; 
+      gsl_spline * fSpline; 
+      
+   }; 
+   
 } // namespace Math
 } // namespace ROOT
 
diff --git a/mathmore/src/GSLRndmEngines.cxx b/mathmore/src/GSLRndmEngines.cxx
index eb7358614cf..48c22c8998e 100644
--- a/mathmore/src/GSLRndmEngines.cxx
+++ b/mathmore/src/GSLRndmEngines.cxx
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLRndmEngines.cxx,v 1.1 2006/05/26 14:26:08 moneta Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLRndmEngines.cxx,v 1.2 2006/05/26 14:30:17 moneta Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005 
 
  /**********************************************************************
@@ -308,6 +308,16 @@ namespace Math {
     GSLRandomEngine(new GSLRng(gsl_rng_ranlux) )
   {}
 
+  // second generation of Ranlux (double precision version)
+  GSLRngRanLux2::GSLRngRanLux2() : 
+    GSLRandomEngine(new GSLRng(gsl_rng_ranlxs2) )
+  {}
+
+  // 48 bits version
+  GSLRngRanLux48::GSLRngRanLux48() : 
+    GSLRandomEngine(new GSLRng(gsl_rng_ranlxd2) )
+  {}
+
   //----------------------------------------------------
   GSLRngTaus::GSLRngTaus() : 
     GSLRandomEngine(new GSLRng(gsl_rng_taus2) )
diff --git a/mathmore/src/GSLRootFinderDeriv.cxx b/mathmore/src/GSLRootFinderDeriv.cxx
index e74492927e9..9cb2f23fc5f 100644
--- a/mathmore/src/GSLRootFinderDeriv.cxx
+++ b/mathmore/src/GSLRootFinderDeriv.cxx
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLRootFinderDeriv.cxx,v 1.2 2005/09/18 20:41:25 brun Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLRootFinderDeriv.cxx,v 1.3 2006/06/16 10:34:08 moneta Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005 
 
  /**********************************************************************
@@ -86,7 +86,7 @@ void GSLRootFinderDeriv::SetSolver(GSLRootFdFSolver * s ) {
 }
 
 void GSLRootFinderDeriv::FreeSolver( ) { 
-   // free.....
+   // free the gsl solver
    if (fS) delete fS; 
 }
 
diff --git a/mathmore/src/GSLRootHelper.cxx b/mathmore/src/GSLRootHelper.cxx
index 46bc025fac0..c93d8b4b468 100644
--- a/mathmore/src/GSLRootHelper.cxx
+++ b/mathmore/src/GSLRootHelper.cxx
@@ -1,4 +1,4 @@
-// @(#)root/mathmore:$Name:  $:$Id: GSLRootHelper.cxx,v 1.1 2005/09/08 07:14:56 brun Exp $
+// @(#)root/mathmore:$Name:  $:$Id: GSLRootHelper.cxx,v 1.2 2005/09/18 20:41:25 brun Exp $
 // Authors: L. Moneta, A. Zsenei   08/2005 
 
  /**********************************************************************
@@ -35,26 +35,26 @@
 
 namespace ROOT {
 namespace Math {
-
-  namespace GSLRootHelper { 
-
-
-    int TestInterval(double xlow, double xup, double epsAbs, double epsRel) { 
+   
+   namespace GSLRootHelper { 
       
-      return gsl_root_test_interval( xlow, xup, epsAbs, epsRel); 
-    } 
-
-    int TestDelta(double x1, double x0, double epsAbs, double epsRel) { 
-      // be careful is inverted with respect to GSL (don't know why ) 
-      return gsl_root_test_delta( x1, x0, epsRel, epsAbs); 
-    } 
-
-    int TestResidual(double f, double epsAbs) { 
       
-      return gsl_root_test_residual( f, epsAbs); 
-    } 
-
-  }
-
+      int TestInterval(double xlow, double xup, double epsAbs, double epsRel) { 
+         
+         return gsl_root_test_interval( xlow, xup, epsAbs, epsRel); 
+      } 
+      
+      int TestDelta(double x1, double x0, double epsAbs, double epsRel) { 
+         // be careful is inverted with respect to GSL (don't know why ) 
+         return gsl_root_test_delta( x1, x0, epsRel, epsAbs); 
+      } 
+      
+      int TestResidual(double f, double epsAbs) { 
+         
+         return gsl_root_test_residual( f, epsAbs); 
+      } 
+      
+   }
+   
 } // namespace Math
 } // namespace ROOT
diff --git a/mathmore/test/testRandom.cxx b/mathmore/test/testRandom.cxx
index f72bc043e2f..d22a3d15a86 100644
--- a/mathmore/test/testRandom.cxx
+++ b/mathmore/test/testRandom.cxx
@@ -119,6 +119,8 @@ int main() {
   Random<GSLRngMT>         r1;
   Random<GSLRngTaus>       r2;
   Random<GSLRngRanLux>     r3;
+  Random<GSLRngRanLux2>    r31;
+  Random<GSLRngRanLux48>   r32;
   Random<GSLRngGFSR4>      r4;
   Random<GSLRngCMRG>       r5;
   Random<GSLRngMRG>        r6;
@@ -143,6 +145,8 @@ int main() {
   generate(r1);
   generate(r2);
   generate(r3);
+  generate(r31);
+  generate(r32);
   generate(r4);
   generate(r5);
   generate(r6);
-- 
GitLab