SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
lib
IndexBlock.h
Go to the documentation of this file.
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
* Copyright (C) 2012 Sergey Lisitsyn
8
*/
9
10
#ifndef INDEXBLOCK_H_
11
#define INDEXBLOCK_H_
12
13
#include <
shogun/lib/SGVector.h
>
14
#include <
shogun/lib/List.h
>
15
16
namespace
shogun
17
{
18
22
class
CIndexBlock
:
public
CSGObject
23
{
24
public
:
25
27
CIndexBlock
();
28
35
CIndexBlock
(
index_t
min_index,
index_t
max_index,
36
float64_t
weight=1.0,
const
char
* name=
"task"
);
37
39
~CIndexBlock
();
40
42
index_t
get_min_index
()
const
{
return
m_min_index; }
44
void
set_min_index
(
index_t
min_index) { m_min_index = min_index; }
46
index_t
get_max_index
()
const
{
return
m_max_index; }
48
void
set_max_index
(
index_t
max_index) { m_max_index = max_index; }
50
float64_t
get_weight
()
const
{
return
m_weight; }
52
void
set_weight
(
float64_t
weight) { m_weight = weight; }
53
55
virtual
const
char
*
get_name
()
const
{
return
"IndexBlock"
; };
56
58
CList
*
get_sub_blocks
();
59
61
int32_t
get_num_sub_blocks
();
62
66
void
add_sub_block
(
CIndexBlock
* sub_block);
67
68
private
:
70
index_t
m_min_index;
71
73
index_t
m_max_index;
74
76
float64_t
m_weight;
77
79
CList
* m_sub_blocks;
80
81
};
82
83
}
84
#endif
SHOGUN
Machine Learning Toolbox - Documentation