5% speedup by using faster setAllZero
							parent
							
								
									d8b75f6bd0
								
							
						
					
					
						commit
						02c8f02a10
					
				|  | @ -256,11 +256,16 @@ namespace gtsam { | |||
|       full().triangularView<Eigen::Upper>() = xpr.template triangularView<Eigen::Upper>(); | ||||
|     } | ||||
| 
 | ||||
|     /// Set the entire active matrix zero.
 | ||||
|     /// Set the entire *active* matrix zero.
 | ||||
|     void setZero() { | ||||
|       full().triangularView<Eigen::Upper>().setZero(); | ||||
|     } | ||||
| 
 | ||||
|     /// Set entire matrix zero.
 | ||||
|     void setAllZero() { | ||||
|       matrix_.setZero(); | ||||
|     } | ||||
| 
 | ||||
|     /// Negate the entire active matrix.
 | ||||
|     void negate(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -245,7 +245,7 @@ HessianFactor::HessianFactor(const GaussianFactorGraph& factors, | |||
| 
 | ||||
|   // Form A' * A
 | ||||
|   gttic(update); | ||||
|   info_.setZero(); | ||||
|   info_.setAllZero(); | ||||
|   for(const auto& factor: factors) | ||||
|     if (factor) | ||||
|       factor->updateHessian(keys_, &info_); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue