Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBrentRootFinder.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooBrentRootFinder.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_BRENT_ROOT_FINDER
17#define ROO_BRENT_ROOT_FINDER
18
19#include <Rtypes.h>
20
21class RooAbsFunc;
22
24public:
26 virtual ~RooBrentRootFinder() = default;
27
28 bool findRoot(double &result, double xlo, double xhi, double value= 0) const;
29
30 /// Set convergence tolerance parameter
31 void setTol(double tol) {
32 _tol = tol ;
33 }
34
35protected:
36 static constexpr int MaxIterations = 512;
37
38 const RooAbsFunc *_function; ///< Pointer to input function
39 bool _valid; ///< True if current state is valid
40
41 double _tol ;
42
44};
45
46#endif
RooAbsReal & function()
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition RooAbsFunc.h:27
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method.
const RooAbsFunc * _function
Pointer to input function.
virtual ~RooBrentRootFinder()=default
bool findRoot(double &result, double xlo, double xhi, double value=0) const
Do the root finding using the Brent-Decker method.
static constexpr int MaxIterations
void setTol(double tol)
Set convergence tolerance parameter.
bool _valid
True if current state is valid.