SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SGObject.cpp
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) 2008-2009 Soeren Sonnenburg
8  * Written (W) 2011-2013 Heiko Strathmann
9  * Written (W) 2013-2014 Thoralf Klein
10  * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max Planck Society
11  */
12 
13 #include <shogun/lib/config.h>
14 #include <shogun/lib/memory.h>
15 #include <shogun/lib/RefCount.h>
16 
17 #include <shogun/base/SGObject.h>
18 #include <shogun/io/SGIO.h>
19 #include <shogun/base/Version.h>
20 #include <shogun/base/Parameter.h>
21 #include <shogun/base/DynArray.h>
22 #include <shogun/lib/Map.h>
23 #include <shogun/lib/SGVector.h>
26 
27 #include <shogun/base/class_list.h>
28 
29 #include <stdlib.h>
30 #include <stdio.h>
31 #include <string.h>
32 
33 namespace shogun
34 {
35  class Parallel;
36 
37  extern Parallel* sg_parallel;
38  extern SGIO* sg_io;
39  extern Version* sg_version;
40 
41  template<> void CSGObject::set_generic<bool>()
42  {
43  m_generic = PT_BOOL;
44  }
45 
46  template<> void CSGObject::set_generic<char>()
47  {
48  m_generic = PT_CHAR;
49  }
50 
51  template<> void CSGObject::set_generic<int8_t>()
52  {
53  m_generic = PT_INT8;
54  }
55 
56  template<> void CSGObject::set_generic<uint8_t>()
57  {
58  m_generic = PT_UINT8;
59  }
60 
61  template<> void CSGObject::set_generic<int16_t>()
62  {
63  m_generic = PT_INT16;
64  }
65 
66  template<> void CSGObject::set_generic<uint16_t>()
67  {
68  m_generic = PT_UINT16;
69  }
70 
71  template<> void CSGObject::set_generic<int32_t>()
72  {
73  m_generic = PT_INT32;
74  }
75 
76  template<> void CSGObject::set_generic<uint32_t>()
77  {
78  m_generic = PT_UINT32;
79  }
80 
81  template<> void CSGObject::set_generic<int64_t>()
82  {
83  m_generic = PT_INT64;
84  }
85 
86  template<> void CSGObject::set_generic<uint64_t>()
87  {
88  m_generic = PT_UINT64;
89  }
90 
91  template<> void CSGObject::set_generic<float32_t>()
92  {
93  m_generic = PT_FLOAT32;
94  }
95 
96  template<> void CSGObject::set_generic<float64_t>()
97  {
98  m_generic = PT_FLOAT64;
99  }
100 
101  template<> void CSGObject::set_generic<floatmax_t>()
102  {
103  m_generic = PT_FLOATMAX;
104  }
105 
106  template<> void CSGObject::set_generic<CSGObject*>()
107  {
108  m_generic = PT_SGOBJECT;
109  }
110 
111  template<> void CSGObject::set_generic<complex128_t>()
112  {
113  m_generic = PT_COMPLEX128;
114  }
115 
116 } /* namespace shogun */
117 
118 using namespace shogun;
119 
121 {
122  init();
123  set_global_objects();
124  m_refcount = new RefCount(0);
125 
126  SG_SGCDEBUG("SGObject created (%p)\n", this)
127 }
128 
130 :io(orig.io), parallel(orig.parallel), version(orig.version)
131 {
132  init();
133  set_global_objects();
134  m_refcount = new RefCount(0);
135 
136  SG_SGCDEBUG("SGObject copied (%p)\n", this)
137 }
138 
140 {
141  SG_SGCDEBUG("SGObject destroyed (%p)\n", this)
142 
143  unset_global_objects();
144  delete m_parameters;
146  delete m_gradient_parameters;
147  delete m_refcount;
148 }
149 
150 #ifdef USE_REFERENCE_COUNTING
151 int32_t CSGObject::ref()
152 {
153  int32_t count = m_refcount->ref();
154  SG_SGCDEBUG("ref() refcount %ld obj %s (%p) increased\n", count, this->get_name(), this)
155  return m_refcount->ref_count();
156 }
157 
158 int32_t CSGObject::ref_count()
159 {
160  int32_t count = m_refcount->ref_count();
161  SG_SGCDEBUG("ref_count(): refcount %d, obj %s (%p)\n", count, this->get_name(), this)
162  return m_refcount->ref_count();
163 }
164 
165 int32_t CSGObject::unref()
166 {
167  int32_t count = m_refcount->unref();
168  if (count<=0)
169  {
170  SG_SGCDEBUG("unref() refcount %ld, obj %s (%p) destroying\n", count, this->get_name(), this)
171  delete this;
172  return 0;
173  }
174  else
175  {
176  SG_SGCDEBUG("unref() refcount %ld obj %s (%p) decreased\n", count, this->get_name(), this)
177  return m_refcount->ref_count();
178  }
179 }
180 #endif //USE_REFERENCE_COUNTING
181 
182 #ifdef TRACE_MEMORY_ALLOCS
183 #include <shogun/lib/Map.h>
184 extern CMap<void*, shogun::MemoryBlock>* sg_mallocs;
185 
186 void CSGObject::list_memory_allocs()
187 {
188  shogun::list_memory_allocs();
189 }
190 #endif
191 
193 {
195  return NULL;
196 }
197 
199 {
201  return NULL;
202 }
203 
204 void CSGObject::set_global_objects()
205 {
206  if (!sg_io || !sg_parallel || !sg_version)
207  {
208  fprintf(stderr, "call init_shogun() before using the library, dying.\n");
209  exit(1);
210  }
211 
212  SG_REF(sg_io);
215 
216  io=sg_io;
219 }
220 
221 void CSGObject::unset_global_objects()
222 {
223  SG_UNREF(version);
225  SG_UNREF(io);
226 }
227 
229 {
230  SG_REF(new_io);
231  SG_UNREF(sg_io);
232  sg_io=new_io;
233 }
234 
236 {
237  SG_REF(sg_io);
238  return sg_io;
239 }
240 
242 {
243  SG_REF(new_parallel);
245  sg_parallel=new_parallel;
246 }
247 
249 {
250  SG_DEBUG("entering\n")
251 
252  uint32_t carry=0;
253  uint32_t length=0;
254 
255  m_hash=0;
256  get_parameter_incremental_hash(m_hash, carry, length);
258 
259  SG_DEBUG("leaving\n")
260 }
261 
263 {
264  SG_DEBUG("entering\n")
265 
266  uint32_t hash=0;
267  uint32_t carry=0;
268  uint32_t length=0;
269 
270  get_parameter_incremental_hash(hash, carry, length);
271  hash=CHash::FinalizeIncrementalMurmurHash3(hash, carry, length);
272 
273  SG_DEBUG("leaving\n")
274  return (m_hash!=hash);
275 }
276 
278 {
280  return sg_parallel;
281 }
282 
284 {
285  SG_REF(new_version);
287  sg_version=new_version;
288 }
289 
291 {
293  return sg_version;
294 }
295 
296 bool CSGObject::is_generic(EPrimitiveType* generic) const
297 {
298  *generic = m_generic;
299 
300  return m_generic != PT_NOT_GENERIC;
301 }
302 
304 {
305  m_generic = PT_NOT_GENERIC;
306 }
307 
308 void CSGObject::print_serializable(const char* prefix)
309 {
310  SG_PRINT("\n%s\n================================================================================\n", get_name())
311  m_parameters->print(prefix);
312 }
313 
315  const char* prefix)
316 {
317  SG_DEBUG("START SAVING CSGObject '%s'\n", get_name())
318  try
319  {
321  }
322  catch (ShogunException& e)
323  {
324  SG_SWARNING("%s%s::save_serializable_pre(): ShogunException: "
325  "%s\n", prefix, get_name(),
327  return false;
328  }
329 
330  if (!m_save_pre_called)
331  {
332  SG_SWARNING("%s%s::save_serializable_pre(): Implementation "
333  "error: BASE_CLASS::SAVE_SERIALIZABLE_PRE() not "
334  "called!\n", prefix, get_name());
335  return false;
336  }
337 
338  if (!m_parameters->save(file, prefix))
339  return false;
340 
341  try
342  {
344  }
345  catch (ShogunException& e)
346  {
347  SG_SWARNING("%s%s::save_serializable_post(): ShogunException: "
348  "%s\n", prefix, get_name(),
350  return false;
351  }
352 
353  if (!m_save_post_called)
354  {
355  SG_SWARNING("%s%s::save_serializable_post(): Implementation "
356  "error: BASE_CLASS::SAVE_SERIALIZABLE_POST() not "
357  "called!\n", prefix, get_name());
358  return false;
359  }
360 
361  if (prefix == NULL || *prefix == '\0')
362  file->close();
363 
364  SG_DEBUG("DONE SAVING CSGObject '%s' (%p)\n", get_name(), this)
365 
366  return true;
367 }
368 
370  const char* prefix)
371 {
372  REQUIRE(file != NULL, "Serializable file object should be != NULL\n");
373 
374  SG_DEBUG("START LOADING CSGObject '%s'\n", get_name())
375  try
376  {
378  }
379  catch (ShogunException& e)
380  {
381  SG_SWARNING("%s%s::load_serializable_pre(): ShogunException: "
382  "%s\n", prefix, get_name(),
384  return false;
385  }
386  if (!m_load_pre_called)
387  {
388  SG_SWARNING("%s%s::load_serializable_pre(): Implementation "
389  "error: BASE_CLASS::LOAD_SERIALIZABLE_PRE() not "
390  "called!\n", prefix, get_name());
391  return false;
392  }
393 
394  if (!m_parameters->load(file, prefix))
395  return false;
396 
397  try
398  {
400  }
401  catch (ShogunException& e)
402  {
403  SG_SWARNING("%s%s::load_serializable_post(): ShogunException: "
404  "%s\n", prefix, get_name(),
406  return false;
407  }
408 
409  if (!m_load_post_called)
410  {
411  SG_SWARNING("%s%s::load_serializable_post(): Implementation "
412  "error: BASE_CLASS::LOAD_SERIALIZABLE_POST() not "
413  "called!\n", prefix, get_name());
414  return false;
415  }
416  SG_DEBUG("DONE LOADING CSGObject '%s' (%p)\n", get_name(), this)
417 
418  return true;
419 }
420 
422 {
423  m_load_pre_called = true;
424 }
425 
427 {
428  m_load_post_called = true;
429 }
430 
432 {
433  m_save_pre_called = true;
434 }
435 
437 {
438  m_save_post_called = true;
439 }
440 
441 #ifdef TRACE_MEMORY_ALLOCS
442 #include <shogun/lib/Map.h>
443 extern CMap<void*, shogun::MemoryBlock>* sg_mallocs;
444 #endif
445 
446 void CSGObject::init()
447 {
448 #ifdef TRACE_MEMORY_ALLOCS
449  if (sg_mallocs)
450  {
451  int32_t idx=sg_mallocs->index_of(this);
452  if (idx>-1)
453  {
454  MemoryBlock* b=sg_mallocs->get_element_ptr(idx);
455  b->set_sgobject();
456  }
457  }
458 #endif
459 
460  io = NULL;
461  parallel = NULL;
462  version = NULL;
463  m_parameters = new Parameter();
466  m_generic = PT_NOT_GENERIC;
467  m_load_pre_called = false;
468  m_load_post_called = false;
469  m_save_pre_called = false;
470  m_save_post_called = false;
471  m_hash = 0;
472 }
473 
475 {
476  SG_PRINT("parameters available for model selection for %s:\n", get_name())
477 
479 
480  if (!num_param)
481  SG_PRINT("\tnone\n")
482 
483  for (index_t i=0; i<num_param; i++)
484  {
486  index_t l=200;
487  char* type=SG_MALLOC(char, l);
488  if (type)
489  {
490  current->m_datatype.to_string(type, l);
491  SG_PRINT("\t%s (%s): %s\n", current->m_name, current->m_description,
492  type);
493  SG_FREE(type);
494  }
495  }
496 }
497 
499 {
501 
502  SGStringList<char> result(num_param, -1);
503 
504  index_t max_string_length=-1;
505 
506  for (index_t i=0; i<num_param; i++)
507  {
509  index_t len=strlen(name);
510  // +1 to have a zero terminated string
511  result.strings[i]=SGString<char>(name, len+1);
512 
513  if (len>max_string_length)
514  max_string_length=len;
515  }
516 
517  result.max_string_length=max_string_length;
518 
519  return result;
520 }
521 
522 char* CSGObject::get_modsel_param_descr(const char* param_name)
523 {
524  index_t index=get_modsel_param_index(param_name);
525 
526  if (index<0)
527  {
528  SG_ERROR("There is no model selection parameter called \"%s\" for %s",
529  param_name, get_name());
530  }
531 
533 }
534 
536 {
537  /* use fact that names extracted from below method are in same order than
538  * in m_model_selection_parameters variable */
540 
541  /* search for parameter with provided name */
542  index_t index=-1;
543  for (index_t i=0; i<names.num_strings; i++)
544  {
546  if (!strcmp(param_name, current->m_name))
547  {
548  index=i;
549  break;
550  }
551  }
552 
553  return index;
554 }
555 
556 void CSGObject::get_parameter_incremental_hash(uint32_t& hash, uint32_t& carry,
557  uint32_t& total_length)
558 {
559  for (index_t i=0; i<m_parameters->get_num_parameters(); i++)
560  {
562 
563  SG_DEBUG("Updating hash for parameter %s.%s\n", get_name(), p->m_name);
564 
565  if (p->m_datatype.m_ptype == PT_SGOBJECT)
566  {
567  if (p->m_datatype.m_ctype == CT_SCALAR)
568  {
569  CSGObject* child = *((CSGObject**)(p->m_parameter));
570 
571  if (child)
572  {
573  child->get_parameter_incremental_hash(hash, carry,
574  total_length);
575  }
576  }
577  else if (p->m_datatype.m_ctype==CT_VECTOR ||
578  p->m_datatype.m_ctype==CT_SGVECTOR)
579  {
580  CSGObject** child=(*(CSGObject***)(p->m_parameter));
581 
582  for (index_t j=0; j<*(p->m_datatype.m_length_y); j++)
583  {
584  if (child[j])
585  {
586  child[j]->get_parameter_incremental_hash(hash, carry,
587  total_length);
588  }
589  }
590  }
591  }
592  else
593  p->get_incremental_hash(hash, carry, total_length);
594  }
595 }
596 
598 {
600  {
602  dict->add(p, this);
603  }
604 
606  {
608  CSGObject* child=*(CSGObject**)(p->m_parameter);
609 
610  if ((p->m_datatype.m_ptype == PT_SGOBJECT) &&
611  (p->m_datatype.m_ctype == CT_SCALAR) && child)
612  {
614  }
615  }
616 }
617 
618 bool CSGObject::equals(CSGObject* other, float64_t accuracy, bool tolerant)
619 {
620  SG_DEBUG("entering %s::equals()\n", get_name());
621 
622  if (other==this)
623  {
624  SG_DEBUG("leaving %s::equals(): other object is me\n", get_name());
625  return true;
626  }
627 
628  if (!other)
629  {
630  SG_DEBUG("leaving %s::equals(): other object is NULL\n", get_name());
631  return false;
632  }
633 
634  SG_DEBUG("comparing \"%s\" to \"%s\"\n", get_name(), other->get_name());
635 
636  /* a crude type check based on the get_name */
637  if (strcmp(other->get_name(), get_name()))
638  {
639  SG_INFO("leaving %s::equals(): name of other object differs\n", get_name());
640  return false;
641  }
642 
643  /* should not be necessary but just ot be sure that type has not changed.
644  * Will assume that parameters are in same order with same name from here */
646  {
647  SG_INFO("leaving %s::equals(): number of parameters of other object "
648  "differs\n", get_name());
649  return false;
650  }
651 
652  for (index_t i=0; i<m_parameters->get_num_parameters(); ++i)
653  {
654  SG_DEBUG("comparing parameter %d\n", i);
655 
656  TParameter* this_param=m_parameters->get_parameter(i);
657  TParameter* other_param=other->m_parameters->get_parameter(i);
658 
659  /* some checks to make sure parameters have same order and names and
660  * are not NULL. Should never be the case but check anyway. */
661  if (!this_param && !other_param)
662  continue;
663 
664  if (!this_param && other_param)
665  {
666  SG_DEBUG("leaving %s::equals(): parameter %d is NULL where other's "
667  "parameter \"%s\" is not\n", get_name(), other_param->m_name);
668  return false;
669  }
670 
671  if (this_param && !other_param)
672  {
673  SG_DEBUG("leaving %s::equals(): parameter %d is \"%s\" where other's "
674  "parameter is NULL\n", get_name(), this_param->m_name);
675  return false;
676  }
677 
678  SG_DEBUG("comparing parameter \"%s\" to other's \"%s\"\n",
679  this_param->m_name, other_param->m_name);
680 
681  /* hard-wired exception for DynamicObjectArray parameter num_elements */
682  if (!strcmp("DynamicObjectArray", get_name()) &&
683  !strcmp(this_param->m_name, "num_elements") &&
684  !strcmp(other_param->m_name, "num_elements"))
685  {
686  SG_DEBUG("Ignoring DynamicObjectArray::num_elements field\n");
687  continue;
688  }
689 
690  /* hard-wired exception for DynamicArray parameter num_elements */
691  if (!strcmp("DynamicArray", get_name()) &&
692  !strcmp(this_param->m_name, "num_elements") &&
693  !strcmp(other_param->m_name, "num_elements"))
694  {
695  SG_DEBUG("Ignoring DynamicArray::num_elements field\n");
696  continue;
697  }
698 
699  /* use equals method of TParameter from here */
700  if (!this_param->equals(other_param, accuracy, tolerant))
701  {
702  SG_INFO("leaving %s::equals(): parameters at position %d with name"
703  " \"%s\" differs from other object parameter with name "
704  "\"%s\"\n",
705  get_name(), i, this_param->m_name, other_param->m_name);
706  return false;
707  }
708  }
709 
710  SG_DEBUG("leaving %s::equals(): object are equal\n", get_name());
711  return true;
712 }
713 
715 {
716  SG_DEBUG("entering %s::clone()\n", get_name());
717 
718  SG_DEBUG("constructing an empty instance of %s\n", get_name());
719  CSGObject* copy=new_sgserializable(get_name(), this->m_generic);
720 
721  SG_REF(copy);
722 
723  REQUIRE(copy, "Could not create empty instance of \"%s\". The reason for "
724  "this usually is that get_name() of the class returns something "
725  "wrong, or that a class has a wrongly set generic type.\n",
726  get_name());
727 
728  for (index_t i=0; i<m_parameters->get_num_parameters(); ++i)
729  {
730  SG_DEBUG("cloning parameter \"%s\" at index %d\n",
732 
734  {
735  SG_DEBUG("leaving %s::clone(): Clone failed. Returning NULL\n",
736  get_name());
737  return NULL;
738  }
739  }
740 
741  SG_DEBUG("leaving %s::clone(): Clone successful\n", get_name());
742  return copy;
743 }
virtual const char * get_name() const =0
SGStringList< char > get_modelsel_names()
Definition: SGObject.cpp:498
#define SG_INFO(...)
Definition: SGIO.h:118
template class SGStringList
Definition: SGObject.h:40
Parallel * get_global_parallel()
Definition: SGObject.cpp:277
virtual void update_parameter_hash()
Definition: SGObject.cpp:248
int32_t index_of(const K &key)
Definition: Map.h:154
int32_t index_t
Definition: common.h:62
virtual int32_t get_num_parameters()
virtual CSGObject * clone()
Definition: SGObject.cpp:714
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
int32_t ref_count()
Definition: RefCount.cpp:31
virtual CSGObject * shallow_copy() const
Definition: SGObject.cpp:192
#define SG_SWARNING(...)
Definition: SGIO.h:178
void unset_generic()
Definition: SGObject.cpp:303
TParameter * get_parameter(int32_t idx)
Version * get_global_version()
Definition: SGObject.cpp:290
parameter struct
virtual void save_serializable_pre()
Definition: SGObject.cpp:431
#define SG_ERROR(...)
Definition: SGIO.h:129
#define REQUIRE(x,...)
Definition: SGIO.h:206
virtual bool is_generic(EPrimitiveType *generic) const
Definition: SGObject.cpp:296
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139
Parameter * m_parameters
Definition: SGObject.h:378
virtual bool load_serializable(CSerializableFile *file, const char *prefix="")
Definition: SGObject.cpp:369
virtual void print(const char *prefix="")
Definition: Parameter.cpp:2762
static uint32_t FinalizeIncrementalMurmurHash3(uint32_t h, uint32_t carry, uint32_t total_length)
Definition: Hash.cpp:376
Parallel * parallel
Definition: SGObject.h:372
#define SG_REF(x)
Definition: SGObject.h:51
virtual bool load(CSerializableFile *file, const char *prefix="")
Definition: Parameter.cpp:2781
Version * sg_version
Definition: init.cpp:37
T * get_element_ptr(int32_t index)
Definition: Map.h:232
char * get_modsel_param_descr(const char *param_name)
Definition: SGObject.cpp:522
bool equals(TParameter *other, float64_t accuracy=0.0, bool tolerant=false)
Definition: Parameter.cpp:2962
int32_t add(const K &key, const T &data)
Definition: Map.h:101
TSGDataType m_datatype
#define SG_PRINT(...)
Definition: SGIO.h:137
Parallel * sg_parallel
Definition: init.cpp:35
Parameter class.
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:112
virtual ~CSGObject()
Definition: SGObject.cpp:139
SGIO * sg_io
Definition: init.cpp:36
void build_gradient_parameter_dictionary(CMap< TParameter *, CSGObject * > *dict)
Definition: SGObject.cpp:597
int32_t unref()
Definition: RefCount.cpp:18
double float64_t
Definition: common.h:50
Version * version
Definition: SGObject.h:375
virtual bool save(CSerializableFile *file, const char *prefix="")
Definition: Parameter.cpp:2769
virtual void save_serializable_post()
Definition: SGObject.cpp:436
void print_modsel_params()
Definition: SGObject.cpp:474
int32_t ref()
Definition: RefCount.cpp:5
CSGObject * new_sgserializable(const char *sgserializable_name, EPrimitiveType generic)
Class Version provides version information.
Definition: Version.h:28
Parameter * m_model_selection_parameters
Definition: SGObject.h:381
void get_incremental_hash(uint32_t &hash, uint32_t &carry, uint32_t &total_length)
Definition: Parameter.cpp:2423
virtual bool equals(CSGObject *other, float64_t accuracy=0.0, bool tolerant=false)
Definition: SGObject.cpp:618
index_t * m_length_y
Definition: DataType.h:78
virtual CSGObject * deep_copy() const
Definition: SGObject.cpp:198
void set_global_parallel(Parallel *parallel)
Definition: SGObject.cpp:241
void to_string(char *dest, size_t n) const
Definition: DataType.cpp:145
virtual void load_serializable_pre()
Definition: SGObject.cpp:421
virtual void load_serializable_post()
Definition: SGObject.cpp:426
EContainerType m_ctype
Definition: DataType.h:71
#define SG_UNREF(x)
Definition: SGObject.h:52
Class Parallel provides helper functions for multithreading.
Definition: Parallel.h:27
#define SG_DEBUG(...)
Definition: SGIO.h:107
virtual bool save_serializable(CSerializableFile *file, const char *prefix="")
Definition: SGObject.cpp:314
const char * get_exception_string()
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
#define SG_SGCDEBUG(...)
Definition: SGIO.h:163
SGIO * get_global_io()
Definition: SGObject.cpp:235
#define PT_NOT_GENERIC
Definition: DataType.h:21
SGString< T > * strings
Definition: SGStringList.h:88
index_t get_modsel_param_index(const char *param_name)
Definition: SGObject.cpp:535
void set_global_io(SGIO *io)
Definition: SGObject.cpp:228
uint32_t m_hash
Definition: SGObject.h:387
bool copy(TParameter *target)
Definition: Parameter.cpp:3770
EPrimitiveType m_ptype
Definition: DataType.h:75
Class SGIO, used to do input output operations throughout shogun.
Definition: SGIO.h:243
Parameter * m_gradient_parameters
Definition: SGObject.h:384
virtual void print_serializable(const char *prefix="")
Definition: SGObject.cpp:308
virtual bool parameter_hash_changed()
Definition: SGObject.cpp:262
void set_global_version(Version *version)
Definition: SGObject.cpp:283
the class CMap, a map based on the hash-table. w: http://en.wikipedia.org/wiki/Hash_table ...
Definition: SGObject.h:36

SHOGUN Machine Learning Toolbox - Documentation