Skip to content

Commit e3894cb

Browse files
Added overloaded PlaintextImpl::Decode and removed a duplicate binding of PlaintextImpl::GetSchemeID
1 parent f154bde commit e3894cb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/bindings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ void bind_keys(py::module &m)
10501050
.def_readwrite("secretKey", &KeyPair<DCRTPoly>::secretKey)
10511051
.def("good", &KeyPair<DCRTPoly>::good,kp_good_docs);
10521052
py::class_<EvalKeyImpl<DCRTPoly>, std::shared_ptr<EvalKeyImpl<DCRTPoly>>>(m, "EvalKey")
1053-
.def(py::init<>())
1053+
.def(py::init<>())
10541054
.def("GetKeyTag", &EvalKeyImpl<DCRTPoly>::GetKeyTag)
10551055
.def("SetKeyTag", &EvalKeyImpl<DCRTPoly>::SetKeyTag);
10561056
py::class_<std::map<usint, EvalKey<DCRTPoly>>, std::shared_ptr<std::map<usint, EvalKey<DCRTPoly>>>>(m, "EvalKeyMap")
@@ -1069,8 +1069,6 @@ void bind_encodings(py::module &m)
10691069
ptx_GetSchemeID_docs)
10701070
.def("GetLength", &PlaintextImpl::GetLength,
10711071
ptx_GetLength_docs)
1072-
.def("GetSchemeID", &PlaintextImpl::GetSchemeID,
1073-
ptx_GetSchemeID_docs)
10741072
.def("SetLength", &PlaintextImpl::SetLength,
10751073
ptx_SetLength_docs,
10761074
py::arg("newSize"))
@@ -1080,7 +1078,9 @@ void bind_encodings(py::module &m)
10801078
ptx_GetLogPrecision_docs)
10811079
.def("Encode", &PlaintextImpl::Encode,
10821080
ptx_Encode_docs)
1083-
.def("Decode", &PlaintextImpl::Decode,
1081+
.def("Decode", py::overload_cast<>(&PlaintextImpl::Decode),
1082+
ptx_Decode_docs)
1083+
.def("Decode", py::overload_cast<size_t, double, ScalingTechnique, ExecutionMode>(&PlaintextImpl::Decode),
10841084
ptx_Decode_docs)
10851085
.def("LowBound", &PlaintextImpl::LowBound,
10861086
ptx_LowBound_docs)

0 commit comments

Comments
 (0)