算法相关
文章平均质量分 81
colorfishes
走别人没走过的路,让别人有路可走
展开
-
一个高效的稀疏矩阵转换算法,COO格式转换为DIA格式
稀疏矩阵的COO和DIA具体存储格式以及一种比较高效的COO格式转换为DIA格式的转换算法。 稀疏矩阵用以非规则计算。 还可以使用omp等手段进一步并行优化。原创 2015-01-13 11:13:21 · 1428 阅读 · 0 评论 -
371. Sum of Two Integers LeetCode OJ
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. 既然不能用加法和减法,那么我们只能想到用位运算了,即与(&)或(|)非(~)异或(^)。 考虑两个整数(例如原创 2016-07-01 15:33:26 · 286 阅读 · 0 评论