| CollectionProxy.h | | CollectionProxy.h | |
|
| // @(#)root/reflex:$Id: CollectionProxy.h 48993 2013-03-28 16:48:14Z pcanal
$ | | // @(#)root/reflex:$Id: CollectionProxy.h 49281 2013-04-21 02:30:39Z pcanal
$ | |
| // Author: Markus Frank 2004 | | // Author: Markus Frank 2004 | |
| | | | |
| // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. | | // Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. | |
| // | | // | |
| // Permission to use, copy, modify, and distribute this software for any | | // Permission to use, copy, modify, and distribute this software for any | |
| // purpose is hereby granted without fee, provided that this copyright and | | // purpose is hereby granted without fee, provided that this copyright and | |
| // permissions notice appear in all copies and derivatives. | | // permissions notice appear in all copies and derivatives. | |
| // | | // | |
| // This software is provided "as is" without express or implied warranty. | | // This software is provided "as is" without express or implied warranty. | |
| | | | |
| | | | |
| skipping to change at line 863 | | skipping to change at line 863 | |
| *m = c->test(i); | | *m = c->test(i); | |
| } | | } | |
| return 0; | | return 0; | |
| } | | } | |
| | | | |
| static void | | static void | |
| destruct(void*,size_t) { | | destruct(void*,size_t) { | |
| // Nothing to destruct. | | // Nothing to destruct. | |
| } | | } | |
| | | | |
|
| | | struct Iterators { | |
| | | typedef Cont_t *PCont_t; | |
| | | union PtrSize_t { size_t fIndex; void *fAddress; }; | |
| | | typedef std::pair<PtrSize_t,bool> iterator; | |
| | | // In the end iterator we store the bitset pointer | |
| | | // and do not use the 'second' part of the pair. | |
| | | // In the other iterator we store the index | |
| | | // and the value. | |
| | | | |
| | | static void create(void *coll, void **begin_arena, void **end_aren | |
| | | a) { | |
| | | iterator *begin = new (*begin_arena) iterator; | |
| | | begin->first.fIndex = 0; | |
| | | begin->second = false; | |
| | | iterator *end = new (*end_arena) iterator; | |
| | | end->first.fAddress = coll; | |
| | | end->second = false; | |
| | | } | |
| | | static void* copy(void *dest_arena, const void *source_ptr) { | |
| | | const iterator *source = (const iterator *)(source_ptr); | |
| | | new (dest_arena) iterator(*source); | |
| | | return dest_arena; | |
| | | } | |
| | | static void* next(void *iter_loc, const void *end_loc) { | |
| | | const iterator *end = (const iterator *)(end_loc); | |
| | | PCont_t c = (PCont_t)end->first.fAddress; | |
| | | iterator *iter = (iterator *)(iter_loc); | |
| | | if (iter->first.fIndex != c->size()) { | |
| | | iter->second = c->test(iter->first.fIndex); | |
| | | ++(iter->first.fIndex); | |
| | | } | |
| | | return &(iter->second); | |
| | | } | |
| | | static void destruct1(void *iter_ptr) { | |
| | | iterator *start = (iterator *)(iter_ptr); | |
| | | start->~iterator(); | |
| | | } | |
| | | static void destruct2(void *begin_ptr, void *end_ptr) { | |
| | | iterator *start = (iterator *)(begin_ptr); | |
| | | iterator *end = (iterator *)(end_ptr); | |
| | | start->~iterator(); | |
| | | end->~iterator(); | |
| | | } | |
| | | }; | |
| | | typedef Iterators Iterators_t; | |
| | | | |
| }; | | }; | |
| | | | |
| template <typename Bitset_t> | | template <typename Bitset_t> | |
| struct Pushback<StdBitSetHelper<Bitset_t> > : public CollType<StdBitS
etHelper<Bitset_t> > { | | struct Pushback<StdBitSetHelper<Bitset_t> > : public CollType<StdBitS
etHelper<Bitset_t> > { | |
| typedef Bitset_t Cont_t; | | typedef Bitset_t Cont_t; | |
| typedef bool Iter_t; | | typedef bool Iter_t; | |
| typedef bool Value_t; | | typedef bool Value_t; | |
| typedef Environ<Iter_t> Env_t; | | typedef Environ<Iter_t> Env_t; | |
| typedef Env_t* PEnv_t; | | typedef Env_t* PEnv_t; | |
| typedef Cont_t* PCont_t; | | typedef Cont_t* PCont_t; | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 47 lines changed or added | |
|
| MatrixInversion.icc | | MatrixInversion.icc | |
|
| // @(#)root/smatrix:$Id: MatrixInversion.icc 28287 2009-04-20 14:46:21Z mon
eta $ | | // @(#)root/smatrix:$Id: MatrixInversion.icc 49338 2013-04-25 09:54:15Z mon
eta $ | |
| // Authors: CLHEP authors, L. Moneta 2006 | | // Authors: CLHEP authors, L. Moneta 2006 | |
| | | | |
| #ifndef ROOT_Math_MatrixInversion_icc | | #ifndef ROOT_Math_MatrixInversion_icc | |
| #define ROOT_Math_MatrixInversion_icc | | #define ROOT_Math_MatrixInversion_icc | |
| | | | |
| #include "Math/SVector.h" | | #include "Math/SVector.h" | |
| #include <limits> | | #include <limits> | |
| | | | |
| // inversion algorithms for matrices | | // inversion algorithms for matrices | |
| // taken from CLHEP (L. Moneta May 2006) | | // taken from CLHEP (L. Moneta May 2006) | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| int pivrow; | | int pivrow; | |
| | | | |
| const int nrow = MatRepSym<T,idim>::kRows; | | const int nrow = MatRepSym<T,idim>::kRows; | |
| | | | |
| // Establish the two working-space arrays needed: x and piv are | | // Establish the two working-space arrays needed: x and piv are | |
| // used as pointers to arrays of doubles and ints respectively, each | | // used as pointers to arrays of doubles and ints respectively, each | |
| // of length nrow. We do not want to reallocate each time through | | // of length nrow. We do not want to reallocate each time through | |
| // unless the size needs to grow. We do not want to leak memory, even | | // unless the size needs to grow. We do not want to leak memory, even | |
| // by having a new without a delete that is only done once. | | // by having a new without a delete that is only done once. | |
| | | | |
|
| static SVector<T, MatRepSym<T,idim>::kRows> xvec; | | SVector<T, MatRepSym<T,idim>::kRows> xvec; | |
| static SVector<int, MatRepSym<T,idim>::kRows> pivv; | | SVector<int, MatRepSym<T,idim>::kRows> pivv; | |
| | | | |
| typedef int* pivIter; | | typedef int* pivIter; | |
| typedef T* mIter; | | typedef T* mIter; | |
| | | | |
| // Note - resize shuld do nothing if the size is already larger than nr
ow, | | // Note - resize shuld do nothing if the size is already larger than nr
ow, | |
| // but on VC++ there are indications that it does so we check. | | // but on VC++ there are indications that it does so we check. | |
| // Note - the data elements in a vector are guaranteed to be contiguous, | | // Note - the data elements in a vector are guaranteed to be contiguous, | |
| // so x[i] and piv[i] are optimally fast. | | // so x[i] and piv[i] are optimally fast. | |
| mIter x = xvec.begin(); | | mIter x = xvec.begin(); | |
| // x[i] is used as helper storage, needs to have at least size nrow. | | // x[i] is used as helper storage, needs to have at least size nrow. | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RootFinder.h | | RootFinder.h | |
|
| // @(#)root/mathmore:$Id: RootFinder.h 48991 2013-03-28 15:25:11Z rdm $ | | // @(#)root/tmva $Id: RootFinder.h 40005 2011-06-27 15:29:10Z stelzer $ | |
| // Authors: L. Moneta, A. Zsenei 08/2005 | | // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss | |
| | | | |
|
| /********************************************************************** | | /************************************************************************** | |
| * * | | ******** | |
| * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * | | * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | |
| * * | | * | |
| * This library is free software; you can redistribute it and/or * | | * Package: TMVA | |
| * modify it under the terms of the GNU General Public License * | | * | |
| * as published by the Free Software Foundation; either version 2 * | | * Class : RootFinder | |
| * of the License, or (at your option) any later version. * | | * | |
| * * | | * Web : http://tmva.sourceforge.net | |
| * This library is distributed in the hope that it will be useful, * | | * | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of * | | * | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | | * | |
| * General Public License for more details. * | | * Description: | |
| * * | | * | |
| * You should have received a copy of the GNU General Public License * | | * Root finding using Brents algorithm | |
| * along with this library (see file COPYING); if not, write * | | * | |
| * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | | * (translated from CERNLIB function RZERO) | |
| * 330, Boston, MA 02111-1307 USA, or contact the author. * | | * | |
| * * | | * | |
| **********************************************************************/ | | * | |
| | | * Authors (alphabetical): | |
| // Header file for class RootFinder | | * | |
| // | | * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland | |
| // Created by: moneta at Sun Nov 14 16:59:55 2004 | | * | |
| // | | * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German | |
| // Last update: Sun Nov 14 16:59:55 2004 | | y * | |
| // | | * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada | |
| #ifndef ROOT_Math_RootFinder | | * | |
| #define ROOT_Math_RootFinder | | * | |
| | | * | |
| | | * Copyright (c) 2005: | |
| | | * | |
| | | * CERN, Switzerland | |
| | | * | |
| | | * U. of Victoria, Canada | |
| | | * | |
| | | * MPI-K Heidelberg, Germany | |
| | | * | |
| | | * | |
| | | * | |
| | | * Redistribution and use in source and binary forms, with or without | |
| | | * | |
| | | * modification, are permitted according to the terms listed in LICENSE | |
| | | * | |
| | | * (http://tmva.sourceforge.net/LICENSE) | |
| | | * | |
| | | ************************************************************************** | |
| | | ********/ | |
| | | | |
| | | #ifndef ROOT_TMVA_RootFinder | |
| | | #define ROOT_TMVA_RootFinder | |
| | | | |
| | | ////////////////////////////////////////////////////////////////////////// | |
| | | // // | |
| | | // RootFinder // | |
| | | // // | |
| | | // Root finding using Brents algorithm // | |
| | | // (translated from CERNLIB function RZERO) // | |
| | | // // | |
| | | ////////////////////////////////////////////////////////////////////////// | |
| | | | |
|
| #ifndef ROOT_Math_IFunctionfwd | | #ifndef ROOT_TObject | |
| #include "Math/IFunctionfwd.h" | | #include "TObject.h" | |
| #endif | | #endif | |
| | | | |
|
| #ifndef ROOT_Math_IRootFinderMethod | | namespace TMVA { | |
| #include "Math/IRootFinderMethod.h" | | | |
| #endif | | | |
| | | | |
|
| /** | | class MsgLogger; | |
| @defgroup RootFinders One-dimensional Root-Finding algorithms | | | |
| Various implementation esists in MathCore and MathMore | | | |
| The user interacts with a proxy class ROOT::Math::RootFinder which creat | | | |
| es behing | | | |
| the chosen algorithms which are implemented using the ROOT::Math::IRootF | | | |
| inderMethod interface | | | |
| | | | |
| @ingroup NumAlgo | | | |
| */ | | | |
| | | | |
| namespace ROOT { | | | |
| namespace Math { | | | |
| | | | |
| //_________________________________________________________________________ | | | |
| ____________ | | | |
| /** | | | |
| User Class to find the Root of one dimensional functions. | | | |
| The GSL Methods are implemented in MathMore and they are loaded au | | | |
| tomatically | | | |
| via the plug-in manager | | | |
| | | | |
| The possible types of Root-finding algorithms are: | | | |
| <ul> | | | |
| <li>Root Bracketing Algorithms which do not require function deriv | | | |
| atives | | | |
| <ol> | | | |
| <li>RootFinder::kBRENT (default method implemented in MathCore) | | | |
| <li>RootFinder::kGSL_BISECTION | | | |
| <li>RootFinder::kGSL_FALSE_POS | | | |
| <li>RootFinder::kGSL_BRENT | | | |
| </ol> | | | |
| <li>Root Finding Algorithms using Derivatives | | | |
| <ol> | | | |
| <li>RootFinder::kGSL_NEWTON | | | |
| <li>RootFinder::kGSL_SECANT | | | |
| <li>RootFinder::kGSL_STEFFENSON | | | |
| </ol> | | | |
| </ul> | | | |
| | | | |
| This class does not cupport copying | | | |
| | | | |
| @ingroup RootFinders | | | |
| | | | |
| */ | | | |
| | | | |
| class RootFinder { | | | |
| | | | |
| public: | | | |
| | | | |
| enum EType { kBRENT, // Methods | | | |
| from MathCore | | | |
| kGSL_BISECTION, kGSL_FALSE_POS, kGSL_BRENT, // GSL Nor | | | |
| mal | | | |
| kGSL_NEWTON, kGSL_SECANT, kGSL_STEFFENSON // GSL Der | | | |
| ivatives | | | |
| }; | | | |
| | | | |
| /** | | | |
| Construct a Root-Finder algorithm | | | |
| */ | | | |
| RootFinder(RootFinder::EType type = RootFinder::kBRENT); | | | |
| virtual ~RootFinder(); | | | |
| | | | |
| private: | | | |
| // usually copying is non trivial, so we make this unaccessible | | | |
| RootFinder(const RootFinder & ) {} | | | |
| RootFinder & operator = (const RootFinder & rhs) | | | |
| { | | | |
| if (this == &rhs) return *this; // time saving self-test | | | |
| return *this; | | | |
| } | | | |
| | | | |
| public: | | | |
| | | | |
| bool SetMethod(RootFinder::EType type = RootFinder::kBRENT); | | | |
| | | | |
| /** | | | |
| Provide to the solver the function and the initial search inter | | | |
| val [xlow, xup] | | | |
| for algorithms not using derivatives (bracketing algorithms) | | | |
| The templated function f must be of a type implementing the \a | | | |
| operator() method, | | | |
| <em> double operator() ( double x ) </em> | | | |
| Returns non zero if interval is not valid (i.e. does not contai | | | |
| ns a root) | | | |
| */ | | | |
| | | | |
| bool SetFunction( const IGenFunction & f, double xlow, double xup) | | | |
| { | | | |
| return fSolver->SetFunction( f, xlow, xup); | | | |
| } | | | |
| | | | |
| /** | | | |
| Provide to the solver the function and an initial estimate of t | | | |
| he root, | | | |
| for algorithms using derivatives. | | | |
| The templated function f must be of a type implementing the \a | | | |
| operator() | | | |
| and the \a Gradient() methods. | | | |
| <em> double operator() ( double x ) </em> | | | |
| Returns non zero if starting point is not valid | | | |
| */ | | | |
| | | | |
| bool SetFunction( const IGradFunction & f, double xstart) { | | | |
| return fSolver->SetFunction( f, xstart); | | | |
| } | | | |
| | | | |
| template<class Function, class Derivative> | | | |
| bool Solve(Function &f, Derivative &d, double start, | | | |
| int maxIter = 100, double absTol = 1E-8, double relTol = | | | |
| 1E-10); | | | |
| | | | |
| template<class Function> | | | |
| bool Solve(Function &f, double min, double max, | | | |
| int maxIter = 100, double absTol = 1E-8, double relTol = | | | |
| 1E-10); | | | |
| | | | |
| /** | | | |
| Compute the roots iterating until the estimate of the Root is | | | |
| within the required tolerance returning | | | |
| the iteration Status | | | |
| */ | | | |
| bool Solve( int maxIter = 100, double absTol = 1E-8, double relTol | | | |
| = 1E-10) { | | | |
| return fSolver->Solve( maxIter, absTol, relTol ); | | | |
| } | | | |
| | | | |
| /** | | | |
| Return the number of iteration performed to find the Root. | | | |
| */ | | | |
| int Iterations() const { | | | |
| return fSolver->Iterations(); | | | |
| } | | | |
| | | | |
| /** | | | |
| Perform a single iteration and return the Status | | | |
| */ | | | |
| int Iterate() { | | | |
| return fSolver->Iterate(); | | | |
| } | | | |
| | | | |
| /** | | | |
| Return the current and latest estimate of the Root | | | |
| */ | | | |
| double Root() const { | | | |
| return fSolver->Root(); | | | |
| } | | | |
| | | | |
| /** | | | |
| Return the status of the last estimate of the Root | | | |
| = 0 OK, not zero failure | | | |
| */ | | | |
| int Status() const { | | | |
| return fSolver->Status(); | | | |
| } | | | |
| | | | |
| /** | | | |
| Return the current and latest estimate of the lower value of th | | | |
| e Root-finding interval (for bracketing algorithms) | | | |
| */ | | | |
| /* double XLower() const { */ | | | |
| /* return fSolver->XLower(); */ | | | |
| /* } */ | | | |
| | | | |
| /** | | | |
| Return the current and latest estimate of the upper value of th | | | |
| e Root-finding interval (for bracketing algorithms) | | | |
| */ | | | |
| /* double XUpper() const { */ | | | |
| /* return fSolver->XUpper(); */ | | | |
| /* } */ | | | |
| | | | |
| /** | | | |
| Get Name of the Root-finding solver algorithm | | | |
| */ | | | |
| const char * Name() const { | | | |
| return fSolver->Name(); | | | |
| } | | | |
| | | | |
| protected: | | | |
| | | | |
| private: | | | |
| | | | |
| IRootFinderMethod* fSolver; // type of algorithm to be used | | | |
| | | | |
|
| }; | | class RootFinder : public TObject { | |
| | | | |
|
| } // namespace Math | | public: | |
| } // namespace ROOT | | | |
| | | | |
|
| #ifndef ROOT_Math_WrappedFunction | | RootFinder( Double_t (*rootVal)( Double_t ), | |
| #include "Math/WrappedFunction.h" | | Double_t rootMin, Double_t rootMax, | |
| #endif | | Int_t maxIterations = 100, | |
| | | Double_t absTolerance = 0.0 ); | |
| | | virtual ~RootFinder( void ); | |
| | | | |
|
| #ifndef ROOT_Math_Functor | | // returns the root of the function | |
| #include "Math/Functor.h" | | Double_t Root( Double_t refValue ); | |
| #endif | | | |
| | | private: | |
| | | | |
| | | Double_t fRootMin; // minimum root value | |
| | | Double_t fRootMax; // maximum root value | |
| | | Int_t fMaxIter; // maximum number of iterations | |
| | | Double_t fAbsTol; // absolute tolerance deviation | |
| | | | |
|
| template<class Function, class Derivative> | | // function pointer | |
| bool ROOT::Math::RootFinder::Solve(Function &f, Derivative &d, double start | | Double_t (*fGetRootVal)( Double_t ); | |
| , | | | |
| int maxIter, double absTol, double relTol | | | |
| ) | | | |
| { | | | |
| if (!fSolver) return false; | | | |
| ROOT::Math::GradFunctor1D wf(f, d); | | | |
| bool ret = fSolver->SetFunction(wf, start); | | | |
| if (!ret) return false; | | | |
| return Solve(maxIter, absTol, relTol); | | | |
| } | | | |
| | | | |
| template<class Function> | | | |
| bool ROOT::Math::RootFinder::Solve(Function &f, double min, double max, | | | |
| int maxIter, double absTol, double relTol | | | |
| ) | | | |
| { | | | |
| if (!fSolver) return false; | | | |
| ROOT::Math::WrappedFunction<Function &> wf(f); | | | |
| bool ret = fSolver->SetFunction(wf, min, max); | | | |
| if (!ret) return false; | | | |
| return Solve(maxIter, absTol, relTol); | | | |
| } | | | |
| | | | |
|
| #endif /* ROOT_Math_RootFinder */ | | mutable MsgLogger* fLogger; //! message logger | |
| | | MsgLogger& Log() const { return *fLogger; } | |
| | | | |
| | | ClassDef(RootFinder,0) // Root finding using Brents algorithm | |
| | | }; | |
| | | | |
| | | } // namespace TMVA | |
| | | | |
| | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 254 lines changed or deleted | | 84 lines changed or added | |
|
| TCollectionProxyInfo.h | | TCollectionProxyInfo.h | |
|
| // @(#)root/cont:$Id: TCollectionProxyInfo.h 49056 2013-04-01 13:19:26Z pca
nal $ | | // @(#)root/cont:$Id: TCollectionProxyInfo.h 49281 2013-04-21 02:30:39Z pca
nal $ | |
| // Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007 | | // Author: Markus Frank 28/10/04. Philippe Canal 02/01/2007 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 748 | | skipping to change at line 748 | |
| static void* collect(void *coll, void *array) { | | static void* collect(void *coll, void *array) { | |
| PCont_t c = PCont_t(coll); | | PCont_t c = PCont_t(coll); | |
| PValue_t m = PValue_t(array); // 'start' is a buffer outside the c
ontainer. | | PValue_t m = PValue_t(array); // 'start' is a buffer outside the c
ontainer. | |
| for (size_t i=0; i != c->size(); ++i, ++m ) | | for (size_t i=0; i != c->size(); ++i, ++m ) | |
| *m = c->test(i); | | *m = c->test(i); | |
| return 0; | | return 0; | |
| } | | } | |
| static void destruct(void*,size_t) { | | static void destruct(void*,size_t) { | |
| // Nothing to destruct. | | // Nothing to destruct. | |
| } | | } | |
|
| | | | |
| | | //static const bool fgLargeIterator = sizeof(typename Cont_t::iterato | |
| | | r) > fgIteratorArenaSize; | |
| | | //typedef Iterators<Cont_t,fgLargeIterator> Iterators_t; | |
| | | | |
| | | struct Iterators { | |
| | | typedef Cont_t *PCont_t; | |
| | | union PtrSize_t { size_t fIndex; void *fAddress; }; | |
| | | typedef std::pair<PtrSize_t,Bool_t> iterator; | |
| | | // In the end iterator we store the bitset pointer | |
| | | // and do not use the 'second' part of the pair. | |
| | | // In the other iterator we store the index | |
| | | // and the value. | |
| | | | |
| | | static void create(void *coll, void **begin_arena, void **end_aren | |
| | | a) { | |
| | | iterator *begin = new (*begin_arena) iterator; | |
| | | begin->first.fIndex = 0; | |
| | | begin->second = false; | |
| | | iterator *end = new (*end_arena) iterator; | |
| | | end->first.fAddress = coll; | |
| | | end->second = false; | |
| | | } | |
| | | static void* copy(void *dest_arena, const void *source_ptr) { | |
| | | const iterator *source = (const iterator *)(source_ptr); | |
| | | new (dest_arena) iterator(*source); | |
| | | return dest_arena; | |
| | | } | |
| | | static void* next(void *iter_loc, const void *end_loc) { | |
| | | const iterator *end = (const iterator *)(end_loc); | |
| | | PCont_t c = (PCont_t)end->first.fAddress; | |
| | | iterator *iter = (iterator *)(iter_loc); | |
| | | if (iter->first.fIndex != c->size()) { | |
| | | iter->second = c->test(iter->first.fIndex); | |
| | | ++(iter->first.fIndex); | |
| | | } | |
| | | return &(iter->second); | |
| | | } | |
| | | static void destruct1(void *iter_ptr) { | |
| | | iterator *start = (iterator *)(iter_ptr); | |
| | | start->~iterator(); | |
| | | } | |
| | | static void destruct2(void *begin_ptr, void *end_ptr) { | |
| | | iterator *start = (iterator *)(begin_ptr); | |
| | | iterator *end = (iterator *)(end_ptr); | |
| | | start->~iterator(); | |
| | | end->~iterator(); | |
| | | } | |
| | | }; | |
| | | typedef Iterators Iterators_t; | |
| }; | | }; | |
| | | | |
| template <typename Bitset_t> | | template <typename Bitset_t> | |
| struct TCollectionProxyInfo::Pushback<ROOT::TStdBitsetHelper<Bitset_t>
> : public TCollectionProxyInfo::Type<TStdBitsetHelper<Bitset_t> > { | | struct TCollectionProxyInfo::Pushback<ROOT::TStdBitsetHelper<Bitset_t>
> : public TCollectionProxyInfo::Type<TStdBitsetHelper<Bitset_t> > { | |
| typedef Bitset_t Cont_t; | | typedef Bitset_t Cont_t; | |
| typedef bool Iter_t; | | typedef bool Iter_t; | |
| typedef bool Value_t; | | typedef bool Value_t; | |
| typedef Environ<Iter_t> Env_t; | | typedef Environ<Iter_t> Env_t; | |
| typedef Env_t *PEnv_t; | | typedef Env_t *PEnv_t; | |
| typedef Cont_t *PCont_t; | | typedef Cont_t *PCont_t; | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 51 lines changed or added | |
|
| TKDTreeBinning.h | | TKDTreeBinning.h | |
|
| // @(#)root/mathcore:$Id: TKDTreeBinning.h 39937 2011-06-24 11:21:29Z monet
a $ | | // @(#)root/mathcore:$Id: TKDTreeBinning.h 49288 2013-04-23 09:46:31Z monet
a $ | |
| // Authors: B. Rabacal 11/2010 | | // Authors: B. Rabacal 11/2010 | |
| | | | |
| /********************************************************************** | | /********************************************************************** | |
| * * | | * * | |
| * Copyright (c) 2010 , LCG ROOT MathLib Team * | | * Copyright (c) 2010 , LCG ROOT MathLib Team * | |
| * * | | * * | |
| * * | | * * | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| // Header file for class TKDTreeBinning | | // Header file for class TKDTreeBinning | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 84 | |
| const Double_t* GetBinMaxEdges(UInt_t bin) const; | | const Double_t* GetBinMaxEdges(UInt_t bin) const; | |
| UInt_t GetNBins() const; | | UInt_t GetNBins() const; | |
| UInt_t GetDim() const; | | UInt_t GetDim() const; | |
| UInt_t GetBinContent(UInt_t bin) const; | | UInt_t GetBinContent(UInt_t bin) const; | |
| TKDTreeID* GetTree() const; | | TKDTreeID* GetTree() const; | |
| const Double_t* GetDimData(UInt_t dim) const; | | const Double_t* GetDimData(UInt_t dim) const; | |
| Double_t GetDataMin(UInt_t dim) const; | | Double_t GetDataMin(UInt_t dim) const; | |
| Double_t GetDataMax(UInt_t dim) const; | | Double_t GetDataMax(UInt_t dim) const; | |
| Double_t GetBinDensity(UInt_t bin) const; | | Double_t GetBinDensity(UInt_t bin) const; | |
| Double_t GetBinVolume(UInt_t bin) const; | | Double_t GetBinVolume(UInt_t bin) const; | |
|
| const Double_t* GetOneDimBinEdges() const; | | | |
| const Double_t* GetBinCenter(UInt_t bin) const; | | const Double_t* GetBinCenter(UInt_t bin) const; | |
| const Double_t* GetBinWidth(UInt_t bin) const; | | const Double_t* GetBinWidth(UInt_t bin) const; | |
| UInt_t GetBinMaxDensity() const; | | UInt_t GetBinMaxDensity() const; | |
| UInt_t GetBinMinDensity() const; | | UInt_t GetBinMinDensity() const; | |
|
| | | const Double_t* GetOneDimBinEdges() const; | |
| | | const Double_t* SortOneDimBinEdges(Bool_t sortAsc = kTRUE); | |
| void FillBinData(ROOT::Fit::BinData & data) const; | | void FillBinData(ROOT::Fit::BinData & data) const; | |
| | | | |
| ClassDef(TKDTreeBinning, 1) | | ClassDef(TKDTreeBinning, 1) | |
| | | | |
| }; | | }; | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| TMathBase.h | | TMathBase.h | |
|
| // @(#)root/base:$Id: TMathBase.h 20877 2007-11-19 11:17:07Z rdm $ | | // @(#)root/base:$Id: TMathBase.h 49346 2013-04-25 12:36:04Z rdm $ | |
| // Authors: Rene Brun, Fons Rademakers 29/07/95 | | // Authors: Rene Brun, Fons Rademakers 29/07/95 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 99 | |
| | | | |
| inline Bool_t TMath::Even(Long_t a) | | inline Bool_t TMath::Even(Long_t a) | |
| { return ! (a & 1); } | | { return ! (a & 1); } | |
| | | | |
| inline Bool_t TMath::Odd(Long_t a) | | inline Bool_t TMath::Odd(Long_t a) | |
| { return (a & 1); } | | { return (a & 1); } | |
| | | | |
| //---- Abs ----------------------------------------------------------------
----- | | //---- Abs ----------------------------------------------------------------
----- | |
| | | | |
| inline Short_t TMath::Abs(Short_t d) | | inline Short_t TMath::Abs(Short_t d) | |
|
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : Short_t(-d); } | |
| | | | |
| inline Int_t TMath::Abs(Int_t d) | | inline Int_t TMath::Abs(Int_t d) | |
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : -d; } | |
| | | | |
| inline Long_t TMath::Abs(Long_t d) | | inline Long_t TMath::Abs(Long_t d) | |
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : -d; } | |
| | | | |
| inline Long64_t TMath::Abs(Long64_t d) | | inline Long64_t TMath::Abs(Long64_t d) | |
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : -d; } | |
| | | | |
| inline Float_t TMath::Abs(Float_t d) | | inline Float_t TMath::Abs(Float_t d) | |
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : -d; } | |
| | | | |
| inline Double_t TMath::Abs(Double_t d) | | inline Double_t TMath::Abs(Double_t d) | |
| { return (d >= 0) ? d : -d; } | | { return (d >= 0) ? d : -d; } | |
| | | | |
| //---- Sign ---------------------------------------------------------------
----- | | //---- Sign ---------------------------------------------------------------
----- | |
| | | | |
| inline Short_t TMath::Sign(Short_t a, Short_t b) | | inline Short_t TMath::Sign(Short_t a, Short_t b) | |
|
| { return (b >= 0) ? Abs(a) : -Abs(a); } | | { return (b >= 0) ? Abs(a) : Short_t(-Abs(a)); } | |
| | | | |
| inline Int_t TMath::Sign(Int_t a, Int_t b) | | inline Int_t TMath::Sign(Int_t a, Int_t b) | |
| { return (b >= 0) ? Abs(a) : -Abs(a); } | | { return (b >= 0) ? Abs(a) : -Abs(a); } | |
| | | | |
| inline Long_t TMath::Sign(Long_t a, Long_t b) | | inline Long_t TMath::Sign(Long_t a, Long_t b) | |
| { return (b >= 0) ? Abs(a) : -Abs(a); } | | { return (b >= 0) ? Abs(a) : -Abs(a); } | |
| | | | |
| inline Long64_t TMath::Sign(Long64_t a, Long64_t b) | | inline Long64_t TMath::Sign(Long64_t a, Long64_t b) | |
| { return (b >= 0) ? Abs(a) : -Abs(a); } | | { return (b >= 0) ? Abs(a) : -Abs(a); } | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|