- 博客(10)
- 收藏
- 关注
转载 PAT (Basic Level) Practise 1001-1010全部题解
1001 水题 1002 用个递归搞定 1003 这题稍微难一点,理解为用P和T 讲一串A分开,即aPbTc。其中a、b、c要满足c=a*b并且b!=0,这样理 解之后问题就简单了。 1004 简单的字符串存取 1005 因为只用验证0-100的数,所以直接用个Key[i]表示i是否被覆盖。 1006 想起了C程的上机题 1007 简单的素数问题。 1008 挺经典的一个题
2013-07-25 19:15:49
616
原创 常用的光照模型与面绘制算法总结
基本光照模型 漫反射模型(Lambert模型) 环境光:Iambdiff=Kd*Ia,其中Ia 表示环境光强度,Kd (0d 射系数,Iambdiff是漫反射体与环境光交互反射的光强。 方向光:Ildiff = Kd * Il * cos(θ),其中Il是入射角,Ildiff是漫反射体与方向光交互反射 的光强。cos(θ)又等价于(点乘),其中是顶点的单位法向量,是顶点指 向光源的单位
2013-05-15 09:58:47
1777
原创 Project 3: Sort Poems
Project 3: Sort Poems Harry once found an interesting ancient poem written on a long strip of paper. He decided to save this piece of art into his computer by scanning the paper segment by segment.
2013-03-29 23:44:08
661
原创 Harry Potter’s Exam (an application of Dijkstra algorithm)
In Professor McGonagall's class of Transfiguration, Harry Potter is learning how to transform one object into another by some spells. He has learnt that, to turn a cat into a mouse one can say docam
2013-03-29 23:36:26
773
原创 the algorithms to solve the question X^N
Algorithm 1:time complexity O(N) double pow(double x, long n) { if(n==0) return 1; /*when n=0 whatever the x is,the pow is 1*/ if(n==1) return x; /*when n=1 the result is x itself*/ els
2013-03-29 23:31:04
530
原创 基于GMM的说话人识别模型(matlab)
通过机器学习来解决说话人识别这一难题是当前的一个趋势。而GMM模型(高斯混合模型)在说话人识别领域很常用。标题有点大了,其实这只是一个框架模型。既然是框架模型,说明还要很多地方可以进一步的完善。虽然是个框架模型,但是其识别率也是可以达到70-80%左右。 %% 初始化 GMM_com = 16; training_count = 6; % 训练数据集类别数,有几个人就是几类 testing_c
2013-03-29 23:09:14
19643
15
原创 几种简单常用的镜头边缘检测算法(matlab实现)
在做镜头检测之前,为方便起见,我们先将一个视频短片提取出一定数量的图像序列。 %%%%%提取图片序列%%%%%%% video=mmreader('test.avi','Tag','Reader'); NOF=video.NumberOfFrames; Img_diff=zeros(NOF-1,1); mkdir([cd,'/images']); directory=[cd,'/images/'
2013-03-29 22:49:08
3649
原创 c++队列类的简单实现
同样是一个小作业,只做了一部分,有待完善 #ifndef QUEUE_H #define QUEUE_H /////////////// #include //声明一个Queue模板类 template class Queue; //定义一个节点类 template class qItem { friend class Queue; qItem(const T &t):item
2013-03-29 21:56:35
1343
原创 c++写的一个简单的string类
这是刚开始学c++时候写的一个string类,有些细节还值得推敲,一直没时间重写写过,放在这以后再改改#ifndef _MYSTRING_H #define _MYSTRING_H #include #include #include #include namespace mstr { class mystring { public: typedef unsigned int size_t
2013-03-29 20:40:02
743
转载 一个c/c++程序中的内存分配
全局/静态数据区:存储全局变量,和静态变量static声明的变量 常量存储区:存储常量,如char *s="abcde"; 或者 const int i =10;代码区:这个不说了。代码放的地儿 栈:临时变量,参数等,有大小限制,vc6/7: 1M 堆: 用户自己维护的空间,内存使用需要自己申请,自己释放。大小基本不限(4G) example: #i
2013-03-29 20:30:54
480
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人