change few function parameters to const reference to improve preformance of TransformBtwRobot factors
parent
f4dc6a3a95
commit
e06c2cfacc
|
@ -68,7 +68,7 @@ namespace gtsam {
|
|||
|
||||
/** Constructor */
|
||||
TransformBtwRobotsUnaryFactor(Key key, const VALUE& measured, Key keyA, Key keyB,
|
||||
const gtsam::Values valA, const gtsam::Values valB,
|
||||
const gtsam::Values& valA, const gtsam::Values& valB,
|
||||
const SharedGaussian& model) :
|
||||
Base(cref_list_of<1>(key)), key_(key), measured_(measured), keyA_(keyA), keyB_(keyB),
|
||||
model_(model){
|
||||
|
@ -111,7 +111,7 @@ namespace gtsam {
|
|||
/** implement functions needed to derive from Factor */
|
||||
|
||||
/* ************************************************************************* */
|
||||
void setValAValB(const gtsam::Values valA, const gtsam::Values valB){
|
||||
void setValAValB(const gtsam::Values& valA, const gtsam::Values& valB){
|
||||
if ( (!valA.exists(keyA_)) && (!valB.exists(keyA_)) && (!valA.exists(keyB_)) && (!valB.exists(keyB_)) )
|
||||
throw("something is wrong!");
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace gtsam {
|
|||
|
||||
/** Constructor */
|
||||
TransformBtwRobotsUnaryFactorEM(Key key, const VALUE& measured, Key keyA, Key keyB,
|
||||
const gtsam::Values valA, const gtsam::Values valB,
|
||||
const gtsam::Values& valA, const gtsam::Values& valB,
|
||||
const SharedGaussian& model_inlier, const SharedGaussian& model_outlier,
|
||||
const double prior_inlier, const double prior_outlier,
|
||||
const bool flag_bump_up_near_zero_probs = false,
|
||||
|
@ -132,7 +132,7 @@ namespace gtsam {
|
|||
/** implement functions needed to derive from Factor */
|
||||
|
||||
/* ************************************************************************* */
|
||||
void setValAValB(const gtsam::Values valA, const gtsam::Values valB){
|
||||
void setValAValB(const gtsam::Values& valA, const gtsam::Values& valB){
|
||||
if ( (!valA.exists(keyA_)) && (!valB.exists(keyA_)) && (!valA.exists(keyB_)) && (!valB.exists(keyB_)) )
|
||||
throw("something is wrong!");
|
||||
|
||||
|
|
Loading…
Reference in New Issue