SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
lib
SGMatrixList.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
* Copyright (C) 2012 Fernando José Iglesias García
9
*/
10
11
#ifndef __SGMATRIX_LIST_H__
12
#define __SGMATRIX_LIST_H__
13
14
#include <
shogun/lib/SGReferencedData.h
>
15
#include <
shogun/lib/SGMatrix.h
>
16
17
namespace
shogun
18
{
19
template
<
class
T>
class
SGMatrix;
20
22
template
<
class
T>
class
SGMatrixList
:
public
SGReferencedData
23
{
24
public
:
26
SGMatrixList
();
27
29
SGMatrixList
(
SGMatrix<T>
* ml, int32_t nmats,
bool
ref_counting =
true
);
30
32
SGMatrixList
(int32_t nmats,
bool
ref_counting =
true
);
33
35
SGMatrixList
(
SGMatrixList
const
& orig);
36
38
virtual
~SGMatrixList
();
39
47
SGMatrix<T>
get_matrix
(
index_t
index)
const
;
48
56
SGMatrix<T>
operator[]
(
index_t
index)
const
;
57
64
void
set_matrix
(
index_t
index,
const
SGMatrix<T>
matrix);
65
76
static
SGMatrixList<T>
split
(
SGMatrix<T>
matrix, int32_t num_components);
77
78
protected
:
80
virtual
void
copy_data
(
const
SGReferencedData
&orig);
81
83
virtual
void
init_data
();
84
86
virtual
void
free_data
();
87
88
public
:
90
SGMatrix<T>
*
matrix_list
;
91
93
int32_t
num_matrices
;
94
95
};
/* class SGMatrixList */
96
97
}
/* namespace shogun */
98
99
#endif
/* define __SGMATRIX_LIST_H__ */
SHOGUN
机器学习工具包 - 项目文档