<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello, all:</div><div><br></div><div>Brad and I were discussing offline the potential need for routines that return Hessians and/or Jacobians in some kind of sparse matrix format. One of the outstanding questions is what format these sparse matrices should be in. So Brad asked me to pose the question to the mailing list, and I am doing that now.</div><div><br></div><div>My thought is that one or more of CSC, CSR or triplet format should cover the vast majority of cases, and if not, there are probably conversion routines available. Using CSC as an example, I was thinking something along the lines of:</div><div><br></div><div>void get_sparse_hessian(const Vector<double>& x, const Vector<int>& ipntr, const Vector<int>&jcol, Vector<double>& vals);</div><div><br></div><div>where x is point at which the Hessian is computed, ipntr and jcol are the row indices and column pointers for the CSC format, and vals is the output of the corresponding nonzero elements of the Hessian. x, ipntr and jcol are inputs, and vals is output.</div><div><br></div><div>For hessians, only the elements in the lower triangle would be considered. Not so for Jacobians.</div><div> </div><div>For triplet format, replace ipntr and jcol with row_index and col_index.</div><div><br></div><div>Let the discussion begin!</div><div><br></div><div>Michael</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-------------------------------------------<br>Michael Braun<br>Associate Professor of Management Science (Marketing Group)<br>MIT Sloan School of Management<br>100 Main St.., E62-535<br>Cambridge, MA 02139<br><a href="mailto:braunm@mit.edu">braunm@mit.edu</a><br>617-253-3436</div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></body></html>