|
libflame revision_anchor
|
Functions | |
| FLA_Error | FLASH_Obj_shift_diagonal (FLA_Conj conj, FLA_Obj sigma, FLA_Obj H) |
References FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_shift_diagonal(), FLASH_Obj_create_flat_copy_of_hier(), and FLASH_Obj_hierarchify().
{
FLA_Obj F;
// Exit early if one dimension is zero.
if ( FLA_Obj_has_zero_dim( H ) ) return FLA_SUCCESS;
// Create a temporary flat copy of the hierarchical object.
FLASH_Obj_create_flat_copy_of_hier( H, &F );
// Shift the diagonal of the flat matrix object by sigma.
FLA_Obj_shift_diagonal( conj, sigma, F );
// Copy the flat object's contents back to the hierarchical object.
FLASH_Obj_hierarchify( F, H );
// Free the temporary flat object.
FLA_Obj_free( &F );
return FLA_SUCCESS;
}
1.7.4