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

#include <ROL_SampleGenerator.hpp>

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

Public Member Functions

virtual ~SampleGenerator ()
 
 SampleGenerator (const ROL::Ptr< BatchManager< Real > > &bman)
 
 SampleGenerator (const SampleGenerator< Real > &sampler)
 
virtual void update (const Vector< Real > &x)
 
virtual int start (void)
 
virtual Real computeError (std::vector< Real > &vals)
 
virtual Real computeError (std::vector< ROL::Ptr< Vector< Real > > > &vals, const Vector< Real > &x)
 
virtual void refine (void)
 
virtual void setSamples (bool inConstructor=false)
 
virtual int numGlobalSamples (void) const
 
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
 

Protected Member Functions

void setPoints (std::vector< std::vector< Real > > &p)
 
void setWeights (std::vector< Real > &w)
 

Private Attributes

int begin_
 
ROL::Ptr< BatchManager< Real > > bman_
 
std::vector< std::vector< Real > > points_
 
std::vector< Real > weights_
 

Detailed Description

template<class Real>
class ROL::SampleGenerator< Real >

Definition at line 54 of file ROL_SampleGenerator.hpp.

Constructor & Destructor Documentation

◆ ~SampleGenerator()

template<class Real >
virtual ROL::SampleGenerator< Real >::~SampleGenerator ( )
inlinevirtual

Definition at line 72 of file ROL_SampleGenerator.hpp.

◆ SampleGenerator() [1/2]

template<class Real >
ROL::SampleGenerator< Real >::SampleGenerator ( const ROL::Ptr< BatchManager< Real > > & bman)
inline

Definition at line 73 of file ROL_SampleGenerator.hpp.

◆ SampleGenerator() [2/2]

template<class Real >
ROL::SampleGenerator< Real >::SampleGenerator ( const SampleGenerator< Real > & sampler)
inline

Definition at line 75 of file ROL_SampleGenerator.hpp.

Member Function Documentation

◆ setPoints()

template<class Real >
void ROL::SampleGenerator< Real >::setPoints ( std::vector< std::vector< Real > > & p)
inlineprotected

◆ setWeights()

template<class Real >
void ROL::SampleGenerator< Real >::setWeights ( std::vector< Real > & w)
inlineprotected

◆ update()

template<class Real >
virtual void ROL::SampleGenerator< Real >::update ( const Vector< Real > & x)
inlinevirtual

◆ start()

template<class Real >
virtual int ROL::SampleGenerator< Real >::start ( void )
inlinevirtual

◆ computeError() [1/2]

template<class Real >
virtual Real ROL::SampleGenerator< Real >::computeError ( std::vector< Real > & vals)
inlinevirtual

Reimplemented in ROL::MonteCarloGenerator< Real >.

Definition at line 87 of file ROL_SampleGenerator.hpp.

◆ computeError() [2/2]

template<class Real >
virtual Real ROL::SampleGenerator< Real >::computeError ( std::vector< ROL::Ptr< Vector< Real > > > & vals,
const Vector< Real > & x )
inlinevirtual

Definition at line 91 of file ROL_SampleGenerator.hpp.

◆ refine()

template<class Real >
virtual void ROL::SampleGenerator< Real >::refine ( void )
inlinevirtual

◆ setSamples()

template<class Real >
virtual void ROL::SampleGenerator< Real >::setSamples ( bool inConstructor = false)
inlinevirtual

Definition at line 99 of file ROL_SampleGenerator.hpp.

◆ numGlobalSamples()

template<class Real >
virtual int ROL::SampleGenerator< Real >::numGlobalSamples ( void ) const
inlinevirtual

◆ numMySamples()

template<class Real >
virtual int ROL::SampleGenerator< Real >::numMySamples ( void ) const
inlinevirtual

◆ getMyPoint()

template<class Real >
virtual std::vector< Real > ROL::SampleGenerator< Real >::getMyPoint ( const int i) const
inlinevirtual

◆ getMyWeight()

template<class Real >
virtual Real ROL::SampleGenerator< Real >::getMyWeight ( const int i) const
inlinevirtual

◆ batchID()

template<class Real >
int ROL::SampleGenerator< Real >::batchID ( void ) const
inline

◆ numBatches()

template<class Real >
int ROL::SampleGenerator< Real >::numBatches ( void ) const
inline

◆ sumAll() [1/2]

template<class Real >
void ROL::SampleGenerator< Real >::sumAll ( Real * input,
Real * output,
int dim ) const
inline

Definition at line 128 of file ROL_SampleGenerator.hpp.

References ROL::SampleGenerator< Real >::bman_, and dim.

Referenced by ROL::PD_HMCR2< Real >::computeDual(), ROL::PD_RandVarFunctional< Real >::computeDual(), ROL::MonteCarloGenerator< Real >::computeError(), ROL::MonteCarloGenerator< Real >::computeError(), ROL::RiskMeasure< Real >::getGradient(), ROL::PD_BPOE< Real >::getGradient(), ROL::PD_CVaR< Real >::getGradient(), ROL::PD_HMCR2< Real >::getGradient(), ROL::PD_MeanSemiDeviation< Real >::getGradient(), ROL::PD_MeanSemiDeviationFromTarget< Real >::getGradient(), ROL::ExpectationQuadDeviation< Real >::getGradient(), ROL::ExpectationQuadError< Real >::getGradient(), ROL::BPOE< Real >::getGradient(), ROL::SmoothedPOE< Real >::getGradient(), ROL::ExpectationQuadRegret< Real >::getGradient(), ROL::FDivergence< Real >::getGradient(), ROL::CoherentEntropicRisk< Real >::getGradient(), ROL::CVaR< Real >::getGradient(), ROL::EntropicRisk< Real >::getGradient(), ROL::ExpectationQuadRisk< Real >::getGradient(), ROL::HMCR< Real >::getGradient(), ROL::KLDivergence< Real >::getGradient(), ROL::MeanDeviation< Real >::getGradient(), ROL::MeanDeviationFromTarget< Real >::getGradient(), ROL::MeanSemiDeviation< Real >::getGradient(), ROL::MeanSemiDeviationFromTarget< Real >::getGradient(), ROL::MeanVariance< Real >::getGradient(), ROL::MixedCVaR< Real >::getGradient(), ROL::QuantileRadius< Real >::getGradient(), ROL::RandVarFunctional< Real >::getGradient(), ROL::RiskMeasure< Real >::getHessVec(), ROL::PD_BPOE< Real >::getHessVec(), ROL::PD_CVaR< Real >::getHessVec(), ROL::PD_HMCR2< Real >::getHessVec(), ROL::PD_MeanSemiDeviation< Real >::getHessVec(), ROL::PD_MeanSemiDeviationFromTarget< Real >::getHessVec(), ROL::ExpectationQuadDeviation< Real >::getHessVec(), ROL::ExpectationQuadError< Real >::getHessVec(), ROL::BPOE< Real >::getHessVec(), ROL::SmoothedPOE< Real >::getHessVec(), ROL::ExpectationQuadRegret< Real >::getHessVec(), ROL::FDivergence< Real >::getHessVec(), ROL::CoherentEntropicRisk< Real >::getHessVec(), ROL::CVaR< Real >::getHessVec(), ROL::EntropicRisk< Real >::getHessVec(), ROL::ExpectationQuadRisk< Real >::getHessVec(), ROL::HMCR< Real >::getHessVec(), ROL::KLDivergence< Real >::getHessVec(), ROL::MeanDeviation< Real >::getHessVec(), ROL::MeanDeviationFromTarget< Real >::getHessVec(), ROL::MeanSemiDeviation< Real >::getHessVec(), ROL::MeanSemiDeviationFromTarget< Real >::getHessVec(), ROL::MeanVariance< Real >::getHessVec(), ROL::MixedCVaR< Real >::getHessVec(), ROL::QuantileRadius< Real >::getHessVec(), ROL::RandVarFunctional< Real >::getHessVec(), ROL::PD_BPOE< Real >::getValue(), ROL::PD_CVaR< Real >::getValue(), ROL::PD_HMCR2< Real >::getValue(), ROL::PD_MeanSemiDeviation< Real >::getValue(), ROL::PD_MeanSemiDeviationFromTarget< Real >::getValue(), ROL::ExpectationQuadDeviation< Real >::getValue(), ROL::ExpectationQuadError< Real >::getValue(), ROL::BPOE< Real >::getValue(), ROL::SmoothedPOE< Real >::getValue(), ROL::ExpectationQuadRegret< Real >::getValue(), ROL::FDivergence< Real >::getValue(), ROL::CoherentEntropicRisk< Real >::getValue(), ROL::CVaR< Real >::getValue(), ROL::EntropicRisk< Real >::getValue(), ROL::ExpectationQuadRisk< Real >::getValue(), ROL::HMCR< Real >::getValue(), ROL::KLDivergence< Real >::getValue(), ROL::MeanDeviation< Real >::getValue(), ROL::MeanDeviationFromTarget< Real >::getValue(), ROL::MeanSemiDeviation< Real >::getValue(), ROL::MeanSemiDeviationFromTarget< Real >::getValue(), ROL::MeanVariance< Real >::getValue(), ROL::MixedCVaR< Real >::getValue(), ROL::QuantileRadius< Real >::getValue(), ROL::RandVarFunctional< Real >::getValue(), ROL::RiskMeasure< Real >::getValue(), ROL::SampleGenerator< Real >::numGlobalSamples(), and ROL::SROMGenerator< Real >::pruneSamples().

◆ sumAll() [2/2]

template<class Real >
void ROL::SampleGenerator< Real >::sumAll ( Vector< Real > & input,
Vector< Real > & output ) const
inline

Definition at line 132 of file ROL_SampleGenerator.hpp.

References ROL::SampleGenerator< Real >::bman_.

◆ broadcast()

template<class Real >
void ROL::SampleGenerator< Real >::broadcast ( Real * input,
int cnt,
int root ) const
inline

◆ barrier()

template<class Real >
void ROL::SampleGenerator< Real >::barrier ( void ) const
inline

Definition at line 140 of file ROL_SampleGenerator.hpp.

References ROL::SampleGenerator< Real >::bman_.

◆ getBatchManager()

template<class Real >
const ROL::Ptr< BatchManager< Real > > ROL::SampleGenerator< Real >::getBatchManager ( void ) const
inline

Definition at line 144 of file ROL_SampleGenerator.hpp.

References ROL::SampleGenerator< Real >::bman_.

◆ print()

template<class Real >
void ROL::SampleGenerator< Real >::print ( const std::string & filename = "samples",
const int prec = 12 ) const
inline

Member Data Documentation

◆ begin_

template<class Real >
int ROL::SampleGenerator< Real >::begin_
private

◆ bman_

template<class Real >
ROL::Ptr<BatchManager<Real> > ROL::SampleGenerator< Real >::bman_
private

◆ points_

template<class Real >
std::vector<std::vector<Real> > ROL::SampleGenerator< Real >::points_
private

◆ weights_

template<class Real >
std::vector<Real> ROL::SampleGenerator< Real >::weights_
private

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