I would give the cached matrix a more declarative name than shore_matrix_G. Something like shore_matrix_positive_constraint