- 博客(4)
- 收藏
- 关注
原创 406. 根据身高重建队列
此题用C++解决的方案,主要需要掌握C++lamda表达式,以及vector容器中insert函数的用法。class Solution {public: vector<vector<int>> reconstructQueue(vector<vector<int>>& people) { sort(people.b...
2020-05-08 16:13:00
115
翻译 信号量实现的生产者与消费者模型
信号量实现的生产者与消费者模型 1 #include <stdio.h> 2 #include <unistd.h> 3 #include <pthread.h> 4 #include <semaphore.h> 5 #include <stdlib.h> 6 7 8 sem_t blank, xful...
2020-05-08 11:29:07
287
1
原创 Python取numpy数组的某几行某几列方法
Python取numpy数组的某几行某几列方法其中V为矩阵V = V[:,[end-1,end]]#取最后两列V = V[[start,start+1],:]#取前两行
2020-05-07 21:16:08
4373
原创 读取文本数据,并计算特征向量
numpy.linalg.eig() 计算矩阵特征向量import globimport numpy as npimport matplotlib.pyplot as pltimport matplotlib.colorsfrom numpy import linalg as LAfcf = glob.glob('data/*.txt')#get the featurefile...
2020-05-07 20:57:57
420
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人