- 博客(8)
- 收藏
- 关注
原创 如何认知这个世界
无论是哥白尼的日心说说、还是牛顿三大定律,无不揭示着人类的伟大、智慧。 但是,不知你是否意识到,这些都是属于人类认知的范畴,而不是属于自然界的客观真理。 如果从人的角度来说,现实中应该存在两个世界,一个是人类用数学符号等等,构建起来的世界;一个是客观存在的真实的世界,这个真实世界的终极面目是什么我们不得而知,但是人类在用自己的智慧,构建一个不断逼近客观现实的认知世界。 当大家以为,牛顿运动定律已经...
2019-07-01 21:35:25 559 1
原创 opencv nRows = I.rows * channels 问题
这段代码来自opencv说明Mat& ScanImageAndReduceC(Mat& I, const uchar* const table) { // accept only char type matrices CV_Assert(I.depth() != sizeof(uchar)); int channels = I.channels(); int n
2017-04-11 16:17:14 432
原创 C++ kmeans 同时绘图opengl
整个框架分为kmeans类,和主函数主函数如下:#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h>#include "kmeans.h"using namespace std;int main(int argc, char ** argv) { kmeans t; t.readf
2017-04-07 17:52:14 290
原创 matlab kmeans 代码
代码中包括随机数据的产生, 和kmeans的无监督学习 kmeans主要分为三步: 1. classify the different classes 2. define new center 3. stop condition 不停的进行迭代直到满足迭代次数或者是结束条件这里的距离采用的是欧式距离clear; % generate data % clear; % data = roun
2017-04-07 17:45:46 784
原创 121. Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), desi
2017-02-25 23:22:59 153
原创 13. Roman to Integer (c 版)
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 给定一个罗马数字s,( I<=s<=MMMCMXCIX)(即1到3999),将罗马数字转换成整数。 首先要来了解一下罗马数字表示法,基本字符有7个:I,V,X,L,C,D,M
2017-02-24 15:31:20 153
原创 **387.First Unique Character in a String**都没有对是否是第一次出现字符的判断
leetcode 387.First Unique Character in a String(easy)统计字符串字符次数Examples: s = “leetcode” return 0. s = “loveleetcode”, return 2.题目要找第一个没有重复的字符,如果没有则返回-1。首先这里假设只有小写字母,可以开一个大小为26的数组,保存每个字母出现的次数,然后在扫描
2017-02-23 16:15:16 186
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人