mirror of
https://github.com/gwm17/catima.git
synced 2024-11-26 12:08:52 -05:00
commit
dd1289e934
|
@ -175,7 +175,10 @@ PYBIND11_MODULE(pycatima,m){
|
||||||
.def_readwrite("sigma_x", &Result::sigma_x)
|
.def_readwrite("sigma_x", &Result::sigma_x)
|
||||||
.def_readwrite("tof", &Result::tof)
|
.def_readwrite("tof", &Result::tof)
|
||||||
.def_readwrite("sp", &Result::sp)
|
.def_readwrite("sp", &Result::sp)
|
||||||
.def("get_dict",&get_result_dict);
|
.def("get_dict",&get_result_dict)
|
||||||
|
.def("__repr__",[](const Result &self){
|
||||||
|
return py::str(get_result_dict(self));
|
||||||
|
});
|
||||||
|
|
||||||
py::class_<MultiResult>(m,"MultiResult")
|
py::class_<MultiResult>(m,"MultiResult")
|
||||||
.def(py::init<>(),"constructor")
|
.def(py::init<>(),"constructor")
|
||||||
|
@ -211,6 +214,16 @@ PYBIND11_MODULE(pycatima,m){
|
||||||
}
|
}
|
||||||
d["partial"] = p;
|
d["partial"] = p;
|
||||||
return d;
|
return d;
|
||||||
|
})
|
||||||
|
.def("__repr__",[](const MultiResult &r){
|
||||||
|
py::dict d;
|
||||||
|
py::list p;
|
||||||
|
d["result"] = get_result_dict(r.total_result);
|
||||||
|
for(auto& entry:r.results){
|
||||||
|
p.append(get_result_dict(entry));
|
||||||
|
}
|
||||||
|
d["partial"] = p;
|
||||||
|
return py::str(d);
|
||||||
});
|
});
|
||||||
|
|
||||||
py::enum_<z_eff_type>(m,"z_eff_type")
|
py::enum_<z_eff_type>(m,"z_eff_type")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user