多维稀疏矩阵压缩 [英] multi-dimensional Sparse Matrix Compression
问题描述
任何人都可以建议一个很好的C ++库来存储多维稀疏矩阵,该库专注于矩阵中数据的压缩.矩阵的维数很大(例如80维).任何帮助都是最欢迎的:).
Can anybody suggest a good C++ library for storing Multi-dimensional Sparse Matrix that focuses on the compression of data in matrix. The number of dimensions of the matrix will be huge (say, 80 dimensions). Any help is most welcome :).
矩阵非常稀疏,大约为0.0000001(或)1x10 -6 .
The matrix is highly sparse, in the order of 0.0000001 (or) 1x10-6.
推荐答案
在C#中,我使用了键值对或字典"来存储稀疏填充的数组.我认为对于80维,您将必须构造一个基于字符串的密钥.使用单个函数创建密钥,所有密钥应保持一致.只需连接以逗号分隔的尺寸列表即可.不幸的是,我不知道一个好的密钥对,即c ++的字典库.如果您以前曾使用过STL,则可能会使用STL,但我不建议这样做.
In c# I have used key value pairs or "dictionaries" to store sparse populated arrays. I think for 80 dimensions you would have to construct a string based key. Use a single function to create the key it should all remain consistent. Simply concatenate a comma separated list of the dimensions. Unfortunately I'm not aware of a good key pair, dictionary library for c++. Possibly STL if you have used it before but I would not recommend it otherwise.
这篇关于多维稀疏矩阵压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!