KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Member Functions | Protected Member Functions | List of all members
Kratos::DiscreteRandomVariable Class Reference

#include <discrete_random_variable.h>

Inheritance diagram for Kratos::DiscreteRandomVariable:
Collaboration diagram for Kratos::DiscreteRandomVariable:

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (DiscreteRandomVariable)
 
 DiscreteRandomVariable ()
 Default constructor. More...
 
 DiscreteRandomVariable (const Parameters rParameters)
 
 DiscreteRandomVariable (const Parameters rParameters, const int seed)
 
double Sample () override
 
double ProbabilityDensity (const double x)
 
double GetMean () override
 
std::string Info () const override
 Turn back information as a stemplate<class T, std::size_t dim> tring. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::RandomVariable
 KRATOS_CLASS_POINTER_DEFINITION (RandomVariable)
 
 RandomVariable ()
 Default constructor. More...
 
 RandomVariable (const Parameters rParameters)
 
virtual ~RandomVariable ()
 Destructor. More...
 
const array_1d< double, 2 > & GetSupport ()
 

Protected Member Functions

void Check () override
 
- Protected Member Functions inherited from Kratos::RandomVariable
template<typename T >
void CalculateFirstAndLastIndicesWithNonzeroValue (std::vector< T > values, size_t &low_index, size_t &high_index)
 
void SetSupport (const double Min, const double Max)
 

Additional Inherited Members

- Protected Attributes inherited from Kratos::RandomVariable
double mMean = 0.0
 
bool mMeanHasAlreadyBeenCalculated =false
 

Constructor & Destructor Documentation

◆ DiscreteRandomVariable() [1/3]

Kratos::DiscreteRandomVariable::DiscreteRandomVariable ( )

Default constructor.

◆ DiscreteRandomVariable() [2/3]

Kratos::DiscreteRandomVariable::DiscreteRandomVariable ( const Parameters  rParameters)

◆ DiscreteRandomVariable() [3/3]

Kratos::DiscreteRandomVariable::DiscreteRandomVariable ( const Parameters  rParameters,
const int  seed 
)

Member Function Documentation

◆ Check()

void Kratos::DiscreteRandomVariable::Check ( )
overrideprotectedvirtual

Reimplemented from Kratos::RandomVariable.

◆ GetMean()

double Kratos::DiscreteRandomVariable::GetMean ( )
overridevirtual

Reimplemented from Kratos::RandomVariable.

◆ Info()

std::string Kratos::DiscreteRandomVariable::Info ( ) const
inlineoverridevirtual

Turn back information as a stemplate<class T, std::size_t dim> tring.

Reimplemented from Kratos::RandomVariable.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::DiscreteRandomVariable::KRATOS_CLASS_POINTER_DEFINITION ( DiscreteRandomVariable  )

◆ PrintData()

void Kratos::DiscreteRandomVariable::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

Print object's data.

Reimplemented from Kratos::RandomVariable.

◆ PrintInfo()

void Kratos::DiscreteRandomVariable::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::RandomVariable.

◆ ProbabilityDensity()

double Kratos::DiscreteRandomVariable::ProbabilityDensity ( const double  x)

◆ Sample()

double Kratos::DiscreteRandomVariable::Sample ( )
overridevirtual

Reimplemented from Kratos::RandomVariable.


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