ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::MonteCarloGenerator< Real > Class Template Reference

#include <ROL_MonteCarloGenerator.hpp>

+ Inheritance diagram for ROL::MonteCarloGenerator< Real >:

Public Member Functions

 MonteCarloGenerator (const int nSamp, const std::vector< ROL::Ptr< Distribution< Real > > > &dist, const ROL::Ptr< BatchManager< Real > > &bman, const bool use_SA=false, const bool adaptive=false, const int numNewSamps=0, const int seed=123454321)
 
 MonteCarloGenerator (const int nSamp, std::vector< std::vector< Real > > &bounds, const ROL::Ptr< BatchManager< Real > > &bman, const bool use_SA=false, const bool adaptive=false, const int numNewSamps=0, const int seed=123454321)
 
 MonteCarloGenerator (const int nSamp, const std::vector< Real > &mean, const std::vector< Real > &std, const ROL::Ptr< BatchManager< Real > > &bman, const bool use_SA=false, const bool adaptive=false, const int numNewSamps=0, const int seed=123454321)
 
void update (const Vector< Real > &x)
 
Real computeError (std::vector< Real > &vals)
 
Real computeError (std::vector< ROL::Ptr< Vector< Real > > > &vals, const Vector< Real > &x)
 
void refine (void)
 
int numGlobalSamples (void) const
 
- Public Member Functions inherited from ROL::SampleGenerator< Real >
virtual ~SampleGenerator ()
 
 SampleGenerator (const ROL::Ptr< BatchManager< Real > > &bman)
 
 SampleGenerator (const SampleGenerator< Real > &sampler)
 
virtual int start (void)
 
virtual void setSamples (bool inConstructor=false)
 
virtual int numMySamples (void) const
 
virtual std::vector< Real > getMyPoint (const int i) const
 
virtual Real getMyWeight (const int i) const
 
int batchID (void) const
 
int numBatches (void) const
 
void sumAll (Real *input, Real *output, int dim) const
 
void sumAll (Vector< Real > &input, Vector< Real > &output) const
 
void broadcast (Real *input, int cnt, int root) const
 
void barrier (void) const
 
const ROL::Ptr< BatchManager
< Real > > 
getBatchManager (void) const
 
void print (const std::string &filename="samples", const int prec=12) const
 

Private Member Functions

Real ierf (Real input) const
 
Real random (void) const
 
std::vector< std::vector< Real > > sample (int nSamp, bool store=true)
 
void sample (void)
 

Private Attributes

int nSamp_
 
const bool use_normal_
 
const bool use_SA_
 
const bool adaptive_
 
const int numNewSamps_
 
std::vector< std::vector< Real > > data_
 
Real sum_val_
 
Real sum_val2_
 
Real sum_ng_
 
Real sum_ng2_
 
const bool useDist_
 
const std::vector< ROL::Ptr
< Distribution< Real > > > 
dist_
 
const int seed_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::SampleGenerator< Real >
void setPoints (std::vector< std::vector< Real > > &p)
 
void setWeights (std::vector< Real > &w)
 

Detailed Description

template<class Real>
class ROL::MonteCarloGenerator< Real >

Definition at line 53 of file ROL_MonteCarloGenerator.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::MonteCarloGenerator< Real >::MonteCarloGenerator ( const int  nSamp,
const std::vector< ROL::Ptr< Distribution< Real > > > &  dist,
const ROL::Ptr< BatchManager< Real > > &  bman,
const bool  use_SA = false,
const bool  adaptive = false,
const int  numNewSamps = 0,
const int  seed = 123454321 
)
inline
template<class Real >
ROL::MonteCarloGenerator< Real >::MonteCarloGenerator ( const int  nSamp,
std::vector< std::vector< Real > > &  bounds,
const ROL::Ptr< BatchManager< Real > > &  bman,
const bool  use_SA = false,
const bool  adaptive = false,
const int  numNewSamps = 0,
const int  seed = 123454321 
)
inline
template<class Real >
ROL::MonteCarloGenerator< Real >::MonteCarloGenerator ( const int  nSamp,
const std::vector< Real > &  mean,
const std::vector< Real > &  std,
const ROL::Ptr< BatchManager< Real > > &  bman,
const bool  use_SA = false,
const bool  adaptive = false,
const int  numNewSamps = 0,
const int  seed = 123454321 
)
inline

Member Function Documentation

template<class Real >
Real ROL::MonteCarloGenerator< Real >::ierf ( Real  input) const
inlineprivate
template<class Real >
Real ROL::MonteCarloGenerator< Real >::random ( void  ) const
inlineprivate
template<class Real >
std::vector<std::vector<Real> > ROL::MonteCarloGenerator< Real >::sample ( int  nSamp,
bool  store = true 
)
inlineprivate
template<class Real >
void ROL::MonteCarloGenerator< Real >::sample ( void  )
inlineprivate
template<class Real >
void ROL::MonteCarloGenerator< Real >::update ( const Vector< Real > &  x)
inlinevirtual
template<class Real >
Real ROL::MonteCarloGenerator< Real >::computeError ( std::vector< Real > &  vals)
inlinevirtual
template<class Real >
Real ROL::MonteCarloGenerator< Real >::computeError ( std::vector< ROL::Ptr< Vector< Real > > > &  vals,
const Vector< Real > &  x 
)
inlinevirtual
template<class Real >
void ROL::MonteCarloGenerator< Real >::refine ( void  )
inlinevirtual
template<class Real >
int ROL::MonteCarloGenerator< Real >::numGlobalSamples ( void  ) const
inlinevirtual

Member Data Documentation

template<class Real >
int ROL::MonteCarloGenerator< Real >::nSamp_
private
template<class Real >
const bool ROL::MonteCarloGenerator< Real >::use_normal_
private
template<class Real >
const bool ROL::MonteCarloGenerator< Real >::use_SA_
private
template<class Real >
const bool ROL::MonteCarloGenerator< Real >::adaptive_
private
template<class Real >
const int ROL::MonteCarloGenerator< Real >::numNewSamps_
private
template<class Real >
std::vector<std::vector<Real> > ROL::MonteCarloGenerator< Real >::data_
private
template<class Real >
Real ROL::MonteCarloGenerator< Real >::sum_val_
private
template<class Real >
Real ROL::MonteCarloGenerator< Real >::sum_val2_
private
template<class Real >
Real ROL::MonteCarloGenerator< Real >::sum_ng_
private
template<class Real >
Real ROL::MonteCarloGenerator< Real >::sum_ng2_
private
template<class Real >
const bool ROL::MonteCarloGenerator< Real >::useDist_
private
template<class Real >
const std::vector<ROL::Ptr<Distribution<Real> > > ROL::MonteCarloGenerator< Real >::dist_
private
template<class Real >
const int ROL::MonteCarloGenerator< Real >::seed_
private

The documentation for this class was generated from the following file: