/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooBrentRootFinder.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_BRENT_ROOT_FINDER
#define ROO_BRENT_ROOT_FINDER

#include "RooAbsRootFinder.h"

class RooBrentRootFinder : public RooAbsRootFinder {
public:
  RooBrentRootFinder(const RooAbsFunc& function);
  inline virtual ~RooBrentRootFinder() { }

  virtual Bool_t findRoot(Double_t &result, Double_t xlo, Double_t xhi, Double_t value= 0) const;
  void setTol(Double_t tol) { 
    // Set convergence tolerance parameter 
    _tol = tol ; 
  }

protected:
  enum { MaxIterations = 512 };

  Double_t _tol ;

  ClassDef(RooBrentRootFinder,0) // Abstract interface for 1-dim real-valued function root finders
};

#endif
 RooBrentRootFinder.h:1
 RooBrentRootFinder.h:2
 RooBrentRootFinder.h:3
 RooBrentRootFinder.h:4
 RooBrentRootFinder.h:5
 RooBrentRootFinder.h:6
 RooBrentRootFinder.h:7
 RooBrentRootFinder.h:8
 RooBrentRootFinder.h:9
 RooBrentRootFinder.h:10
 RooBrentRootFinder.h:11
 RooBrentRootFinder.h:12
 RooBrentRootFinder.h:13
 RooBrentRootFinder.h:14
 RooBrentRootFinder.h:15
 RooBrentRootFinder.h:16
 RooBrentRootFinder.h:17
 RooBrentRootFinder.h:18
 RooBrentRootFinder.h:19
 RooBrentRootFinder.h:20
 RooBrentRootFinder.h:21
 RooBrentRootFinder.h:22
 RooBrentRootFinder.h:23
 RooBrentRootFinder.h:24
 RooBrentRootFinder.h:25
 RooBrentRootFinder.h:26
 RooBrentRootFinder.h:27
 RooBrentRootFinder.h:28
 RooBrentRootFinder.h:29
 RooBrentRootFinder.h:30
 RooBrentRootFinder.h:31
 RooBrentRootFinder.h:32
 RooBrentRootFinder.h:33
 RooBrentRootFinder.h:34
 RooBrentRootFinder.h:35
 RooBrentRootFinder.h:36
 RooBrentRootFinder.h:37
 RooBrentRootFinder.h:38
 RooBrentRootFinder.h:39
 RooBrentRootFinder.h:40