import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import and...
分类:
其他好文 时间:
2014-12-08 15:34:49
阅读次数:
245
“矩阵代数初步”(Introduction to MATRIX ALGEBRA)课程由Prof. A.K.Kaw(University of South Florida)设计并讲授。PDF格式学习笔记下载(Academia.edu)第5章课程讲义下载(PDF)SummaryConsistent an...
分类:
其他好文 时间:
2014-12-07 06:30:53
阅读次数:
256
Maximal RectangleGiven a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.如果用DP来做,判断(begin...
分类:
其他好文 时间:
2014-12-06 16:44:58
阅读次数:
166
邻接矩阵的存储比邻接表实现起来更加方便,也更加容易理解。
邻接矩阵就是用一个二维数组matrix来存储每两个点的关系。如果两个点m,n之间有边,将数组matrix[]m[m]设为1,否则设为0。
如果有权,则将matrix[m]n[]设为权值,定义一个很大或者很小的数(只要不跟权值冲突即可),表示不相连。
空间复杂度为O(V^2),适合比较稠密的图。
邻接表O(V+E),适合比较稀疏的图。...
分类:
编程语言 时间:
2014-12-06 15:25:28
阅读次数:
255
1. sparse模块的官方document地址:http://docs.scipy.org/doc/scipy/reference/sparse.html
2. sparsematrix的存储形式有很多种,见此帖子http://blog.csdn.net/anshan1984/article/details/8580952
不同的存储形式在sparse模块中对应如下:
bsr_ma...
分类:
其他好文 时间:
2014-12-06 01:26:25
阅读次数:
870
我定义了一个结构体,然后初始化它,结果编译报错no appropriate default constructor available代码如下:struct matrixXvect_func{ thrust::host_vector& matrix; thrust::host_vector& vec...
分类:
移动开发 时间:
2014-12-05 21:04:41
阅读次数:
164
“矩阵代数初步”(Introduction to MATRIX ALGEBRA)课程由Prof. A.K.Kaw(University of South Florida)设计并讲授。PDF格式学习笔记下载(Academia.edu)第4章课程讲义下载(PDF)Summary TransposeLet...
分类:
其他好文 时间:
2014-12-05 07:05:05
阅读次数:
264
MatrixTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 19174Accepted: 7207DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. ...
分类:
编程语言 时间:
2014-12-05 01:56:06
阅读次数:
275
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
参考LeetCode[Array]: Spiral Matrix II的迭代思路,先完成最外环的旋转,然后...
分类:
其他好文 时间:
2014-12-04 21:43:42
阅读次数:
282
哎,真尼玛,网上关于scipy 和 theano的 sparse matrix中的 csc matrix 和 csr matrix太少了,有,也只是使用,并没有说明,那个矩阵是怎么生成的。参考例子:
>>> data = np.asarray([7, 8, 9])
>>> indices = np.asarray([0, 1, 2])
>>> indptr = np.asarray([0, 2,...
分类:
其他好文 时间:
2014-12-04 21:39:59
阅读次数:
291