SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
lib
SGStringList.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Written (W) 2012 Fernando José Iglesias García
8
* Written (W) 2010,2012 Soeren Sonnenburg
9
* Copyright (C) 2010 Berlin Institute of Technology
10
* Copyright (C) 2012 Soeren Sonnenburg
11
*/
12
#ifndef __SGSTRINGLIST_H__
13
#define __SGSTRINGLIST_H__
14
15
#include <
shogun/lib/config.h
>
16
#include <
shogun/lib/common.h
>
17
#include <
shogun/lib/DataType.h
>
18
#include <
shogun/lib/SGReferencedData.h
>
19
#include <
shogun/lib/SGString.h
>
20
21
namespace
shogun
22
{
23
25
template
<
class
T>
class
SGStringList :
public
SGReferencedData
26
{
27
public
:
29
SGStringList
();
30
32
SGStringList
(SGString<T>* s,
index_t
num_s,
index_t
max_length,
33
bool
ref_counting=
true
);
34
36
SGStringList
(
index_t
num_s,
index_t
max_length,
bool
ref_counting=
true
);
37
39
SGStringList
(
const
SGStringList
&orig);
40
42
virtual
~SGStringList
();
43
49
inline
SGStringList<T>
get
()
50
{
51
return
*
this
;
52
}
53
58
void
load
(
CFile
* loader);
59
64
void
save
(
CFile
* saver);
65
66
67
protected
:
68
70
virtual
void
copy_data
(
const
SGReferencedData
&orig);
71
73
virtual
void
init_data
();
74
76
void
free_data
();
77
78
public
:
80
index_t
num_strings
;
81
83
index_t
max_string_length
;
84
86
SGString<T>
*
strings
;
87
};
88
}
89
#endif // __SGSTRINGLIST_H__
SHOGUN
机器学习工具包 - 项目文档