SHOGUN
6.0.0
src
shogun
multiclass
tree
RelaxedTreeNodeData.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
* Written (W) 2012 Chiyuan Zhang
8
* Copyright (C) 2012 Chiyuan Zhang
9
*/
10
11
#ifndef RELAXEDTREENODEDATA_H__
12
#define RELAXEDTREENODEDATA_H__
13
14
#include <shogun/lib/config.h>
15
16
#include <
shogun/lib/SGVector.h
>
17
18
namespace
shogun
19
{
20
22
struct
RelaxedTreeNodeData
23
{
25
SGVector<int32_t>
mu
;
26
28
static
void
print_data
(
const
RelaxedTreeNodeData
&data)
29
{
30
SG_SPRINT
(
"left=("
)
31
for
(int32_t i=0; i < data.
mu
.
vlen
; ++i)
32
if
(data.
mu
[i] == -1 || data.
mu
[i] == 0)
33
SG_SPRINT
(
"%4d"
, i)
34
SG_SPRINT
(
"), right=("
)
35
for
(int32_t i=0; i < data.
mu
.
vlen
; ++i)
36
if
(data.
mu
[i] == 1 || data.
mu
[i] == 0)
37
SG_SPRINT
(
"%4d"
, i)
38
SG_SPRINT
(
")\n"
)
39
}
40
};
41
42
}
/* shogun */
43
44
#endif
/* end of include guard: RELAXEDTREENODEDATA_H__ */
45
shogun::RelaxedTreeNodeData::print_data
static void print_data(const RelaxedTreeNodeData &data)
Definition:
RelaxedTreeNodeData.h:28
shogun::RelaxedTreeNodeData
Definition:
RelaxedTreeNodeData.h:22
shogun::RelaxedTreeNodeData::mu
SGVector< int32_t > mu
Definition:
RelaxedTreeNodeData.h:25
SG_SPRINT
#define SG_SPRINT(...)
Definition:
SGIO.h:179
shogun::SGVector< int32_t >
shogun
all of classes and functions are contained in the shogun namespace
Definition:
class_list.h:18
SGVector.h
shogun::SGVector::vlen
index_t vlen
Definition:
SGVector.h:545
SHOGUN
Machine Learning Toolbox - Documentation