SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2013 Shell Hu 00008 * Copyright (C) 2013 Shell Hu 00009 */ 00010 00011 #ifndef __FACTORGRAPH_FEATURES_H__ 00012 #define __FACTORGRAPH_FEATURES_H__ 00013 00014 #include <shogun/features/Features.h> 00015 #include <shogun/structure/FactorGraph.h> 00016 00017 namespace shogun 00018 { 00019 00023 class CFactorGraphFeatures : public CFeatures 00024 { 00025 public: 00027 CFactorGraphFeatures(); 00028 00033 CFactorGraphFeatures(int32_t num_samples); 00034 00035 virtual ~CFactorGraphFeatures(); 00036 00041 virtual CFeatures* duplicate() const; 00042 00047 virtual EFeatureType get_feature_type() const; 00048 00053 virtual EFeatureClass get_feature_class() const; 00054 00059 virtual int32_t get_num_vectors() const; 00060 00065 virtual const char* get_name() const { return "FactorGraphFeatures"; } 00066 00072 bool add_sample(CFactorGraph* fg); 00073 00079 CFactorGraph* get_sample(index_t idx); 00080 00086 static CFactorGraphFeatures* obtain_from_generic(CFeatures* base_feats); 00087 00088 protected: 00090 CDynamicObjectArray* m_samples; 00091 00092 private: 00094 void init(); 00095 }; 00096 00097 } 00098 00099 #endif /* __FACTORGRAPH_FEATURES_H__ */