An abstract base module for the machine learning YARP interface.  
 More...
#include <IMachineLearnerModule.h>
 | 
|   | IMachineLearnerModule (const IMachineLearnerModule &other) | 
|   | Copy Constructor (private and unimplemented on purpose).  
  | 
|   | 
| IMachineLearnerModule &  | operator= (const IMachineLearnerModule &other) | 
|   | Assignment operator (private and unimplemented on purpose).  
  | 
|   | 
| void  | registerPort (yarp::os::Contactable &port, std::string name) | 
|   | Register a port with a given name.  
  | 
|   | 
| virtual void  | registerAllPorts ()=0 | 
|   | Registers all ports used by this module.  
  | 
|   | 
| virtual void  | unregisterAllPorts ()=0 | 
|   | Unregisters all ports used by this module.  
  | 
|   | 
| virtual void  | printOptions (std::string error="")=0 | 
|   | Prints the accepted command line options with an optional error message.  
  | 
|   | 
| virtual void  | loadCommandFile (std::string fname, yarp::os::Bottle *out=(yarp::os::Bottle *) 0) | 
|   | Reads bottles from a file and sends these one by one to the respond method.  
  | 
|   | 
| virtual yarp::os::ResourceFinder &  | getResourceFinder () | 
|   | Returns a reference to the cached ResourceFinder.  
  | 
|   | 
| std::string  | findFile (std::string fname) | 
|   | Finds the full path to a specified filename using the ResourceFinder.  
  | 
|   | 
| virtual void  | setResourceFinder (yarp::os::ResourceFinder *rf) | 
|   | Mutator for the locally stored ResourceFinder.  
  | 
|   | 
 | 
| yarp::os::Port  | cmd_in | 
|   | An input port for commands.  
  | 
|   | 
| std::string  | portPrefix | 
|   | A prefix path for the ports that will be registered.  
  | 
|   | 
| DispatcherManager  | dmanager | 
|   | An instance of the DispatchManager to configure event listeners.  
  | 
|   | 
| yarp::os::ResourceFinder *  | rf | 
|   | A pointer to the ResourceFinder.  
  | 
|   | 
An abstract base module for the machine learning YARP interface. 
This abstract class contains base functionality that is shared by PredictModule, TrainModule and TransformModule.
- See also
 - iCub::learningmachine::IMachineLearner 
 
- 
iCub::learningmachine::TrainModule 
 
- 
iCub::learningmachine::PredictModule 
 
- 
iCub::learningmachine::TransformerModule
 
- Author
 - Arjan Gijsberts 
 
Definition at line 59 of file IMachineLearnerModule.h.
 
◆ IMachineLearnerModule() [1/2]
  
  
      
        
          | iCub::learningmachine::IMachineLearnerModule::IMachineLearnerModule  | 
          ( | 
          const IMachineLearnerModule &  | 
          other | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Copy Constructor (private and unimplemented on purpose). 
 
 
◆ IMachineLearnerModule() [2/2]
  
  
      
        
          | iCub::learningmachine::IMachineLearnerModule::IMachineLearnerModule  | 
          ( | 
          std::string  | 
          pp | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ ~IMachineLearnerModule()
  
  
      
        
          | virtual iCub::learningmachine::IMachineLearnerModule::~IMachineLearnerModule  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ close()
  
  
      
        
          | bool iCub::learningmachine::IMachineLearnerModule::close  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
◆ findFile()
  
  
      
        
          | std::string iCub::learningmachine::IMachineLearnerModule::findFile  | 
          ( | 
          std::string  | 
          fname | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Finds the full path to a specified filename using the ResourceFinder. 
This method is necessary to work around the limitation of ResourceFinder to only work with registered keys instead of directly with filenames.
- Parameters
 - 
  
  
 
- Returns
 - the full path 
 
- Exceptions
 - 
  
    | std::runtime_error | if the file cannot be located  | 
  
   
Definition at line 44 of file IMachineLearnerModule.cpp.
 
 
◆ getResourceFinder()
  
  
      
        
          | virtual yarp::os::ResourceFinder & iCub::learningmachine::IMachineLearnerModule::getResourceFinder  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineprotectedvirtual   | 
  
 
Returns a reference to the cached ResourceFinder. 
- Returns
 - a reference to a ResourceFinder 
 
- Exceptions
 - 
  
    | std::runtime_error | if there is no cached ResourceFinder  | 
  
   
Definition at line 129 of file IMachineLearnerModule.h.
 
 
◆ loadCommandFile()
  
  
      
        
          | void iCub::learningmachine::IMachineLearnerModule::loadCommandFile  | 
          ( | 
          std::string  | 
          fname,  | 
         
        
           | 
           | 
          yarp::os::Bottle *  | 
          out = (yarp::os::Bottle*) 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protectedvirtual   | 
  
 
Reads bottles from a file and sends these one by one to the respond method. 
- Parameters
 - 
  
    | fname | the filename  | 
    | out | an optional Bottle to which the replies will be appended  | 
  
   
Definition at line 68 of file IMachineLearnerModule.cpp.
 
 
◆ operator=()
Assignment operator (private and unimplemented on purpose). 
 
 
◆ printOptions()
  
  
      
        
          | virtual void iCub::learningmachine::IMachineLearnerModule::printOptions  | 
          ( | 
          std::string  | 
          error = "" | ) | 
           | 
         
       
   | 
  
protectedpure virtual   | 
  
 
 
◆ registerAllPorts()
  
  
      
        
          | virtual void iCub::learningmachine::IMachineLearnerModule::registerAllPorts  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protectedpure virtual   | 
  
 
 
◆ registerPort()
  
  
      
        
          | void iCub::learningmachine::IMachineLearnerModule::registerPort  | 
          ( | 
          yarp::os::Contactable &  | 
          port,  | 
         
        
           | 
           | 
          std::string  | 
          name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Register a port with a given name. 
- Parameters
 - 
  
    | port | the port object  | 
    | name | the name for the port  | 
  
   
Definition at line 30 of file IMachineLearnerModule.cpp.
 
 
◆ setResourceFinder()
  
  
      
        
          | virtual void iCub::learningmachine::IMachineLearnerModule::setResourceFinder  | 
          ( | 
          yarp::os::ResourceFinder *  | 
          rf | ) | 
           | 
         
       
   | 
  
inlineprotectedvirtual   | 
  
 
Mutator for the locally stored ResourceFinder. 
The module does not take responsibility for the allocated memory.
- Parameters
 - 
  
    | rf | a pointer to a ResourceFinder  | 
  
   
Definition at line 153 of file IMachineLearnerModule.h.
 
 
◆ unregisterAllPorts()
  
  
      
        
          | virtual void iCub::learningmachine::IMachineLearnerModule::unregisterAllPorts  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protectedpure virtual   | 
  
 
 
◆ updateModule()
  
  
      
        
          | virtual bool iCub::learningmachine::IMachineLearnerModule::updateModule  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ cmd_in
  
  
      
        
          | yarp::os::Port iCub::learningmachine::IMachineLearnerModule::cmd_in | 
         
       
   | 
  
protected   | 
  
 
 
◆ dmanager
◆ portPrefix
  
  
      
        
          | std::string iCub::learningmachine::IMachineLearnerModule::portPrefix | 
         
       
   | 
  
protected   | 
  
 
 
◆ rf
  
  
      
        
          | yarp::os::ResourceFinder* iCub::learningmachine::IMachineLearnerModule::rf | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following files: