66template <
typename FunctionSignature,
89template <
typename Variable,
typename FunctionValue,
concepts::rbf RBF,
93 requires std::is_same_v<Variable,
94 typename DistanceFunction::variable_type> &&
95 std::is_same_v<
typename DistanceFunction::value_type,
96 typename RBF::scalar_type> &&
97 std::is_same_v<DistanceFunction,
98 typename LengthParameterCalculator::distance_function_type>
100 DistanceFunction, LengthParameterCalculator>
120 length_parameter_calculator_type::uses_global_length_parameter;
132 typename kernel_matrix_solver_type::kernel_matrix_type;
180 for (std::size_t i = 0; i <
variables_->size(); ++i) {
186 if (distance_rate < rbf_type::support_boundary()) {
220 const std::vector<variable_type>&
variables,
227 auto objective_function =
241 using objective_function_object_type =
decltype(objective_function);
242 using objective_function_wrapper_type =
244 objective_function_object_type>;
245 using optimizer_type =
248 optimizer_type optimizer{
249 objective_function_wrapper_type{objective_function}};
253 optimizer.max_evaluations(max_mle_evaluations);
254 optimizer.init(lower_boundary, upper_boundary);
260 "Selected an optimized scale of length parameters: {}", scale);
296 [[nodiscard]]
auto coeffs() const noexcept
360template <
typename FunctionSignature,
362 rbfs::gaussian_rbf<impl::get_default_scalar_type<FunctionSignature>>,
364 concepts::distance_function DistanceFunction =
365 distance_functions::euclidean_distance_function<
368 rbf_interpolator<FunctionSignature, RBF, KernelMatrixType, DistanceFunction,
381template <
typename FunctionSignature,
389 rbf_interpolator<FunctionSignature, RBF, KernelMatrixType, DistanceFunction,
402template <
typename FunctionSignature,
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.
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.
const std::vector< variable_type > * variables_
Variables.
kernel_matrix_type kernel_matrix_
Kernel matrix.
auto coeffs() const noexcept -> const function_value_vector_type &
Get the coefficients for samples points.
static constexpr auto reg_param
Regularization parameter.
static constexpr bool uses_global_length_parameter
Whether this calculator uses the globally fixed length parameters.
distance_function_type distance_function_
Distance function.
Eigen::VectorX< function_value_type > function_value_vector_type
Type of vectors of function values.
static constexpr index_type default_max_mle_evaluations
Default value of maximum number of evaluations of objective functions in MLE.
DistanceFunction distance_function_type
Type of the distance function.
LengthParameterCalculator length_parameter_calculator_type
Type of the calculator of length parameters.
rbf_interpolator(distance_function_type distance_function=distance_function_type(), rbf_type rbf=rbf_type())
Constructor.
length_parameter_calculator_type length_parameter_calculator_
Calculator of length parameters.
typename DistanceFunction::value_type kernel_value_type
Type of kernel values.
function_value_vector_type coeffs_
Coefficients for sample points.
typename kernel_matrix_solver_type::kernel_matrix_type kernel_matrix_type
Type of kernel matrices.
auto variables() const noexcept -> const std::vector< variable_type > &
Get the variables.
void compute(const std::vector< variable_type > &variables, const function_value_vector_type &function_values)
Compute parameters for interpolation.
RBF rbf_type
Type of the RBF.
void fix_length_parameter_scale(kernel_value_type value)
Set the scale of length parameters to a fixed value.
Variable variable_type
Type of variables.
kernel_matrix_solver_type kernel_matrix_solver_
Solver of the linear equation of kernel matrix.
auto interpolate(const variable_type &variable) const -> function_value_type
Interpolate for a variable.
auto length_parameter_calculator() const noexcept -> const length_parameter_calculator_type &
Get the calculator of length parameters.
impl::kernel_matrix_solver< kernel_value_type, function_value_type, KernelMatrixType, uses_global_length_parameter > kernel_matrix_solver_type
Type of the solver of the linear equation of kernel matrix.
auto rbf() const noexcept -> const rbf_type &
Get the RBF.
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.
auto kernel_matrix_solver() const noexcept -> const kernel_matrix_solver_type &
Get the solver of the linear equation of kernel matrix.
auto distance_function() const noexcept -> const distance_function_type &
Get the distance function.
FunctionValue function_value_type
Type of function values.
Class to interpolate using RBF.
Class of Gaussian RBF fornberg2015.
Class of Wendland's Compactly Supported RBF wendland1995.
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 function_object_wrapper class.
Definition of gaussian_rbf class.
Definition of get_default_scalar_type type.
Definition of get_variable_type class.
Definition of global_length_parameter_calculator class.
Definition of index_type type.
Definition of kernel_matrix_solver class.
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.
typename get_variable_type< FunctionSignature >::type get_variable_type_t
Get the type of variables from function signature.
typename distance_functions::euclidean_distance_function< impl::get_variable_type_t< FunctionSignature > >::value_type get_default_scalar_type
Get the default type of scalars from function signature.
Namespace of RBF interpolation.
rbf_interpolator< FunctionSignature, RBF, KernelMatrixType, DistanceFunction, length_parameter_calculators::global_length_parameter_calculator< DistanceFunction > > global_rbf_interpolator
Class to interpolate using RBF with globally fixed length parameters.
kernel_matrix_type
Enumeration of types of kernel matrices.
rbf_interpolator< FunctionSignature, RBF, kernel_matrix_type::sparse, DistanceFunction, length_parameter_calculators::local_length_parameter_calculator< DistanceFunction > > local_csrbf_interpolator
Class to interpolate using compactly supported RBF with length parameters localized for sample points...
rbf_interpolator< FunctionSignature, RBF, KernelMatrixType, DistanceFunction, length_parameter_calculators::local_length_parameter_calculator< DistanceFunction > > local_rbf_interpolator
Class to interpolate using RBF with length parameters localized for sample points.
constexpr auto rbf_interpolator_tag
Tag of rbf_interpolator.
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.
Definition of rbf concept.
Definition of wendland_csrbf class.