Triplet Format for Sparse Matrices
2015-05-16 00:38
323 查看
原网站http://www.coin-or.org/Ipopt/documentation/node37.html
Triplet Format for Sparse Matrices
IPOPT was designed for optimizing large sparse nonlinear programs. Because of problem sparsity, the required matrices(like the constraints Jacobian or Lagrangian Hessian) are not stored as dense matrices, but rather in a sparse matrix format. For the tutorials in this document, we use the triplet format. Consider the matrix
(14) |
floating
point numbers, where many entries would be zero. In triplet format, however, only the nonzero entries are stored. The triplet format records the row number, the column number, and the value of all nonzero entries in the matrix. For the matrix above, this means
storing
integers for the rows,
integers
for the columns, and
floating point numbers for the values.
While this does not seem like a huge space saving over the
floating
point numbers stored in the dense representation, for larger matrices, the space savings are very dramatic24.
The parameter index_style in get_nlp_info tells IPOPT if you prefer to use C style indexing (0-based, i.e., starting the counting at 0) for the row and column indices or Fortran
style (1-based). Tables 3 and 4 below show the triplet
format for both indexing styles, using the example matrix (14).
|
|
The Hessian of the Lagrangian is a symmetric matrix. In the case of a symmetric matrix, you only need to specify the lower left triangular part (or, alternatively, the upper right triangular part). For example,
given the matrix,
(15) |
|
|
Footnotes
For anmatrix, the dense representation grows
with the the square of
, while the sparse representation grows
linearly in the number of nonzeros.
Next: The Smart Pointer Implementation: Up: Introduction
to IPOPT: APrevious: Diagnostic Tags for IPOPT Contents
相关文章推荐
- 论文笔记:Sparse Matrix Format Selection with Multiclass SVM for SpMV on GPU
- Improving Multi-frame Data Association with Sparse Representations for Robust Near-online Multi-ob
- java.lang.NumberFormatException: For input string:
- 九度题目1001:A+B for Matrices
- [quote]HowTo Format Date For Display or Use In a Shell Script
- Rocchio算法测试测试集时出错:Incompatible dimension for X and Y matrices: X.shape[1]
- 异常代码,抛出:java.lang.NumberFormatException: For input string 解决。
- SQLlite.CodeFirst模式出现FullUri format is currently only supported for :memory:.
- RTP Payload Format for the 1998 Version of ITU-T Rec. H.263 Video (H.263+) [RFC2429]
- 【论文】Triplet-Center Loss for Multi-View 3D Object
- Data format for the interchange of fingerprint
- NSDateFormatter setDateFormat 自定义日期/时间格式
- 题目1001:A+B for Matrices
- Compressed Format For Linux
- Valid format values for declare-styleable/attr tags[转]
- java.lang.NumberFormatException: For input string: "undefined"
- [Exception记录]elephantbird.class.for.MultiInputFormat
- mybatis java.lang.NumberFormatException: For input string: "G"
- Zhejiang University----A+B for Matrices
- 分布式稀疏矩阵的数据结构(data structure for distributed sparse matrix)