Skip to content
Snippets Groups Projects
Select Git revision
  • 3fe310a08a2a369d1bb54f31cb7776636ea86648
  • master default protected
  • fullUD
  • movementInAction
4 results

Decoder.hpp

Blame
  • Decoder.hpp 1.03 KiB
    /// @file Decoder.hpp
    /// @author Franck Dary
    /// @version 1.0
    /// @date 2018-08-03
    
    #ifndef DECODER__H
    #define DECODER__H
    
    #include "TransitionMachine.hpp"
    #include "BD.hpp"
    #include "Config.hpp"
    
    /// @brief A simple object capable of using a trained TransitionMachine to process a given BD.
    class Decoder
    {
      private :
    
      /// @brief The trained TransitionMachine
      TransitionMachine & tm;
      /// @brief The BD we need to fill
      BD & bd;
      /// @brief The current configuration of the TransitionMachine
      Config & config;
      /// @brief is true, decode will print infos on stderr
      bool debugMode;
    
      public :
    
      /// @brief Use tm to fill bd.
      ///
      /// At the start of the function, bd must contain the input.\n
      /// At the end of the function, bd will be terminal.
      /// @param tm The trained TransitionMachine
      /// @param bd The BD we need to fill
      /// @param config The current configuration of the TransitionMachine
      Decoder(TransitionMachine & tm, BD & bd, Config & config, bool debugMode);
      /// @brief Fill bd using tm.
      void decode();
    };
    
    #endif