Skip to content

Commit

Permalink
Added overloaded PlaintextImpl::Decode and removed a duplicate bindin…
Browse files Browse the repository at this point in the history
…g of PlaintextImpl::GetSchemeID
  • Loading branch information
dsuponitskiy-duality committed Nov 26, 2024
1 parent 4269e99 commit ae785ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ void bind_keys(py::module &m)
.def_readwrite("secretKey", &KeyPair<DCRTPoly>::secretKey)
.def("good", &KeyPair<DCRTPoly>::good,kp_good_docs);
py::class_<EvalKeyImpl<DCRTPoly>, std::shared_ptr<EvalKeyImpl<DCRTPoly>>>(m, "EvalKey")
.def(py::init<>())
.def(py::init<>())
.def("GetKeyTag", &EvalKeyImpl<DCRTPoly>::GetKeyTag)
.def("SetKeyTag", &EvalKeyImpl<DCRTPoly>::SetKeyTag);
py::class_<std::map<usint, EvalKey<DCRTPoly>>, std::shared_ptr<std::map<usint, EvalKey<DCRTPoly>>>>(m, "EvalKeyMap")
Expand All @@ -1043,8 +1043,6 @@ void bind_encodings(py::module &m)
ptx_GetSchemeID_docs)
.def("GetLength", &PlaintextImpl::GetLength,
ptx_GetLength_docs)
.def("GetSchemeID", &PlaintextImpl::GetSchemeID,
ptx_GetSchemeID_docs)
.def("SetLength", &PlaintextImpl::SetLength,
ptx_SetLength_docs,
py::arg("newSize"))
Expand All @@ -1054,7 +1052,9 @@ void bind_encodings(py::module &m)
ptx_GetLogPrecision_docs)
.def("Encode", &PlaintextImpl::Encode,
ptx_Encode_docs)
.def("Decode", &PlaintextImpl::Decode,
.def("Decode", py::overload_cast<>(&PlaintextImpl::Decode),
ptx_Decode_docs)
.def("Decode", py::overload_cast<size_t, double, ScalingTechnique, ExecutionMode>(&PlaintextImpl::Decode),
ptx_Decode_docs)
.def("LowBound", &PlaintextImpl::LowBound,
ptx_LowBound_docs)
Expand Down

0 comments on commit ae785ca

Please sign in to comment.