sparse matrix
w
https://en.wikipedia.org/wiki/Sparse_matrix
稀疏矩阵存储格式总结+存储效率对比:COO,CSR,DIA,ELL,HYB - Bin的专栏 - 博客园
http://www.cnblogs.com/xbinworld/p/4273506.html
稀疏矩阵的存储格式(Sparse Matrix Storage Formats) - Donkey Vision - 博客频道 - CSDN.NET
http://blog.csdn.net/anshan1984/article/details/8580952
对于很多元素为零的稀疏矩阵,仅存储非零元素可使矩阵操作效率更高。现有许多种稀疏矩阵的存储方式,但是多数采用相同的基本技术,即存储矩阵所有的非零元素到一个线性数组中,并提供辅助数组来描述原数组中非零元素的位置。
稀疏矩阵是指矩阵中的元素大部分是0的矩阵,事实上,实际问题中大规模矩阵基本上都是稀疏矩阵,很多稀疏度在90%甚至99%以上。因此我们需要有高效的稀疏矩阵存储格式。本文总结几种典型的格式:COO,CSR,DIA,ELL,HYB。
下面摘自[2]
6. Skyline Storage Format
The skyline storage format is important for the direct sparse solvers, and it is well suited for Cholesky or LU decomposition when no pivoting is required.
The skyline storage format accepted in Intel MKL can store only triangular matrix or triangular part of a matrix. This format is specified by two arrays:values andpointers. The following table describes these arrays:
- values
-
A scalar array. For a lower triangular matrix it contains the set of elements from each row of the matrix starting from the first non-zero element to and including the diagonal element. For an upper triangular matrix it contains the set of elements from each column of the matrix starting with the first non-zero element down to and including the diagonal element. Encountered zero elements are included in the sets.
- pointers
-
An integer array with dimension(m+1), where m is the number of rows for lower triangle (columns for the upper triangle).pointers(i) -pointers(1)+1gives the index of element invalues that is first non-zero element in row (column)i. The value ofpointers(m+1)is set tonnz+pointers(1), wherennz is the number of elements in the arrayvalues.
7. Block Compressed Sparse Row Format (BSR)
The Intel MKL block compressed sparse row (BSR) format for sparse matrices is specified by four arrays:values,columns,pointerB, andpointerE. The following table describes these arrays.
- values
-
A real array that contains the elements of the non-zero blocks of a sparse matrix. The elements are stored block-by-block in row-major order. A non-zero block is the block that contains at least one non-zero element. All elements of non-zero blocks are stored, even if some of them is equal to zero. Within each non-zero block elements are stored in column-major order in the case of one-based indexing, and in row-major order in the case of the zero-based indexing.
- columns
-
Element i of the integer array columns is the number of the column in the block matrix that contains thei-th non-zero block.
- pointerB
-
Element j of this integer array gives the index of the element in thecolumns array that is first non-zero block in a rowj of the block matrix.
- pointerE
-
Element j of this integer array gives the index of the element in thecolumns array that contains the last non-zero block in a rowj of the block matrix plus 1.
[1] Sparse Matrix Representations & Iterative Solvers, Lesson 1 by Nathan Bell. http://www.bu.edu/pasi/files/2011/01/NathanBell1-10-1000.pdf
[2] http://blog.csdn.net/anshan1984/article/details/8580952
[3] http://zhangjunhd.github.io/2014/09/29/sparse-matrix.html
[4] http://www.360doc.com/content/09/0204/17/96202_2458312.shtml
[5] Implementing Sparse Matrix-Vector Multiplication on Throughput-Oriented Processors, Nathan Bell and Michael Garland, Proceedings of Supercomputing '09
[6] Efficient Sparse Matrix-Vector Multiplication on CUDA, Nathan Bell and Michael Garland, NVIDIA Technical Report NVR-2008-004, December 2008
sparse matrix的更多相关文章
- 311. Sparse Matrix Multiplication
题目: Given two sparse matrices A and B, return the result of AB. You may assume that A's column numbe ...
- 用R的dgCMatrix包来构建稀疏矩阵 | sparse matrix by dgCMatrix
sparse matrix是用来存储大型稀疏矩阵用得,单细胞表达数据基本都用这个格式来存储,因为单细胞很大部分都是0,用普通文本矩阵存储太占空间. 使用也是相当简单: library("Ma ...
- [leetcode]311. Sparse Matrix Multiplication 稀疏矩阵相乘
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is ...
- 稀疏矩阵乘法 · Sparse Matrix Multiplication
[抄题]: 给定两个 稀疏矩阵 A 和 B,返回AB的结果.您可以假设A的列数等于B的行数. [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: 如果为零则不相乘,优化常数的复杂 ...
- sparse matrix format
see Spare Matrix wikipedia item, and scipy's documentation on different choices of sparse matrix typ ...
- Sparse Matrix Multiplication
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is ...
- [LeetCode] Sparse Matrix Multiplication 稀疏矩阵相乘
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is ...
- [LeetCode] Sparse Matrix Multiplication
Problem Description: Given two sparse matrices A and B, return the result of AB. You may assume that ...
- [Locked] Sparse Matrix Multiplication
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is ...
随机推荐
- 【Java】Java_12 Eclipse
1.eclipse简介 Eclipse 是一个开放源代码的.基于Java的可扩展开发平台.就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境. 尽管 Eclipse 是使用Java语 ...
- Spring 对没有实现接口的类使用aspect的时候,可以使用CGLIB
AspectJ中使用CGLIB 在spring中,当对没有实现接口的类使用aspect的时候,可以使用CGLIB, <aop:aspectj-autoproxy proxy-target-cla ...
- LoadRunner监控tomcat
LoadRunner监控tomcat (2012-10-25 14:01:42)转载▼ double atof (const char * string);Action(){ // 保存JVM内 ...
- javascript中的正則表達式
对文本数据进行操作是JavaScript中常见的任务.正則表達式通过同意程序猿指定字符串匹配的模式来简化诸如验证表单中输入是否具有正确格式之类的任务. 1.正則表達式标记: 字符 含义 举例 i 大写 ...
- 关于升级 phpStudy 中 MySQL 版本至 5.7.17
mysql版本低于5.6 自动更新时间会报错.因此要升级mysql版本.综合网上资料和实际过程中遇到的问题,具体细节和注意事项如下: 1.从官网上下载高版本的 MySQL :https://dev.m ...
- php 按汉字首字母查询[转载]
<?php function getfirstchar($s0){ //获取单个汉字拼音首字母.注意:此处不要纠结.汉字拼音是没有以U和V开头的 $fchar = ord($s0{0}); if ...
- I2S与pcm的区别
I2S仅仅是PCM的一个分支,接口定义都是一样的, I2S的采样频率一般为44.1KHZ和48KHZ做,PCM采样频率一般为8K,16K.有四组信号: 位时钟信号,同步信号,数据输入,数据输出. I2 ...
- java包命名规则
package indi/onem.发起者名.项目名.模块名... package pers.个人名.项目名.模块名... package priv.个人名.项目名.模块名... package te ...
- 高分辨率转HTML成PDF(ephtmltopdf.dll)
今天看到园友分享的 wkhtmtopdf--高分辨率转HTML成PDF(三) 想起我做 一键保存网页为PDF_V1.2 的时候,也研究过一段时间这个,一开始也看的是wkhtmltopdf,不过发现wk ...
- 华为终端开放实验室Android P Beta 4测试能力上线
7月26日,Android P Beta 4发布(即Android P DP5),此版本为开发者最后一个预览版本,也预示着Android P正式版即将与大家见面. 为保证开发者在正式版本来临前做好充分 ...