#include <skiing.h>
Public Member Functions | |
| Skiing (struct skiing_spec &s) | |
| Initializes skiing object with the given skiing spec. | |
| Skiing (double tao_val, double m_f, double resort, double ratio) | |
| Initializes skiing object with the given skiing values. | |
| double | getMFactor () |
| Returns m factor. | |
| double | getAccCost () |
| Returns accumulated cost value. | |
| double | getResortCost () |
| Returns resort cost value. | |
| void | updateAccCost (double waste_time) |
| Updates accumulated cost with incremental update time. | |
| bool | shouldResort () |
| Checks whether hazy should resort or not. | |
| void | doResort (double time_to_resort) |
| This method informs skiing that a resort has occurred. | |
| void | setSVMBaseline (double baseline) |
| Updates svm baseline time. | |
| double | getSVMBaselineUpdate () |
| Returns svm baseline time. | |
Private Member Functions | |
| void | resetAccCost () |
| Resets accumulated cost to 0. | |
| void | updateResortCost (double res_cost) |
| Updates resort cost with given resort cost. | |
| double | adjustCost (double cost) |
| Performs the baseline adjustment If iteration is right after resort, then we set this cost as baseline and return it Else, we return adjusted cost. | |
| void | setup () |
| Initializes class members. | |
Private Attributes | |
| double | tao |
| tao | |
| double | m_factor |
| m factor of dataset | |
| double | acc_cost |
| accumulated cost | |
| double | resort_cost |
| resort cost | |
| double | ratio |
| alpha ratio | |
| double | svm_baseline_update |
| svm baseline update (updating external table right after sort) | |
| bool | firstAfterResort |
| Keeps whether the current iteration is right after resort or not. | |
| Skiing::Skiing | ( | struct skiing_spec & | s | ) | [inline] |
Initializes skiing object with the given skiing spec.
| [in] | s | skiing spec |
| Skiing::Skiing | ( | double | tao_val, | |
| double | m_f, | |||
| double | resort, | |||
| double | ratio | |||
| ) | [inline] |
Initializes skiing object with the given skiing values.
| [in] | tao_val | tao value |
| [in] | m_f | m factor |
| [in] | resort | initial resort cost |
| [in] | ratio | alpha |
| double Skiing::adjustCost | ( | double | cost | ) | [inline, private] |
Performs the baseline adjustment If iteration is right after resort, then we set this cost as baseline and return it Else, we return adjusted cost.
| [in] | cost | iteration cost |
| void Skiing::doResort | ( | double | time_to_resort | ) | [inline] |
This method informs skiing that a resort has occurred.
| [in] | time_to_resort | how long the resort has taken. |
| double Skiing::getAccCost | ( | ) | [inline] |
Returns accumulated cost value.
| double Skiing::getMFactor | ( | ) | [inline] |
Returns m factor.
| double Skiing::getResortCost | ( | ) | [inline] |
Returns resort cost value.
| double Skiing::getSVMBaselineUpdate | ( | ) | [inline] |
Returns svm baseline time.
| void Skiing::resetAccCost | ( | ) | [inline, private] |
Resets accumulated cost to 0.
| void Skiing::setSVMBaseline | ( | double | baseline | ) | [inline] |
Updates svm baseline time.
| void Skiing::setup | ( | ) | [inline, private] |
Initializes class members.
| bool Skiing::shouldResort | ( | ) | [inline] |
Checks whether hazy should resort or not.
| void Skiing::updateAccCost | ( | double | waste_time | ) | [inline] |
Updates accumulated cost with incremental update time.
| void Skiing::updateResortCost | ( | double | res_cost | ) | [inline, private] |
Updates resort cost with given resort cost.
| [in] | res_cost | new resort cost |
double Skiing::acc_cost [private] |
accumulated cost
bool Skiing::firstAfterResort [private] |
Keeps whether the current iteration is right after resort or not.
double Skiing::m_factor [private] |
m factor of dataset
double Skiing::ratio [private] |
alpha ratio
double Skiing::resort_cost [private] |
resort cost
double Skiing::svm_baseline_update [private] |
svm baseline update (updating external table right after sort)
double Skiing::tao [private] |
tao
1.4.7