#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
Include dependency graph for object.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | Object | 
| The root (ancestor) of all classes.  More... | |
| struct | _register_creator | 
Defines | |
| #define | INFINITESIMAL (8e-16) | 
| almost equal to 0, 1+x/2-1>0   | |
| #define | EPSILON (1e-9) | 
| accumulated numerical error   | |
| #define | INFINITY (5e30) | 
| Should avoid using INFINITY since it is a lazy trick.   | |
| #define | OBJ_FUNC_UNDEFINED(fun) | 
| Stop the program and warn when an undefined function is called.   | |
| #define | REGISTER_CREATOR2(cls, p) | 
| Use a prefix p to allow several classes in a same .cpp file.   | |
| #define | REGISTER_CREATOR(cls) REGISTER_CREATOR2(cls,) | 
| #define | SERIALIZE_PARENT(pcls, os, vl, def_ver) vl.push_back(def_ver); pcls::serialize(os, vl) | 
| Serialize parents (ancestors) part.   | |
| #define | UNSERIALIZE_PARENT(pcls, is, vl, def_ver, ver) | 
| Unserialize parents and set current format number ver.   | |
Typedefs | |
| typedef unsigned long | UINT | 
| typedef double | REAL | 
| typedef Object *(* | _creator_t )() | 
Functions | |
| std::ostream & | operator<< (std::ostream &os, const Object &obj) | 
Definition in file object.h.
      
  | 
  
| 
 accumulated numerical error 
 Definition at line 20 of file object.h. Referenced by SVM::kernel(), CGBoost::linear_smpwgt(), lemga::lp_solve(), dataset::random_sample(), LearnModel::set_train_data(), SVM::signed_margin(), Perceptron::train(), and SVM::w_norm().  | 
  
      
  | 
  
| 
 almost equal to 0, 1+x/2-1>0 
 Definition at line 19 of file object.h. Referenced by LearnModel::c_error(), AdaCost< REAL >::cost(), AdaCost< REAL >::deriv1(), Boosting::margin(), SVM::margin_of(), Perceptron::margin_of(), Boosting::margin_of(), Bagging::margin_of(), LearnModel::min_margin(), DataFeeder::next_train_test(), SVM::operator()(), and Stump::train_1d().  | 
  
      
  | 
  
| 
 Should avoid using INFINITY since it is a lazy trick. 
 Definition at line 23 of file object.h. Referenced by LearnModel::min_margin(), and Stump::train_1d().  | 
  
      
  | 
  
| 
 Value: std::cerr<<__FILE__":"<<__LINE__<<": "<<id()<<"::" fun " undefined.\n"; \ exit(-99); Some member functions may be optional for child classes. There are two cases for an optional function: 
 This macro will stop the program with a ``function undefined" error. 
 
 
 Definition at line 53 of file object.h. Referenced by Boosting::convex_smpwgt(), Boosting::convex_weight(), AdaBoost::convex_weight(), Boosting::linear_smpwgt(), Boosting::linear_weight(), LearnModel::margin_of(), and NNLayer::train().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 Value: static const Object::id_t p##_id_ = #cls; \ static Object* p##_c_ () { return new cls; } \ const Object::id_t& cls::id () const { return p##_id_; } \ static const _register_creator p##_(p##_id_, p##_c_) 
  | 
  
      
  | 
  
| 
 Serialize parents (ancestors) part. 
 
 Definition at line 158 of file object.h. Referenced by SVM::serialize(), Stump::serialize(), Pulse::serialize(), Perceptron::serialize(), Ordinal_BLE::serialize(), NNLayer::serialize(), MultiClass_ECOC::serialize(), LearnModel::serialize(), Sigmoid::serialize(), RBF::serialize(), Polynomial::serialize(), Kernel::serialize(), FeedForwardNN::serialize(), HoldoutCrossVal::serialize(), vFoldCrossVal::serialize(), CrossVal::serialize(), CGBoost::serialize(), Cascade::serialize(), Boosting::serialize(), and Aggregating::serialize().  | 
  
      
  | 
  
| 
 Value: if (!pcls::unserialize(is, vl)) return false; \ const ver_t ver = vl.back(); \ if (ver > def_ver) { \ std::cerr << this->id() \ << ": unserialize: format newer than the program\n"; \ return false; \ } \ if (ver > 0) vl.pop_back() 
 
 Definition at line 166 of file object.h. Referenced by SVM::unserialize(), Stump::unserialize(), Pulse::unserialize(), Perceptron::unserialize(), Ordinal_BLE::unserialize(), NNLayer::unserialize(), MultiClass_ECOC::unserialize(), LearnModel::unserialize(), Sigmoid::unserialize(), RBF::unserialize(), Polynomial::unserialize(), Kernel::unserialize(), FeedForwardNN::unserialize(), HoldoutCrossVal::unserialize(), vFoldCrossVal::unserialize(), CrossVal::unserialize(), CGBoost::unserialize(), Cascade::unserialize(), Boosting::unserialize(), and Aggregating::unserialize().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 125 of file object.h. References Object::serialize().  | 
  
 1.4.6