Working and tested implementation of hessianBlockDiagonal
							parent
							
								
									6e4433f589
								
							
						
					
					
						commit
						7abcd81150
					
				| 
						 | 
				
			
			@ -366,6 +366,12 @@ VectorValues HessianFactor::hessianDiagonal() const {
 | 
			
		|||
/* ************************************************************************* */
 | 
			
		||||
map<Key,Matrix> HessianFactor::hessianBlockDiagonal() const {
 | 
			
		||||
  map<Key,Matrix> blocks;
 | 
			
		||||
  // Loop over all variables
 | 
			
		||||
  for (DenseIndex j = 0; j < (DenseIndex)size(); ++j) {
 | 
			
		||||
    // Get the diagonal block, and insert it
 | 
			
		||||
    Matrix B = info_(j, j).selfadjointView();
 | 
			
		||||
    blocks.insert(make_pair(keys_[j],B));
 | 
			
		||||
  }
 | 
			
		||||
  return blocks;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue