[CppAD] Format for sparse Jacobians/Hessians

Michael Braun braunm at mit.edu
Sat Jan 7 21:32:49 EST 2012


Hello, all:

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.

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:

void get_sparse_hessian(const Vector<double>& x, const Vector<int>& ipntr, const Vector<int>&jcol, Vector<double>& vals);

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.

For hessians, only the elements in the lower triangle would be considered.  Not so for Jacobians.
  
For triplet format, replace ipntr and jcol with row_index and col_index.

Let the discussion begin!

Michael






-------------------------------------------
Michael Braun
Associate Professor of Management Science (Marketing Group)
MIT Sloan School of Management
100 Main St.., E62-535
Cambridge, MA 02139
braunm at mit.edu
617-253-3436




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cppad/attachments/20120107/5fd43b9d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1844 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/cppad/attachments/20120107/5fd43b9d/attachment.p7s>


More information about the CppAD mailing list