text: /* ---------------------------------------------------------------------- */
  /* Copyright (c) Microsoft Corporation. All rights reserved.              */
  /* Licensed under the MIT License                                         */
  /* ---------------------------------------------------------------------- */
  #define DLL_EXPORT_COMPILE
  
  #include "SharedLibrary_OneHotEncoderFeaturizer.h"
  #include "SharedLibrary_PointerTable.h"
  
  #include "Archive.h"
  #include "OneHotEncoderFeaturizer.h"
  
  // These method(s) are defined in SharedLibrary_Common.cpp
  ErrorInfoHandle * CreateErrorInfo(std::exception const &ex);
  std::chrono::system_clock::time_point CreateDateTime(DateTimeParameter const &param);
  
  extern "C" {
  
  // I don't know why MSVC thinks that there is unreachable
  // code in these methods during release builds.
  #if (defined _MSC_VER)
  #   pragma warning(push)
  #   pragma warning(disable: 4702) // Unreachable code
  #endif
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <int8> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_int8_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_int8_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_GetState(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_Fit(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*in*/ int8_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_FitBuffer(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*in*/ int8_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_int8_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_int8_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int8_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_int8_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int8_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_int8_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_int8_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int8_Transform(/*in*/ OneHotEncoderFeaturizer_int8_TransformerHandle *pHandle, /*in*/ int8_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int8_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <int16> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_int16_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_int16_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_GetState(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_Fit(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*in*/ int16_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_FitBuffer(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*in*/ int16_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_int16_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_int16_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int16_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_int16_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int16_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_int16_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_int16_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int16_Transform(/*in*/ OneHotEncoderFeaturizer_int16_TransformerHandle *pHandle, /*in*/ int16_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int16_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <int32> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_int32_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_int32_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_GetState(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_Fit(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*in*/ int32_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_FitBuffer(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*in*/ int32_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_int32_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_int32_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int32_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_int32_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int32_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_int32_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_int32_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int32_Transform(/*in*/ OneHotEncoderFeaturizer_int32_TransformerHandle *pHandle, /*in*/ int32_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int32_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <int64> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_int64_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_int64_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_GetState(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_Fit(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*in*/ int64_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_FitBuffer(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*in*/ int64_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_int64_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_int64_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int64_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_int64_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_int64_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_int64_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_int64_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_int64_Transform(/*in*/ OneHotEncoderFeaturizer_int64_TransformerHandle *pHandle, /*in*/ int64_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::int64_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <uint8> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint8_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_GetState(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_Fit(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*in*/ uint8_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_FitBuffer(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*in*/ uint8_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_uint8_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_uint8_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint8_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_uint8_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint8_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_uint8_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_uint8_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint8_Transform(/*in*/ OneHotEncoderFeaturizer_uint8_TransformerHandle *pHandle, /*in*/ uint8_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint8_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <uint16> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint16_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_GetState(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_Fit(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*in*/ uint16_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_FitBuffer(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*in*/ uint16_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_uint16_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_uint16_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint16_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_uint16_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint16_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_uint16_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_uint16_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint16_Transform(/*in*/ OneHotEncoderFeaturizer_uint16_TransformerHandle *pHandle, /*in*/ uint16_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint16_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <uint32> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint32_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_GetState(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_Fit(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*in*/ uint32_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_FitBuffer(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*in*/ uint32_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_uint32_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_uint32_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint32_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_uint32_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint32_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_uint32_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_uint32_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint32_Transform(/*in*/ OneHotEncoderFeaturizer_uint32_TransformerHandle *pHandle, /*in*/ uint32_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint32_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <uint64> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint64_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_GetState(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_Fit(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*in*/ uint64_t input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_FitBuffer(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*in*/ uint64_t const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_uint64_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_uint64_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint64_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_uint64_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_uint64_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_uint64_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_uint64_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_uint64_Transform(/*in*/ OneHotEncoderFeaturizer_uint64_TransformerHandle *pHandle, /*in*/ uint64_t input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::uint64_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <float> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_float_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_float_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_GetState(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_Fit(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*in*/ float input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_FitBuffer(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*in*/ float const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_float_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_float_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_float_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_float_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_float_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_float_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_float_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_float_Transform(/*in*/ OneHotEncoderFeaturizer_float_TransformerHandle *pHandle, /*in*/ float input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::float_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <double> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_double_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_double_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_GetState(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_Fit(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*in*/ double input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_FitBuffer(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*in*/ double const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_double_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_double_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_double_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_double_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_double_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_double_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_double_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_double_Transform(/*in*/ OneHotEncoderFeaturizer_double_TransformerHandle *pHandle, /*in*/ double input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::double_t>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <bool> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_bool_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_bool_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_GetState(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_Fit(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*in*/ bool input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          // No validation
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_FitBuffer(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*in*/ bool const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_ptr, input_items));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_bool_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_bool_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_bool_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_bool_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_bool_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_bool_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_bool_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_bool_Transform(/*in*/ OneHotEncoderFeaturizer_bool_TransformerHandle *pHandle, /*in*/ bool input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          // No input validation
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<bool>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  /* ---------------------------------------------------------------------- */
  /* |                                                                      */
  /* |  OneHotEncoderFeaturizer <string> */
  /* |                                                                      */
  /* ---------------------------------------------------------------------- */
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_CreateEstimator(/*in*/ bool suppressUnrecognizedErrors, /*out*/ OneHotEncoderFeaturizer_string_EstimatorHandle **ppHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          // No validation
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>* pEstimator = new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>(std::make_shared<Microsoft::Featurizer::AnnotationMaps>(1), 0 , suppressUnrecognizedErrors);
  
          pEstimator->begin_training();
  
          size_t index(g_pointerTable.Add(pEstimator));
          *ppHandle = reinterpret_cast<OneHotEncoderFeaturizer_string_EstimatorHandle*>(index);
  
  
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_DestroyEstimator(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> * pEstimator = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(index);
          g_pointerTable.Remove(index);
  
          delete pEstimator;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_GetState(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*out*/ TrainingState *pState, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pState == nullptr) throw std::invalid_argument("'pState' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
          *pState = static_cast<TrainingState>(estimator.get_state());
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_IsTrainingComplete(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*out*/ bool *pIsTrainingComplete, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pIsTrainingComplete == nullptr) throw std::invalid_argument("'pIsTrainingComplete' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> const & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
          *pIsTrainingComplete = estimator.get_state() != Microsoft::Featurizer::TrainingState::Training;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_Fit(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*in*/ char const *input, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
          if(input == nullptr) throw std::invalid_argument("'input' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_FitBuffer(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*in*/ char const * const * input_ptr, /*in*/ std::size_t input_items, /*out*/ FitResult *pFitResult, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(pFitResult == nullptr) throw std::invalid_argument("'pFitResult' is null");
  
  
  
          if(input_ptr == nullptr) throw std::invalid_argument("'input_ptr' is null");
          if(input_items == 0) throw std::invalid_argument("'input_items' is 0");
  
          std::vector<std::string> input_buffer;
  
          input_buffer.reserve(input_items);
  
          char const * const * const input_end(input_ptr + input_items);
  
          while(input_ptr != input_end) {
          #if (defined __apple_build_version__ || defined __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)))
              input_buffer.push_back(*input_ptr);
          #else
              input_buffer.emplace_back(*input_ptr);
          #endif
              ++input_ptr;
          }
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
          *pFitResult = static_cast<unsigned char>(estimator.fit(input_buffer.data(), input_buffer.size()));
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_OnDataCompleted(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.on_data_completed();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_CompleteTraining(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pHandle)));
  
          estimator.complete_training();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_CreateTransformerFromEstimator(/*in*/ OneHotEncoderFeaturizer_string_EstimatorHandle *pEstimatorHandle, /*out*/ OneHotEncoderFeaturizer_string_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pEstimatorHandle == nullptr) throw std::invalid_argument("'pEstimatorHandle' is null");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
  
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string> & estimator(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>>(reinterpret_cast<size_t>(pEstimatorHandle)));
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType * pTransformer = reinterpret_cast<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType*>(estimator.create_transformer().release());
  
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_string_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_CreateTransformerFromSavedData(/*in*/ unsigned char const *pBuffer, /*in*/ std::size_t cBufferSize, /*out*/ OneHotEncoderFeaturizer_string_TransformerHandle **ppTransformerHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pBuffer == nullptr) throw std::invalid_argument("'pBuffer' is null");
          if(cBufferSize == 0) throw std::invalid_argument("'cBufferSize' is 0");
          if(ppTransformerHandle == nullptr) throw std::invalid_argument("'ppTransformerHandle' is null");
  
          Microsoft::Featurizer::Archive archive(pBuffer, cBufferSize);
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType* pTransformer(new Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType(archive));
  
          size_t index = g_pointerTable.Add(pTransformer);
          *ppTransformerHandle = reinterpret_cast<OneHotEncoderFeaturizer_string_TransformerHandle*>(index);
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_DestroyTransformer(/*in*/ OneHotEncoderFeaturizer_string_TransformerHandle *pHandle, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
          size_t index = reinterpret_cast<size_t>(pHandle);
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType* pTransformer = g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType>(index);
          g_pointerTable.Remove(index);
  
  
          delete pTransformer;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_CreateTransformerSaveData(/*in*/ OneHotEncoderFeaturizer_string_TransformerHandle *pHandle, /*out*/ unsigned char const **ppBuffer, /*out*/ std::size_t *pBufferSize, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
          if(ppBuffer == nullptr) throw std::invalid_argument("'ppBuffer' is null");
          if(pBufferSize == nullptr) throw std::invalid_argument("'pBufferSize' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
          Microsoft::Featurizer::Archive archive;
  
          transformer.save(archive);
  
          Microsoft::Featurizer::Archive::ByteArray const buffer(archive.commit());
  
          unsigned char * new_buffer(new unsigned char[buffer.size()]);
  
          std::copy(buffer.begin(), buffer.end(), new_buffer);
  
          *ppBuffer = new_buffer;
          *pBufferSize = buffer.size();
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  FEATURIZER_LIBRARY_API bool OneHotEncoderFeaturizer_string_Transform(/*in*/ OneHotEncoderFeaturizer_string_TransformerHandle *pHandle, /*in*/ char const *input, /*out*/ uint64_t * output_numElements, /*out*/ uint8_t *output_value, /*out*/ uint64_t *output_index, /*out*/ ErrorInfoHandle **ppErrorInfo) {
      if(ppErrorInfo == nullptr)
          return false;
  
      try {
          *ppErrorInfo = nullptr;
  
          if(pHandle == nullptr) throw std::invalid_argument("'pHandle' is null");
  
  
          if(input == nullptr) throw std::invalid_argument("'input' is null");
          if(output_numElements == nullptr) throw std::invalid_argument("'output_numElements' is null");
          if(output_value == nullptr) throw std::invalid_argument("'output_value' is null");
          if(output_index == nullptr) throw std::invalid_argument("'output_index' is null");
  
          Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType & transformer(*g_pointerTable.Get<Microsoft::Featurizer::Featurizers::OneHotEncoderEstimator<std::string>::TransformerType>(reinterpret_cast<size_t>(pHandle)));
  
          // Input
          auto result(transformer.execute(input));
  
          // Output
          *output_numElements = result.NumElements;
          *output_value = result.Value;
          *output_index = result.Index;
      
          return true;
      }
      catch(std::exception const &ex) {
          *ppErrorInfo = CreateErrorInfo(ex);
          return false;
      }
  }
  
  
  #if (defined _MSC_VER)
  #   pragma warning(pop)
  #endif
  
  } // extern "C"
  