Skip to content

Commit ae785ca

Browse files
Added overloaded PlaintextImpl::Decode and removed a duplicate binding of PlaintextImpl::GetSchemeID
1 parent 4269e99 commit ae785ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/bindings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ void bind_keys(py::module &m)
10241024
.def_readwrite("secretKey", &KeyPair<DCRTPoly>::secretKey)
10251025
.def("good", &KeyPair<DCRTPoly>::good,kp_good_docs);
10261026
py::class_<EvalKeyImpl<DCRTPoly>, std::shared_ptr<EvalKeyImpl<DCRTPoly>>>(m, "EvalKey")
1027-
.def(py::init<>())
1027+
.def(py::init<>())
10281028
.def("GetKeyTag", &EvalKeyImpl<DCRTPoly>::GetKeyTag)
10291029
.def("SetKeyTag", &EvalKeyImpl<DCRTPoly>::SetKeyTag);
10301030
py::class_<std::map<usint, EvalKey<DCRTPoly>>, std::shared_ptr<std::map<usint, EvalKey<DCRTPoly>>>>(m, "EvalKeyMap")
@@ -1043,8 +1043,6 @@ void bind_encodings(py::module &m)
10431043
ptx_GetSchemeID_docs)
10441044
.def("GetLength", &PlaintextImpl::GetLength,
10451045
ptx_GetLength_docs)
1046-
.def("GetSchemeID", &PlaintextImpl::GetSchemeID,
1047-
ptx_GetSchemeID_docs)
10481046
.def("SetLength", &PlaintextImpl::SetLength,
10491047
ptx_SetLength_docs,
10501048
py::arg("newSize"))
@@ -1054,7 +1052,9 @@ void bind_encodings(py::module &m)
10541052
ptx_GetLogPrecision_docs)
10551053
.def("Encode", &PlaintextImpl::Encode,
10561054
ptx_Encode_docs)
1057-
.def("Decode", &PlaintextImpl::Decode,
1055+
.def("Decode", py::overload_cast<>(&PlaintextImpl::Decode),
1056+
ptx_Decode_docs)
1057+
.def("Decode", py::overload_cast<size_t, double, ScalingTechnique, ExecutionMode>(&PlaintextImpl::Decode),
10581058
ptx_Decode_docs)
10591059
.def("LowBound", &PlaintextImpl::LowBound,
10601060
ptx_LowBound_docs)

0 commit comments

Comments
 (0)