ROOT logo
// @(#)root/roostats:$Id: ProposalFunction.cxx 26805 2009-06-17 14:31:02Z kbelasco $
// Authors: Kevin Belasco        17/06/2009
// Authors: Kyle Cranmer         17/06/2009
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//_________________________________________________
/*
BEGIN_HTML
<p>
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Monte Carlo algorithm.  
Given a current point in the parameter space it proposes a new point.  
Proposal functions may or may not be symmetric, in the sense that the probability to propose X1 given we are at X2 
need not be the same as the probability to propose X2 given that we are at X1.  In this case, the IsSymmetric method
should return false, and the Metropolis algorithm will need to take into account the proposal density to maintain detailed balance.
</p>
END_HTML
*/
//

#include "RooStats/ProposalFunction.h"

#include "RooRealVar.h"
#include "TIterator.h"
#include "RooArgSet.h"

ClassImp(RooStats::ProposalFunction);

using namespace RooFit;
using namespace RooStats;

// Assuming all values in set are RooRealVars, randomize their values.
void ProposalFunction::randomizeSet(RooArgSet& set)
{
   TIterator* it = set.createIterator();
   RooRealVar* var;

   while ((var = (RooRealVar*)it->Next()) != NULL)
      var->randomize();
}
 ProposalFunction.cxx:1
 ProposalFunction.cxx:2
 ProposalFunction.cxx:3
 ProposalFunction.cxx:4
 ProposalFunction.cxx:5
 ProposalFunction.cxx:6
 ProposalFunction.cxx:7
 ProposalFunction.cxx:8
 ProposalFunction.cxx:9
 ProposalFunction.cxx:10
 ProposalFunction.cxx:11
 ProposalFunction.cxx:12
 ProposalFunction.cxx:13
 ProposalFunction.cxx:14
 ProposalFunction.cxx:15
 ProposalFunction.cxx:16
 ProposalFunction.cxx:17
 ProposalFunction.cxx:18
 ProposalFunction.cxx:19
 ProposalFunction.cxx:20
 ProposalFunction.cxx:21
 ProposalFunction.cxx:22
 ProposalFunction.cxx:23
 ProposalFunction.cxx:24
 ProposalFunction.cxx:25
 ProposalFunction.cxx:26
 ProposalFunction.cxx:27
 ProposalFunction.cxx:28
 ProposalFunction.cxx:29
 ProposalFunction.cxx:30
 ProposalFunction.cxx:31
 ProposalFunction.cxx:32
 ProposalFunction.cxx:33
 ProposalFunction.cxx:34
 ProposalFunction.cxx:35
 ProposalFunction.cxx:36
 ProposalFunction.cxx:37
 ProposalFunction.cxx:38
 ProposalFunction.cxx:39
 ProposalFunction.cxx:40
 ProposalFunction.cxx:41
 ProposalFunction.cxx:42
 ProposalFunction.cxx:43
 ProposalFunction.cxx:44
 ProposalFunction.cxx:45