AssociativeContainerOfOpaqueTypes.cc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "AssociativeContainerOfOpaqueTypes.h"
  2. namespace openfhe
  3. {
  4. UnorderedMapFromIndexToDCRTPoly::UnorderedMapFromIndexToDCRTPoly(
  5. std::unordered_map<uint32_t, lbcrypto::DCRTPoly> indexToDCRTPolyUnorderedMap)
  6. : m_indexToDCRTPolyUnorderedMap(std::move(indexToDCRTPolyUnorderedMap))
  7. { }
  8. std::unordered_map<uint32_t, lbcrypto::DCRTPoly>& UnorderedMapFromIndexToDCRTPoly::GetInternal()
  9. {
  10. return m_indexToDCRTPolyUnorderedMap;
  11. }
  12. MapFromIndexToEvalKey::MapFromIndexToEvalKey(
  13. const std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>
  14. sharedPtrToindexToEvalKeyDCRTPolyMap)
  15. : m_sharedPtrToindexToEvalKeyDCRTPolyMap(sharedPtrToindexToEvalKeyDCRTPolyMap)
  16. { }
  17. const std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>&
  18. MapFromIndexToEvalKey::GetInternalMap() const
  19. {
  20. return *m_sharedPtrToindexToEvalKeyDCRTPolyMap;
  21. }
  22. std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>
  23. MapFromIndexToEvalKey::GetInternal() const
  24. {
  25. return m_sharedPtrToindexToEvalKeyDCRTPolyMap;
  26. }
  27. MapFromStringToVectorOfEvalKeys::MapFromStringToVectorOfEvalKeys(
  28. std::map<std::string, std::vector<std::shared_ptr<EvalKeyImpl>>> stringToVectorOfEvalKeysMap)
  29. : m_stringToVectorOfEvalKeysMap(std::move(stringToVectorOfEvalKeysMap))
  30. { }
  31. MapFromStringToMapFromIndexToEvalKey::MapFromStringToMapFromIndexToEvalKey(
  32. std::map<std::string, std::shared_ptr<std::map<uint32_t, std::shared_ptr<EvalKeyImpl>>>>
  33. stringToMapFromIndexToEvalKeyMap)
  34. : m_stringToMapFromIndexToEvalKeyMap(std::move(stringToMapFromIndexToEvalKeyMap))
  35. { }
  36. } // openfhe