码迷,mamicode.com
首页 >  
搜索关键字:matrix factorization    ( 4370个结果
幂迭代法求特征值和特征向量
幂迭代法求第k大的特征值和特征向量 数学表述 设矩阵A $$ A = \left[ \begin{matrix} X_{11}&\ldots&X_{1n} \newline X_{21} & \ldots& X_{2n} \newline &\vdots& \newline X_{n1}&\ldot ...
分类:其他好文   时间:2020-01-29 14:18:12    阅读次数:274
1329. Sort the Matrix Diagonally
Given a m * n matrix mat of integers, sort it diagonally in ascending order from the top-left to the bottom-right then return the sorted array. Exampl ...
分类:其他好文   时间:2020-01-29 10:17:46    阅读次数:61
poj 2155 Matrix
Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 36547 Accepted: 13109 Description Given an N*N matrix A, whose elements are either 0 ...
分类:其他好文   时间:2020-01-28 23:01:20    阅读次数:73
59. 螺旋矩阵 II
给定一个正整数 n,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的正方形矩阵。 本题思路:先生成一个 n^2的矩阵,定义上下左右四个边界变量 1.本题最精妙的地方就是 边界的迭代刚好与矩阵中数字填入顺序相同 for i in range(l,r+1): for i in rang ...
分类:其他好文   时间:2020-01-28 21:22:15    阅读次数:73
python面试题六: 剑指offer
面试题3 二维数组中的查找 LeetCode题目:二维数组中,每行从左到右递增,每列从上到下递增,给出一个数,判断它是否在数组中思路:从左下角或者右上角开始比较 def find_integer(matrix, num): """ :param matrix: [[]] :param num: in ...
分类:编程语言   时间:2020-01-28 19:18:59    阅读次数:89
240. Search a 2D Matrix II
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i ...
分类:其他好文   时间:2020-01-28 17:32:43    阅读次数:88
【PAT甲级】1103 Integer Factorization (30分)
1103 Integer Factorization (30分) The K ? P factorization of a positive integer N is to write N as the sum of the P th power of K positive integers. Yo ...
分类:其他好文   时间:2020-01-27 19:07:20    阅读次数:76
【leetcode】1329. Sort the Matrix Diagonally
题目如下: Given a m * n matrix mat of integers, sort it diagonally in ascending order from the top-left to the bottom-right then return the sorted array. ...
分类:其他好文   时间:2020-01-27 19:06:23    阅读次数:72
快速幂与矩阵快速幂
幂运算 幂运算$a^b$是$b$个$a$相乘的结果. C++自带的幂函数 是最朴素的$O(b)$算法,效率非常低,所以如果要用到大量幂运算,最好自己打一个快速幂. 快速幂 求$a^b\%p$的值. 1. 当$b=1$时,返回$a%p$. 2. 当$2\mid b$时,返回$pow(a,\frac{b ...
分类:其他好文   时间:2020-01-27 00:19:32    阅读次数:99
Python与线性代数——Numpy中的matrix()和array()的区别
Numpy中matrix必须是2维的,但是 numpy中array可以是多维的(1D,2D,3D····ND)。matrix是array的一个小的分支,包含于array。所以matrix 拥有array的所有特性。 matrix() 和 array() 的区别,主要从以下方面说起: 矩阵生成方式不同 ...
分类:编程语言   时间:2020-01-26 23:46:59    阅读次数:150
4370条   上一页 1 ... 32 33 34 35 36 ... 437 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!