The current code is quite optimal, but we could optimize further for SparseMatrixCSC by storing here four values (i, j, k1, k2), where k1 is the position in A.nzval of A[i,j] and k2 is the position of A[j,i] in A.nzval.
We should do the same thing for diagonal coefficients here.
The current issue is that I don't know how to use this information if we just want to update one triangle of the Hessian.
The positions in A.nzval are not valid anymore.
The current code is quite optimal, but we could optimize further for
SparseMatrixCSCby storing here four values(i, j, k1, k2), wherek1is the position inA.nzvalofA[i,j]andk2is the position ofA[j,i]inA.nzval.We should do the same thing for diagonal coefficients here.
The current issue is that I don't know how to use this information if we just want to update one triangle of the Hessian.
The positions in
A.nzvalare not valid anymore.