SHOGUN  v3.0.0
 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/SGVector.h>
15 
16 namespace shogun
17 {
18 
21 {
24 
26  static void print_data(const RelaxedTreeNodeData &data)
27  {
28  SG_SPRINT("left=(")
29  for (int32_t i=0; i < data.mu.vlen; ++i)
30  if (data.mu[i] == -1 || data.mu[i] == 0)
31  SG_SPRINT("%4d", i)
32  SG_SPRINT("), right=(")
33  for (int32_t i=0; i < data.mu.vlen; ++i)
34  if (data.mu[i] == 1 || data.mu[i] == 0)
35  SG_SPRINT("%4d", i)
36  SG_SPRINT(")\n")
37  }
38 };
39 
40 } /* shogun */
41 
42 #endif /* end of include guard: RELAXEDTREENODEDATA_H__ */
43 

SHOGUN Machine Learning Toolbox - Documentation