mirror of
https://github.com/WallabyLester/RBF-aPID-Controller.git
synced 2026-05-09 20:53:57 +08:00
Implemented weight grabber.
This commit is contained in:
@@ -72,3 +72,12 @@ void RBFModel::adapt(double error, double learningRate, const double* input) {
|
||||
weights[i] += learningRate * error * influence; // Update weight based on error and influence
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the weight at a specific index.
|
||||
*/
|
||||
double RBFModel::get_weight(int index) const {
|
||||
if (index < 0 || index >= numCenters) return 0.0;
|
||||
return weights[index];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user