const return value does not make sense for anything but references
parent
b8a5501670
commit
6e35e34ee4
|
@ -165,15 +165,14 @@ void LinearFactorGraph::combine(const LinearFactorGraph &lfg){
|
|||
/** combine two factor graphs */
|
||||
/* ************************************************************************* */
|
||||
|
||||
const LinearFactorGraph LinearFactorGraph::combine2(const LinearFactorGraph& lfg1,
|
||||
const LinearFactorGraph& lfg2) {
|
||||
// create new linear factor graph
|
||||
LinearFactorGraph fg;
|
||||
// set the first linear factor graph
|
||||
fg = lfg1;
|
||||
LinearFactorGraph LinearFactorGraph::combine2(const LinearFactorGraph& lfg1,
|
||||
const LinearFactorGraph& lfg2) {
|
||||
// create new linear factor graph equal to the first one
|
||||
LinearFactorGraph fg = lfg1;
|
||||
|
||||
// add the second factors in the graph
|
||||
for(const_iterator factor=lfg2.factors.begin(); factor!=lfg2.factors.end(); factor++){
|
||||
for (const_iterator factor = lfg2.factors.begin(); factor
|
||||
!= lfg2.factors.end(); factor++) {
|
||||
fg.push_back(*factor);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,13 +93,13 @@ namespace gtsam {
|
|||
FGConfig optimize(const Ordering& ordering);
|
||||
|
||||
/**
|
||||
* combine two factor graphs
|
||||
* static function that combines two factor graphs
|
||||
* @param const &lfg1 Linear factor graph
|
||||
* @param const &lfg2 Linear factor graph
|
||||
* @return a new combined factor graph
|
||||
*/
|
||||
static const LinearFactorGraph combine2(const LinearFactorGraph& lfg1,
|
||||
const LinearFactorGraph& lfg2 ) ;
|
||||
static LinearFactorGraph combine2(const LinearFactorGraph& lfg1,
|
||||
const LinearFactorGraph& lfg2);
|
||||
|
||||
/**
|
||||
* combine two factor graphs
|
||||
|
|
Loading…
Reference in New Issue