diff --git a/CPP_Implementation/rbf_model.cpp b/CPP_Implementation/rbf_model.cpp index a1b6782..8c7c27c 100644 --- a/CPP_Implementation/rbf_model.cpp +++ b/CPP_Implementation/rbf_model.cpp @@ -81,3 +81,10 @@ double RBFModel::get_weight(int index) const { return weights[index]; } +/** + * @brief Set the weight at a specific index. + */ +void RBFModel::set_weight(int index, double value) { + if (index < 0 || index >= numCenters) return; + weights[index] = value; +}