数据结构 向量: 向量是用于存储数值型、字符型或逻辑型数据的一维数组。 可通过函数c()可用来创建向量 实例操作: 矩阵: 矩阵是一个二位数组,只是每个元素都拥有相同的模式(数值型、字符型或逻辑型) 可通过函数matrix()创建矩阵 实例操作: 数组: 数组(array)与矩阵类似,但是维度可以大 ...
分类:
编程语言 时间:
2017-02-01 19:46:25
阅读次数:
209
For instance, give row = 4, col = 5, print matrix in zigzag order like: [1, 8, 9, 16, 17] [2, 7, 10, 15, 18] [3, 6, 11, 14, 19] [4, 5, 12, 13, 20] 1 p... ...
分类:
其他好文 时间:
2017-02-01 10:32:45
阅读次数:
161
第二周 第一部分 Multivariate Linear Regression Multiple Features Note: [7:25 - θT is a 1 by (n+1) matrix and not an (n+1) by 1 matrix] Linear regression with ...
分类:
系统相关 时间:
2017-01-29 18:28:09
阅读次数:
340
Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to ...
分类:
移动开发 时间:
2017-01-29 10:43:41
阅读次数:
307
整理下Eigen库的教程,参考:http://eigen.tuxfamily.org/dox/index.html 归约、迭代器和广播 归约 在Eigen中,有些函数可以统计matrix/array的某类特征,返回一个标量。 范数计算 L2范数 squareNorm(),等价于计算vector的自身 ...
分类:
其他好文 时间:
2017-01-26 15:41:09
阅读次数:
534
整理下Eigen库的教程,参考:http://eigen.tuxfamily.org/dox/index.html 块操作 块是matrix或array中的矩形子部分。 使用块 函数.block(),有两种形式 Eigen中,索引从0开始。 两个版本都可以用于固定尺寸和动态尺寸的matrix/arr ...
分类:
其他好文 时间:
2017-01-25 21:13:48
阅读次数:
439
整理下Eigen库的教程,参考:http://eigen.tuxfamily.org/dox/index.html 归约、迭代器和广播 归约 在Eigen中,有些函数可以统计matrix/array的某类特征,返回一个标量。 范数计算 L2范数 squareNorm(),等价于计算vector的自身 ...
分类:
其他好文 时间:
2017-01-25 21:10:00
阅读次数:
214
【题意分析】 给你一张特殊的,被称为“轮状基”的无向图,求其生成树个数。 【解题思路】 引理: 基尔霍夫矩阵: 基尔霍夫矩阵=度数矩阵-邻接矩阵(邻接矩阵权=两点连边数) Matrix-Tree定理: 对于任意一个无向图,其生成树个数为其基尔霍夫矩阵的任意一个余子式的行列式值。 算法一: 直接暴力构 ...
分类:
其他好文 时间:
2017-01-24 17:25:22
阅读次数:
185
Use Compressed Sparse Row Format (CSR) to represent matrix 1 #include "cuda_runtime.h" 2 #include "device_launch_parameters.h" 3 #include "gputimer.h" ...
分类:
其他好文 时间:
2017-01-24 12:21:32
阅读次数:
358
继续练习自定义View。。毕竟熟才能生巧。一直觉得小米的时钟很精美,那这次就搞它~这次除了练习自定义View,还涉及到使用Camera和Matrix实现3D效果。
分类:
移动开发 时间:
2017-01-22 19:33:25
阅读次数:
390