12 #ifndef _C_TRACE_ESTIMATOR_C_TRACE_ESTIMATOR_H_
13 #define _C_TRACE_ESTIMATOR_C_TRACE_ESTIMATOR_H_
19 #include "../functions/functions.h"
20 #include "../_c_linear_operator/c_linear_operator.h"
21 #include "../_definitions/types.h"
22 #include "../_random_generator/random_number_generator.h"
38 template <
typename DataType>
50 const DataType exponent,
54 const DataType lanczos_tol,
57 const DataType error_atol,
58 const DataType error_rtol,
59 const DataType confidence_level,
60 const DataType outlier_significance_level,
69 float& alg_wall_time);
80 const DataType exponent,
83 const DataType lanczos_tol,
85 DataType* random_vector,
87 DataType* trace_estimate);
Generates 64-bit integers on multiple parallel threads.
Base class for linear operators. This class serves as interface for all derived classes.
A static class to compute the trace of implicit matrix functions using stochastic Lanczos quadrature ...
static void _c_stochastic_lanczos_quadrature(cLinearOperator< DataType > *A, DataType *parameters, const IndexType num_inquiries, const Function *matrix_function, const FlagType gram, const DataType exponent, const FlagType orthogonalize, const IndexType lanczos_degree, const DataType lanczos_tol, RandomNumberGenerator &random_number_generator, DataType *random_vector, FlagType *converged, DataType *trace_estimate)
For a given random input vector, computes one Monte-Carlo sample to estimate trace using Lanczos quad...
static FlagType c_trace_estimator(cLinearOperator< DataType > *A, DataType *parameters, const IndexType num_inquiries, const Function *matrix_function, const FlagType gram, const DataType exponent, const FlagType orthogonalize, const int64_t seed, const IndexType lanczos_degree, const DataType lanczos_tol, const IndexType min_num_samples, const IndexType max_num_samples, const DataType error_atol, const DataType error_rtol, const DataType confidence_level, const DataType outlier_significance_level, const IndexType num_threads, DataType *trace, DataType *error, DataType **samples, IndexType *processed_samples_indices, IndexType *num_samples_used, IndexType *num_outliers, FlagType *converged, float &alg_wall_time)
Stochastic Lanczos quadrature method to estimate trace of a function of a linear operator....