mirror of
https://github.com/WallabyLester/RBF-aPID-Controller.git
synced 2026-06-01 03:56:07 +08:00
Implemented weight setter.
This commit is contained in:
@@ -81,3 +81,10 @@ double RBFModel::get_weight(int index) const {
|
|||||||
return weights[index];
|
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;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user