Fix compilation issues
							parent
							
								
									c659336cf8
								
							
						
					
					
						commit
						910f879a0b
					
				|  | @ -264,7 +264,7 @@ void SubgraphPreconditioner::build(const GaussianFactorGraph &gfg, const KeyInfo | |||
|   auto gfg_subgraph = buildFactorSubgraph(gfg, subgraph, true); | ||||
| 
 | ||||
|   /* factorize and cache BayesNet */ | ||||
|   Rc1_ = gfg_subgraph.eliminateSequential(); | ||||
|   Rc1_ = *gfg_subgraph.eliminateSequential(); | ||||
| } | ||||
| 
 | ||||
| /*****************************************************************************/ | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ SubgraphSolver::SubgraphSolver(const GaussianFactorGraph &Ab, | |||
|     cout << "Split A into (A1) " << Ab1.size() << " and (A2) " << Ab2.size() | ||||
|          << " factors" << endl; | ||||
| 
 | ||||
|   auto Rc1 = Ab1.eliminateSequential(ordering, EliminateQR); | ||||
|   auto Rc1 = *Ab1.eliminateSequential(ordering, EliminateQR); | ||||
|   auto xbar = Rc1.optimize(); | ||||
|   pc_ = boost::make_shared<SubgraphPreconditioner>(Ab2, Rc1, xbar); | ||||
| } | ||||
|  | @ -62,7 +62,7 @@ SubgraphSolver::SubgraphSolver(const GaussianFactorGraph &Ab1, | |||
|                                const GaussianFactorGraph &Ab2, | ||||
|                                const Parameters ¶meters, | ||||
|                                const Ordering &ordering) | ||||
|     : SubgraphSolver(Ab1.eliminateSequential(ordering, EliminateQR), Ab2, | ||||
|     : SubgraphSolver(*Ab1.eliminateSequential(ordering, EliminateQR), Ab2, | ||||
|                      parameters) {} | ||||
| 
 | ||||
| /**************************************************************************************************/ | ||||
|  |  | |||
|  | @ -77,7 +77,7 @@ TEST(SubgraphPreconditioner, planarGraph) { | |||
|   DOUBLES_EQUAL(0, error(A, xtrue), 1e-9);  // check zero error for xtrue
 | ||||
| 
 | ||||
|   // Check that xtrue is optimal
 | ||||
|   GaussianBayesNet R1 = A.eliminateSequential(); | ||||
|   GaussianBayesNet R1 = *A.eliminateSequential(); | ||||
|   VectorValues actual = R1.optimize(); | ||||
|   EXPECT(assert_equal(xtrue, actual)); | ||||
| } | ||||
|  | @ -96,7 +96,7 @@ TEST(SubgraphPreconditioner, splitOffPlanarTree) { | |||
|   LONGS_EQUAL(4, C.size()); | ||||
| 
 | ||||
|   // Check that the tree can be solved to give the ground xtrue
 | ||||
|   GaussianBayesNet R1 = T.eliminateSequential(); | ||||
|   GaussianBayesNet R1 = *T.eliminateSequential(); | ||||
|   VectorValues xbar = R1.optimize(); | ||||
|   EXPECT(assert_equal(xtrue, xbar)); | ||||
| } | ||||
|  | @ -115,7 +115,7 @@ TEST(SubgraphPreconditioner, system) { | |||
| 
 | ||||
|   // Eliminate the spanning tree to build a prior
 | ||||
|   const Ordering ord = planarOrdering(N); | ||||
|   auto Rc1 = Ab1.eliminateSequential(ord);  // R1*x-c1
 | ||||
|   auto Rc1 = *Ab1.eliminateSequential(ord);  // R1*x-c1
 | ||||
|   VectorValues xbar = Rc1.optimize();       // xbar = inv(R1)*c1
 | ||||
| 
 | ||||
|   // Create Subgraph-preconditioned system
 | ||||
|  | @ -279,7 +279,7 @@ TEST(SubgraphPreconditioner, conjugateGradients) { | |||
|   boost::tie(Ab1, Ab2) = splitOffPlanarTree(N, Ab); | ||||
| 
 | ||||
|   // Eliminate the spanning tree to build a prior
 | ||||
|   GaussianBayesNet Rc1 = Ab1.eliminateSequential();  // R1*x-c1
 | ||||
|   GaussianBayesNet Rc1 = *Ab1.eliminateSequential();  // R1*x-c1
 | ||||
|   VectorValues xbar = Rc1.optimize();  // xbar = inv(R1)*c1
 | ||||
| 
 | ||||
|   // Create Subgraph-preconditioned system
 | ||||
|  |  | |||
|  | @ -123,7 +123,7 @@ TEST( SubgraphSolver, constructor3 ) | |||
|   std::tie(Ab1, Ab2) = example::splitOffPlanarTree(N, Ab); | ||||
| 
 | ||||
|   // The caller solves |A1*x-b1|^2 == |R1*x-c1|^2, where R1 is square UT
 | ||||
|   auto Rc1 = Ab1.eliminateSequential(); | ||||
|   auto Rc1 = *Ab1.eliminateSequential(); | ||||
| 
 | ||||
|   // The third constructor allows the caller to pass an already solved preconditioner Rc1_
 | ||||
|   // as a Bayes net, in addition to the "loop closing constraints" Ab2, as before
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue