摘要: 1 /* 2 * 该程序用于计算语言的核心项集 3 * RexfieldVon 4 * 2013年8月24日21:19:25 5 */ 6 #include 7 #include 8 #include 9 #include 10 11 #ifndef bool 12 # define bool char 13 #endif 14 15 #ifndef true 16 # define true 1 17 #endif 18 19 #ifndef false 20 # define false 0 21 #endif 22 23 #d... 阅读全文
posted @ 2013-08-24 21:39 RexfieldVon 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 该算法用于将一组乱序的字符串反序列化到一个Trie树中,这个过程即可视为对字符串进行了一次排序。还可以通过调用GetFeatureString 将该 Trie 树重新序列化。 1 #include 2 #include 3 #include 4 5 #ifndef bool 6 # define bool char 7 #endif 8 9 #ifndef true 10 # define true 1 11 #endif 12 13 #ifndef false 14 # define false 0 15 #endif 16 17 #defi... 阅读全文
posted @ 2013-08-24 21:17 RexfieldVon 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 一开始,我为了偷懒将所有的任务全都压在了一个浮动指针上: 1 for (; CCPtr->S != NULL; CCPtr->S = CCPtr->S->next) // for each x following a · in an item in CCi 2 { 3 char *Placeholder = strchr(CCPtr->S->Expression, '\376'); 4 if (Placeholder != NULL && *(Placeholder + 1) != '\0') 5 { 阅读全文
posted @ 2013-08-24 16:37 RexfieldVon 阅读(248) 评论(0) 推荐(0) 编辑