题意: 对一个矩阵有2种操作: 1.把某个元素设为x。 2.查询以(x1,y1)为左上角 以(x2,y2)为右上角的矩阵中的数字的和。 思路: 二维树状数组入门题,同时对横坐标和纵坐标做前缀和就行了。 代码: ...
分类:
其他好文 时间:
2018-05-22 20:46:18
阅读次数:
155
public: double __thiscall Eigen::MatrixBase<class Eigen::Matrix<double,-1,--1。。等等,该符号在函数 _main 中被引用。 其中主要看! (? xxxxx @@ 的那个函数名。 没有定义或声明。 #include<Eige ...
分类:
其他好文 时间:
2018-05-22 18:21:25
阅读次数:
3355
评价指标: 准确率 (Accuracy),混淆矩阵 (Confusion Matrix),精确率(Precision),召回率(Recall),平均正确率(AP),mean Average Precision(mAP),交除并(IoU),ROC + AUC,非极大值抑制(NMS)。 1、准确率 (A ...
分类:
其他好文 时间:
2018-05-22 14:44:53
阅读次数:
3021
题目:矩阵置0 难度:Easy 题目内容: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Given a m x n matrix, if an elemen ...
分类:
编程语言 时间:
2018-05-21 01:04:34
阅读次数:
236
最近集中学习了一下矩阵树定理,自己其实还是没有太明白原理(证明)类的东西,但想在这里总结一下应用中的一些细节,矩阵树定理的一些引申等等。 首先,矩阵树定理用于求解一个图上的生成树个数。实现方式是:\(A\)为邻接矩阵,\(D\)为度数矩阵,则基尔霍夫(Kirchhoff)矩阵即为:\(K = D - ...
分类:
编程语言 时间:
2018-05-20 19:30:01
阅读次数:
211
题面:http://acm.hdu.edu.cn/showproblem.php?pid=4965 题解:https://www.zybuluo.com/wsndy-xx/note/1153981 ...
分类:
其他好文 时间:
2018-05-20 18:16:35
阅读次数:
155
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: Input: 3 Output: [ [ 1, 2, 3 ], [ 8, ...
分类:
其他好文 时间:
2018-05-20 10:49:51
阅读次数:
148
编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性: 每行中的整数从左到右按升序排列。 每行的第一个整数大于前一行的最后一个整数。 示例 1: mark 解决思路: 使用二分查找,m行n列的矩阵matrix共有mn个元素,其中第x个元素对应matrix中位置为[x/ ...
分类:
其他好文 时间:
2018-05-18 22:19:59
阅读次数:
167
from scipy import sparse sparse.save_npz('./filename.npz', csr_matrix_variable) #保存 csr_matrix_variable = sparse.load_npz('path.npz') #读 参考: https://b ...
分类:
编程语言 时间:
2018-05-18 20:09:25
阅读次数:
425