https://mooseframework.inl.gov
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 
26 Real computeSTD(const std::vector<Real> & data, const unsigned int & start_index);
27 
35 Real computeMean(const std::vector<Real> & data, const unsigned int & start_index);
36 
48 std::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 
63 std::vector<Real> sortOutput(const std::vector<Real> & outputs,
64  const unsigned int samplessub,
65  const Real subset_prob);
66 
72 Real computeMin(const std::vector<Real> & data);
73 
79 std::vector<Real> computeVectorABS(const std::vector<Real> & data);
80 
89 unsigned int weightedResample(const std::vector<Real> & weights, Real rnd);
90 
91 } // namespace AdaptiveMonteCarloUtils
unsigned int weightedResample(const std::vector< Real > &weights, Real rnd)
return a resampled vector from a population given a weight vector.
std::vector< Real > computeVectorABS(const std::vector< Real > &data)
return the absolute values in a vector.
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.
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...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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 > sortOutput(const std::vector< Real > &outputs, const unsigned int samplessub, const Real subset_prob)
return the largest po percentile output values.