SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
RelaxedTreeNodeData.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 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 
23 {
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 
static void print_data(const RelaxedTreeNodeData &data)
index_t vlen
Definition: SGVector.h:494
#define SG_SPRINT(...)
Definition: SGIO.h:180
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18

SHOGUN 机器学习工具包 - 项目文档