small bug fixes
							parent
							
								
									2945832086
								
							
						
					
					
						commit
						89a61305eb
					
				| 
						 | 
					@ -68,11 +68,12 @@ public:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /** Constructor from a frontal variable and an iterator range of parents */
 | 
					  /** Constructor from a frontal variable and an iterator range of parents */
 | 
				
			||||||
  template<typename Iterator>
 | 
					  template<typename Iterator>
 | 
				
			||||||
  static Conditional::shared_ptr FromRange(Index key, Iterator firstParent, Iterator lastParent) : nrFrontals_(1) {
 | 
					  static Conditional::shared_ptr FromRange(Index key, Iterator firstParent, Iterator lastParent) {
 | 
				
			||||||
    Conditional::shared_ptr conditional(new Conditional);
 | 
					    Conditional::shared_ptr conditional(new Conditional);
 | 
				
			||||||
 | 
					    conditional->nrFrontals_ = 1;
 | 
				
			||||||
    conditional->keys_.push_back(key);
 | 
					    conditional->keys_.push_back(key);
 | 
				
			||||||
    std::copy(firstKey, lastKey, back_inserter(conditional->keys_));
 | 
					    std::copy(firstParent, lastParent, back_inserter(conditional->keys_));
 | 
				
			||||||
    return ret;
 | 
					    return conditional;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /** Named constructor from any number of frontal variables and parents */
 | 
					  /** Named constructor from any number of frontal variables and parents */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ Inference::EliminateOneSymbolic(FactorGraph<Factor>& factorGraph, VariableIndex<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Join the factors and eliminate the variable from the joint factor
 | 
					    // Join the factors and eliminate the variable from the joint factor
 | 
				
			||||||
    tic("EliminateOne: Combine");
 | 
					    tic("EliminateOne: Combine");
 | 
				
			||||||
    Conditional::shared_ptr conditional = Conditional::fromRange(involvedKeys.begin(), involvedKeys.end(), 1);
 | 
					    Conditional::shared_ptr conditional = Conditional::FromRange(involvedKeys.begin(), involvedKeys.end(), 1);
 | 
				
			||||||
    Factor::shared_ptr eliminated(new Factor(conditional->beginParents(), conditional->endParents()));
 | 
					    Factor::shared_ptr eliminated(new Factor(conditional->beginParents(), conditional->endParents()));
 | 
				
			||||||
    toc("EliminateOne: Combine");
 | 
					    toc("EliminateOne: Combine");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue