转自http://www.cnblogs.com/gaojun/archive/2010/09/11/1824016.htmlC++中string是标准库中一种容器,相当于保存元素类型为char的vector容器(自己理解),这个类提供了相当丰富的函数来完成对字符串操作,以及与C风格字符串之间转换,下面是对string一些总结<引用> 一,C语言的字符串在C语言里,对字符串的处理一项都是一件比较痛苦的事情,因为通常在实现字符串的操作的时候都会用到最不容易驾驭的类型——指针。比如下面这个例子://example 1:char str[12] = "Hello";c Read More
posted @ 2012-10-07 17:18
sidereal
Views(282)
Comments(0)
Diggs(0)
1 #include <stdio.h> 2 #include <string.h> 3 4 char preorder[30]; 5 char inorder[30]; 6 char tree[1000000]; //tree index starts from 1 //树的深度问题,2^h数组大小,选得太小会AW 7 char postorder[30]; 8 int postindex; 9 int search(char ch,char array[],int start,int end)10 {11 for(int i=start;i<=end;i++) Read More
posted @ 2012-10-07 16:26
sidereal
Views(190)
Comments(0)
Diggs(0)
sigular value decomposition$A\epsilon R^{m*n}$, A can be decomposed into $A=UDV^T$, where $U\epsilon R^{m*n}, D\epsilon R^{n*n}, V\epsilon R^{n*n}$$D=diagonal[\sigma_i], \sigma_i=sigular value of A$; $U$'s columns are Eigenvectors of $AA^T$; $V$'s columns are Eigenvectors of $A^TA$compute us Read More
posted @ 2012-10-07 11:31
sidereal
Views(173)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号