SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
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 

SHOGUN Machine Learning Toolbox - Documentation