undo C++ changes and add additional reInitialize method
parent
8533ae80b6
commit
582d67eea4
|
@ -127,7 +127,7 @@ class Experiment {
|
||||||
auto bayesNet = linearized->eliminateSequential();
|
auto bayesNet = linearized->eliminateSequential();
|
||||||
HybridValues delta = bayesNet->optimize();
|
HybridValues delta = bayesNet->optimize();
|
||||||
initial_ = initial_.retract(delta.continuous());
|
initial_ = initial_.retract(delta.continuous());
|
||||||
smoother_.reInitialize(*bayesNet);
|
smoother_.reInitialize(std::move(*bayesNet));
|
||||||
clock_t afterUpdate = clock();
|
clock_t afterUpdate = clock();
|
||||||
std::cout << "Took " << (afterUpdate - beforeUpdate) / CLOCKS_PER_SEC
|
std::cout << "Took " << (afterUpdate - beforeUpdate) / CLOCKS_PER_SEC
|
||||||
<< " seconds." << std::endl;
|
<< " seconds." << std::endl;
|
||||||
|
|
|
@ -49,8 +49,16 @@ class GTSAM_EXPORT HybridSmoother {
|
||||||
/**
|
/**
|
||||||
* Re-initialize the smoother from a new hybrid Bayes Net.
|
* Re-initialize the smoother from a new hybrid Bayes Net.
|
||||||
*/
|
*/
|
||||||
|
void reInitialize(HybridBayesNet&& hybridBayesNet) {
|
||||||
|
hybridBayesNet_ = std::move(hybridBayesNet);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-initialize the smoother from
|
||||||
|
* a new hybrid Bayes Net (non rvalue version).
|
||||||
|
*/
|
||||||
void reInitialize(HybridBayesNet& hybridBayesNet) {
|
void reInitialize(HybridBayesNet& hybridBayesNet) {
|
||||||
hybridBayesNet_ = hybridBayesNet;
|
this->reInitialize(std::move(hybridBayesNet));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue