RASPA3 3.0.13
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
Loading...
Searching...
No Matches
BlockErrorEstimation Struct Referenceexport
module averages

Manages block error estimation for statistical analysis. More...

Collaboration diagram for BlockErrorEstimation:

Public Member Functions

 BlockErrorEstimation ()
 Default constructor.
 
 BlockErrorEstimation (std::size_t size, std::size_t numberOfSamples)
 Constructs a BlockErrorEstimation with specified parameters.
 
void setCurrentSample (std::size_t sample)
 Updates the current sample and bin index.
 
bool operator== (BlockErrorEstimation const &) const =default
 

Public Attributes

std::uint64_t versionNumber {1}
 Version number for serialization.
 
std::size_t numberOfBins {}
 Total number of bins.
 
std::size_t currentSample {0}
 Current sample index.
 
std::size_t numberOfSamples
 Total number of samples.
 
std::size_t currentBin {0}
 Current bin index.
 
double binSize {}
 Size of each bin.
 
std::vector< std::size_t > nextBin {}
 Indices of the next bin boundaries.
 

Friends

Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const BlockErrorEstimation &blockerror)
 
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, BlockErrorEstimation &blockerror)
 

Detailed Description

Manages block error estimation for statistical analysis.

The BlockErrorEstimation struct keeps track of the sampling process for block error analysis. It divides the total number of samples into bins and updates the current bin as samples are processed.

Constructor & Destructor Documentation

◆ BlockErrorEstimation() [1/2]

BlockErrorEstimation::BlockErrorEstimation ( )
inline

Default constructor.

Initializes a BlockErrorEstimation object with default values.

◆ BlockErrorEstimation() [2/2]

BlockErrorEstimation::BlockErrorEstimation ( std::size_t  size,
std::size_t  numberOfSamples 
)
inline

Constructs a BlockErrorEstimation with specified parameters.

Initializes the BlockErrorEstimation with the given number of bins and samples, and calculates the bin sizes.

Parameters
sizeNumber of bins.
numberOfSamplesTotal number of samples.

Member Function Documentation

◆ setCurrentSample()

void BlockErrorEstimation::setCurrentSample ( std::size_t  sample)
inline

Updates the current sample and bin index.

Sets the current sample index and updates the current bin index if the sample reaches the next bin boundary.

Parameters
sampleThe current sample index.

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