GClasses
|
This class is for loading various learning algorithms from a DOM. When any learning algorithm is saved, it calls baseDomNode, which creates (among other things) a field named "class" which specifies the class name of the algorithm. This class contains methods that will recognize any of the classes in this library and load them. If it doesn't recognize a class, it will either return NULL or throw and exception, depending on the flags you pass to the constructor. Obviously this loader won't recognize any classes that you make. Therefore, you should overload the corresponding method in this class with a new method that will first recognize and load your classes, and then call these methods to handle other types.
#include <GLearner.h>
Public Member Functions | |
GLearnerLoader (bool throwIfClassNotFound=true) | |
Constructor. If throwIfClassNotFound is true, then all of the methods in this class will throw an exception of the DOM refers to an unrecognized class. If throwIfClassNotFound is false, then NULL will be returned if the class is not recognized. More... | |
virtual | ~GLearnerLoader () |
virtual GCollaborativeFilter * | loadCollaborativeFilter (const GDomNode *pNode) |
Loads a collaborative filtering algorithm from a DOM. More... | |
virtual GIncrementalTransform * | loadIncrementalTransform (const GDomNode *pNode) |
Loads an incremental transform (or a two-way incremental transform) from a DOM. More... | |
virtual GSupervisedLearner * | loadLearner (const GDomNode *pNode) |
Loads a learning algorithm from a DOM. More... | |
Protected Attributes | |
bool | m_throwIfClassNotFound |
|
inline |
Constructor. If throwIfClassNotFound is true, then all of the methods in this class will throw an exception of the DOM refers to an unrecognized class. If throwIfClassNotFound is false, then NULL will be returned if the class is not recognized.
|
inlinevirtual |
|
virtual |
Loads a collaborative filtering algorithm from a DOM.
|
virtual |
Loads an incremental transform (or a two-way incremental transform) from a DOM.
|
virtual |
Loads a learning algorithm from a DOM.
|
protected |