GibbsLDA strtokenizer.h分析

来源:互联网 发布:opencv lbp算法 编辑:程序博客网 时间:2024/05/17 21:06

GibbsLDA strtokenizer.h分析

在这个文件中,实在是非常短。

构造函数相当简单,一个字符串,和一个分隔符seperator。

不过int idx是做什么的呢?

以及五个函数。

void parse(string str, string seperators);int count_tokens();string next_token();   void start_scan();string token(int i);

我猜测parse就是根据seperator去分割str.
count_tokens()就是分割之后的数量的多少。
next_token()就是下一个token是什么,所以idx可能就是这个函数所使用的!
start_scan()不明所以。

token(i)取特定的下标的token。

0 0