69template <
typename FunctionSignature,
94template <
typename Variable,
typename FunctionValue,
concepts::rbf RBF,
99 PolynomialDegree, KernelMatrixType, DistanceFunction,
119 length_parameter_calculator_type::uses_global_length_parameter;
132 typename equation_solver_type::kernel_matrix_type;
136 typename equation_solver_type::additional_matrix_type;
166 void compute(
const std::vector<variable_type>& variables,
168 const auto num_variables =
static_cast<index_type>(variables.size());
170 num_variables > 0, this->
logger(),
"Variables must be given.");
194 for (std::size_t i = 0; i <
variables_->size(); ++i) {
200 if (distance_rate < rbf_type::support_boundary()) {
238 const std::vector<variable_type>& variables,
243 const auto num_variables =
static_cast<index_type>(variables.size());
245 num_variables > 0, this->
logger(),
"Variables must be given.");
250 auto objective_function =
251 [
this, &variables, &function_values](
264 using objective_function_object_type =
decltype(objective_function);
265 using objective_function_wrapper_type =
267 objective_function_object_type>;
268 using optimizer_type =
271 optimizer_type optimizer{
272 objective_function_wrapper_type{objective_function}};
276 optimizer.max_evaluations(max_mle_evaluations);
277 optimizer.init(lower_boundary, upper_boundary);
283 "Selected an optimized scale of length parameters: {}", scale);
383template <
typename FunctionSignature,
385 rbfs::gaussian_rbf<impl::get_default_scalar_type<FunctionSignature>>,
388 concepts::distance_function DistanceFunction =
389 distance_functions::euclidean_distance_function<
393 KernelMatrixType, DistanceFunction,
Class of tags of logs without memory management.
Class to incorporate logging in algorithms.
void configure_child_algorithm_logger_if_exists(Child &child)
Configure a logger of a child algorithm if exists.
logging_mixin(log_tag_view tag)
Constructor.
auto logger() const noexcept -> const num_collect::logging::logger &
Access to the logger.
Class of dividing rectangles (DIRECT) method jones1993 for optimization.
Wrapper class of a function object to use as an objective function.
Class to calculate Euclidean distance.
Class to solve linear equations of kernel matrices and matrices of additional terms in RBF interpolat...
Class to calculate length parameters for RBF using global fixed length parameter.
Class to calculate length parameters for RBF using length parameters localized for each sample point.
Class to calculate polynomials used with RBF interpolation.
typename equation_solver_type::kernel_matrix_type kernel_matrix_type
Type of kernel matrices.
auto interpolate(const variable_type &variable) const -> function_value_type
Interpolate for a variable.
void optimize_length_parameter_scale(const std::vector< variable_type > &variables, const function_value_vector_type &function_values, index_type max_mle_evaluations=default_max_mle_evaluations)
Set the scale of length parameters with optimization using MLE scheuerer2011.
rbf_polynomial_interpolator(distance_function_type distance_function=distance_function_type(), rbf_type rbf=rbf_type())
Constructor.
polynomial_calculator< variable_type, PolynomialDegree > polynomial_calculator_
Calculator of polynomials.
static constexpr bool uses_global_length_parameter
Whether this calculator uses the globally fixed length parameters.
function_value_vector_type kernel_coeffs_
Coefficients for kernels.
auto rbf() const noexcept -> const rbf_type &
Get the RBF.
typename equation_solver_type::additional_matrix_type polynomial_matrix_type
Type of matrices of polynomial terms.
kernel_matrix_type kernel_matrix_
Kernel matrix.
equation_solver_type equation_solver_
Solver of linear equations.
static constexpr index_type default_max_mle_evaluations
Default value of maximum number of evaluations of objective functions in MLE.
polynomial_matrix_type polynomial_matrix_
Matrix of polynomial terms.
RBF rbf_type
Type of the RBF.
DistanceFunction distance_function_type
Type of the distance function.
auto polynomial_coeffs() const noexcept -> const function_value_vector_type &
Get the coefficients for polynomials.
impl::general_spline_equation_solver< kernel_value_type, function_value_type, KernelMatrixType, uses_global_length_parameter > equation_solver_type
Type of the solver of linear equations.
auto kernel_coeffs() const noexcept -> const function_value_vector_type &
Get the coefficients for kernels.
auto length_parameter_calculator() const noexcept -> const length_parameter_calculator_type &
Get the calculator of length parameters.
Variable variable_type
Type of variables.
void fix_length_parameter_scale(kernel_value_type value)
Set the scale of length parameters to a fixed value.
LengthParameterCalculator length_parameter_calculator_type
Type of the calculator of length parameters.
FunctionValue function_value_type
Type of function values.
typename DistanceFunction::value_type kernel_value_type
Type of kernel values.
distance_function_type distance_function_
Distance function.
void compute(const std::vector< variable_type > &variables, const function_value_vector_type &function_values)
Compute parameters for interpolation.
const std::vector< variable_type > * variables_
Variables.
length_parameter_calculator_type length_parameter_calculator_
Calculator of length parameters.
auto distance_function() const noexcept -> const distance_function_type &
Get the distance function.
function_value_vector_type polynomial_coeffs_
Coefficients for polynomials.
Eigen::VectorX< function_value_type > function_value_vector_type
Type of vectors of function values.
static constexpr auto reg_param
Regularization parameter.
Class to interpolate using RBF and polynomials.
Class of Gaussian RBF fornberg2015.
Definition of compute_kernel_matrix function.
Concept of CSRBFs (compactly supported RBFs).
Concept of distance functions.
Concept of calculator of length parameters.
Definition of csrbf concept.
Definition of distance_function concept.
Definition of dividing_rectangles class.
Definition of euclidean_distance_function class.
Definition of exceptions.
Definition of function_object_wrapper class.
Definition of gaussian_rbf class.
Definition of general_spline_equation_solver class.
Definition of get_default_scalar_type type.
Definition of get_size class.
Definition of get_variable_type class.
Definition of global_length_parameter_calculator class.
Definition of index_type type.
Definition of kernel_matrix_type enumeration.
Definition of length_parameter_calculator concept.
Definition of local_length_parameter_calculator class.
Definition of log_tag_view class.
Definition of macros for logging.
#define NUM_COLLECT_LOG_DEBUG(LOGGER,...)
Write a debug log.
Definition of logging_mixin class.
Namespace of definitions common in this project.
std::ptrdiff_t index_type
Type of indices in this library.
auto get_size(const Matrix &matrix) -> index_type
Get the size.
typename get_variable_type< FunctionSignature >::type get_variable_type_t
Get the type of variables from function signature.
Namespace of RBF interpolation.
constexpr auto rbf_polynomial_interpolator_tag
Tag of rbf_polynomial_interpolator.
kernel_matrix_type
Enumeration of types of kernel matrices.
void compute_kernel_matrix(const DistanceFunction &distance_function, const RBF &rbf, LengthParameterCalculator &length_parameter_calculator, const std::vector< typename DistanceFunction::variable_type > &variables, KernelMatrix &kernel_matrix)
Compute a kernel matrix.
rbf_polynomial_interpolator< FunctionSignature, RBF, PolynomialDegree, KernelMatrixType, DistanceFunction, length_parameter_calculators::global_length_parameter_calculator< DistanceFunction > > global_rbf_polynomial_interpolator
Class to interpolate using RBF and polynomials with globally fixed length parameters.
Definition of polynomial_calculator class.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of rbf concept.