https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AdaptiveMonteCarloUtils.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseUtils.h"
13
15{
16/* AdaptiveMonteCarloUtils contains functions that are used across the Adaptive Monte
17 Carlo set of algorithms.*/
18
26Real computeSTD(const std::vector<Real> & data, const unsigned int & start_index);
27
35Real computeMean(const std::vector<Real> & data, const unsigned int & start_index);
36
48std::vector<std::vector<Real>> sortInput(const std::vector<std::vector<Real>> & inputs,
49 const std::vector<Real> & outputs,
50 const unsigned int samplessub,
51 const Real subset_prob);
52
63std::vector<Real> sortOutput(const std::vector<Real> & outputs,
64 const unsigned int samplessub,
65 const Real subset_prob);
66
72Real computeMin(const std::vector<Real> & data);
73
79std::vector<Real> computeVectorABS(const std::vector<Real> & data);
80
89unsigned int weightedResample(const std::vector<Real> & weights, Real rnd);
90
91} // namespace AdaptiveMonteCarloUtils
Real computeSTD(const std::vector< Real > &data, const unsigned int &start_index)
compute the standard deviation of a data vector by only considering values from a specific index.
std::vector< Real > sortOutput(const std::vector< Real > &outputs, const unsigned int samplessub, const Real subset_prob)
return the largest po percentile output values.
Real computeMean(const std::vector< Real > &data, const unsigned int &start_index)
compute the mean of a data vector by only considering values from a specific index.
Real computeMin(const std::vector< Real > &data)
return the minimum value in a vector.
std::vector< std::vector< Real > > sortInput(const std::vector< std::vector< Real > > &inputs, const std::vector< Real > &outputs, const unsigned int samplessub, const Real subset_prob)
return input values corresponding to the largest po percentile output values.
std::vector< Real > computeVectorABS(const std::vector< Real > &data)
return the absolute values in a vector.
unsigned int weightedResample(const std::vector< Real > &weights, Real rnd)
return a resampled vector from a population given a weight vector.