SHOGUN v0.9.0
|
Class SGObject is the base class of all shogun objects.
Apart from dealing with reference counting that is used to manage shogung objects in memory (erase unused object, avoid cleaning objects when they are still in use), it provides interfaces for:
在文件SGObject.h第61行定义。
被CArray< bool >、CArray< char >、CArray< CPlifBase * >、CArray< float32_t >、CArray< float64_t >、CArray< int32_t >、CCache< char >、CCache< float64_t >、CCache< KERNELCACHE_ELEM >、CCache< ST >、CCache< TSparseEntry< float64_t > >、CCache< TSparseEntry< ST > >、CCache< uint16_t >、CCache< uint32_t >、CCache< uint8_t >、CDynamicArray< float64_t >、CDynamicArray< int32_t >、CDynamicArray< uint64_t >、CMemoryMappedFile< ST >、CTrie< DNATrie >、CTrie< POIMTrie >、CAlphabet、CArray< T >、CBinaryStream< T >、CBitString、CCache< T >、CClassifier、CCompressor、CCplex、CDistance、CDistribution、CDynamicArray< T >、CDynamicArrayPtr、CDynProg、CFeatures、CFile、CGCArray< T >、CGMNPLib、CGNPPLib、CHash、CIntronList、CKernel、CKernelNormalizer、CLabels、CList、CListElement、CMath、CMemoryMappedFile< T >、CNode、CPerformanceMeasures、CPlifBase、CPlifMatrix、CPreProc、CQPBSVMLib、CSegmentLoss、CSerializableFile、CSerializableFile::TSerializableReader、CSet< T >、CSignal、CSignalModel、CSimpleFile< T >、CTaxonomy、CTime、CTrainPredMaster、CTrie< Trie >及MKLMultiClassOptimizationBase继承.
公有成员 | |
CSGObject () | |
CSGObject (const CSGObject &orig) | |
virtual | ~CSGObject () |
virtual const char * | get_name () const =0 |
virtual bool | is_generic (EPrimitiveType *generic) const |
template<class T > | |
void | set_generic () |
void | unset_generic () |
virtual void | print_serializable (const char *prefix="") |
virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
void | set_io (IO *io) |
IO * | get_io () |
void | set_parallel (Parallel *parallel) |
Parallel * | get_parallel () |
void | set_version (Version *version) |
Version * | get_version () |
公有属性 | |
IO * | io |
Parallel * | parallel |
Version * | version |
保护成员 | |
virtual void | load_serializable_pre () throw (ShogunException) |
virtual void | load_serializable_post () throw (ShogunException) |
virtual void | save_serializable_pre () throw (ShogunException) |
virtual void | save_serializable_post () throw (ShogunException) |
保护属性 | |
Parameter * | m_parameters |
CSGObject | ( | ) |
default constructor
在文件SGObject.cpp第103行定义。
copy constructor
在文件SGObject.cpp第112行定义。
~CSGObject | ( | ) | [virtual] |
destructor
在文件SGObject.cpp第119行定义。
IO * get_io | ( | ) |
virtual const char* get_name | ( | ) | const [pure virtual] |
Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.
在CDistanceMachine、CKernelMachine、CKernelPerceptron、CKNN、CLDA、CLinearClassifier、CLPBoost、CLPM、CMKL、MKLMultiClassGLPK、MKLMultiClassGradient、MKLMultiClassOptimizationBase、CPerceptron、CPluginEstimate、CSubGradientLPM、CDomainAdaptationSVMLinear、CGMNPLib、CGMNPSVM、CGNPPLib、CGNPPSVM、CGPBTSVM、CLaRank、CLibLinear、CLibSVM、CLibSVMMultiClass、CLibSVMOneClass、CMPDSVM、CQPBSVMLib、CScatterSVM、CSubGradientSVM、CSVM、CSVMLin、CSVMOcas、CSVMSGD、CWDSVMOcas、CHierarchical、CKMeans、CBrayCurtisDistance、CCanberraMetric、CCanberraWordDistance、CChebyshewMetric、CChiSquareDistance、CCosineDistance、CCustomDistance、CEuclidianDistance、CGeodesicMetric、CHammingWordDistance、CJensenMetric、CKernelDistance、CManhattanMetric、CManhattanWordDistance、CMinkowskiMetric、CRealDistance、CSimpleDistance< ST >、CSparseDistance< ST >、CSparseEuclidianDistance、CStringDistance< ST >、CTanimotoDistance、CGHMM、CHistogram、CHMM、CLinearHMM、CPerformanceMeasures、CAlphabet、CAttributeFeatures、CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CFKFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CLabels、CLBPPyrDotFeatures、CPolyFeatures、CRealFileFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CTOPFeatures、CWDFeatures、CSignalModel、CTrainPredMaster、CAUCKernel、CAvgDiagKernelNormalizer、CChi2Kernel、CCombinedKernel、CCommUlongStringKernel、CCommWordStringKernel、CConstKernel、CCustomKernel、CDiagKernel、CDiceKernelNormalizer、CDistanceKernel、CDotKernel、CFirstElementKernelNormalizer、CFixedDegreeStringKernel、CGaussianKernel、CGaussianMatchStringKernel、CGaussianShiftKernel、CGaussianShortRealKernel、CHistogramIntersectionKernel、CHistogramWordStringKernel、CIdentityKernelNormalizer、CLinearKernel、CLinearStringKernel、CLocalAlignmentStringKernel、CLocalityImprovedStringKernel、CMatchWordStringKernel、CMultitaskKernelMaskNormalizer、CMultitaskKernelMaskPairNormalizer、CMultitaskKernelMklNormalizer、CMultitaskKernelNormalizer、CMultitaskKernelPlifNormalizer、CNode、CTaxonomy、CMultitaskKernelTreeNormalizer、COligoStringKernel、CPolyKernel、CPolyMatchStringKernel、CPolyMatchWordStringKernel、CPyramidChi2、CRegulatoryModulesStringKernel、CRidgeKernelNormalizer、CSalzbergWordStringKernel、CScatterKernelNormalizer、CSigmoidKernel、CSimpleLocalityImprovedStringKernel、CSNPStringKernel、CSparseKernel< ST >、CSparseSpatialSampleStringKernel、CSpectrumMismatchRBFKernel、CSpectrumRBFKernel、CSqrtDiagKernelNormalizer、CStringKernel< ST >、CTanimotoKernelNormalizer、CTensorProductPairKernel、CVarianceKernelNormalizer、CWeightedCommWordStringKernel、CWeightedDegreePositionStringKernel、CWeightedDegreeRBFKernel、CWeightedDegreeStringKernel、CZeroMeanCenterKernelNormalizer、CArray< T >、CArray2< T >、CArray3< T >、CAsciiFile、CBinaryFile、CBinaryStream< T >、CBitString、CCache< T >、CCompressor、CCplex、CDynamicArray< T >、CDynamicArrayPtr、CFile、CGCArray< T >、CHash、CListElement、CList、CMath、CMemoryMappedFile< T >、CSerializableAsciiFile、SerializableAsciiReader00、CSet< T >、CSignal、CSimpleFile< T >、CTime、CTrie< Trie >、CLogPlusOne、CNormOne、CPCACut、CPreProc、CPruneVarSubMean、CSortUlongString、CSortWordString、CKRR、CLibSVR、CDynProg、CIntronList、CPlif、CPlifArray、CPlifMatrix、CSegmentLoss、CSimpleDistance< float64_t >、CSparseDistance< float64_t >、CStringDistance< uint16_t >、CSimpleFeatures< uint32_t >、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >、CStringFeatures< uint16_t >、CStringKernel< char >、CStringKernel< uint16_t >、CStringKernel< uint64_t >、CArray< CPlifBase * >、CArray< float64_t >、CArray< float32_t >、CArray< int32_t >、CArray< char >、CArray< bool >、CArray2< CPlifBase * >、CArray2< float64_t >、CArray2< float32_t >、CArray2< int32_t >、CArray3< float64_t >、CCache< uint32_t >、CCache< ST >、CCache< float64_t >、CCache< TSparseEntry< ST > >、CCache< uint8_t >、CCache< KERNELCACHE_ELEM >、CCache< char >、CCache< uint16_t >、CCache< TSparseEntry< float64_t > >、CDynamicArray< float64_t >、CDynamicArray< int32_t >、CDynamicArray< uint64_t >、CMemoryMappedFile< ST >、CTrie< DNATrie >及CTrie< POIMTrie >内被实现。
Parallel * get_parallel | ( | ) |
Version * get_version | ( | ) |
bool is_generic | ( | EPrimitiveType * | generic | ) | const [virtual] |
If the SGSerializable is a class template then TRUE will be returned and GENERIC is set to the type of the generic.
generic | set to the type of the generic if returning TRUE |
在文件SGObject.cpp第191行定义。
bool load_serializable | ( | CSerializableFile * | file, |
const char * | prefix = "" |
||
) | [virtual] |
Load this object from file. If it will fail (returning FALSE) then this object will contain inconsistent data and should not be used!
file | where to load from |
prefix | prefix for members |
在文件SGObject.cpp第263行定义。
void load_serializable_post | ( | void | ) | throw (ShogunException) [protected, virtual] |
Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.
ShogunException | Will be thrown if an error occurres. |
被CLinearHMM、CAlphabet、CGaussianKernel、CKernel、CWeightedDegreePositionStringKernel及CList重载。
在文件SGObject.cpp第318行定义。
void load_serializable_pre | ( | ) | throw (ShogunException) [protected, virtual] |
Can (optionally) be overridden to pre-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_PRE is called.
ShogunException | Will be thrown if an error occurres. |
在文件SGObject.cpp第313行定义。
void print_serializable | ( | const char * | prefix = "" | ) | [virtual] |
bool save_serializable | ( | CSerializableFile * | file, |
const char * | prefix = "" |
||
) | [virtual] |
Save this object to file.
file | where to save the object; will be closed during returning if PREFIX is an empty string. |
prefix | prefix for members |
在文件SGObject.cpp第209行定义。
void save_serializable_post | ( | ) | throw (ShogunException) [protected, virtual] |
Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_POST is called.
ShogunException | Will be thrown if an error occurres. |
被CKernel重载。
在文件SGObject.cpp第328行定义。
void save_serializable_pre | ( | ) | throw (ShogunException) [protected, virtual] |
Can (optionally) be overridden to pre-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_PRE is called.
ShogunException | Will be thrown if an error occurres. |
被CKernel重载。
在文件SGObject.cpp第323行定义。
void set_generic< floatmax_t > | ( | ) |
set generic type to T
在文件SGObject.cpp第34行定义。
void set_io | ( | IO * | io | ) |
void set_parallel | ( | Parallel * | parallel | ) |
void set_version | ( | Version * | version | ) |
void unset_generic | ( | ) |
unset generic type
this has to be called in classes specializing a template class
在文件SGObject.cpp第198行定义。
在文件SGObject.h第264行定义。
Parameter* m_parameters [protected] |
在文件SGObject.h第269行定义。
在文件SGObject.h第265行定义。
在文件SGObject.h第266行定义。