Skip to content
Snippets Groups Projects
Commit 0b01bc6c authored by Lutz Klinkenberg's avatar Lutz Klinkenberg
Browse files

name changed to pgyin

parent 1d07b893
Branches
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.4...3.18)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
project(prodigy)
project(pygin)
set(CMAKE_CXX_STANDARD 14)
......@@ -21,6 +21,6 @@ add_subdirectory(test)
# python bindings
add_subdirectory(lib/pybind11)
pybind11_add_module(prodigy python/bindings.cpp)
target_link_libraries(prodigy PUBLIC ${CMAKE_PROJECT_NAME}_lib)
target_compile_definitions(prodigy PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})
pybind11_add_module(pygin python/bindings.cpp)
target_link_libraries(pygin PUBLIC ${CMAKE_PROJECT_NAME}_lib)
target_compile_definitions(pygin PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})
......@@ -26,8 +26,8 @@ string toString(const Dist& dist){
namespace py = pybind11;
PYBIND11_MODULE(prodigy, m) {
m.doc() = "python bindings of prodigy - a library for manipulating distributions through generating functions";
PYBIND11_MODULE(pygin, m) {
m.doc() = "python bindings of pygin - a library for manipulating distributions through generating functions";
py::class_<Dist>(m, "Dist")
.def(py::init())
......
import prodigy
import pygin
if __name__ == "__main__":
dist = prodigy.geometric("x", "1/2")
dist = pygin.geometric("x", "1/2")
print(dist.E("x"))
dist = prodigy.Dist("1");
dist = pygin.Dist("1");
......@@ -123,14 +123,14 @@ class CMakeBuild(build_ext):
# The information here can also be placed in setup.cfg - better separation of
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="prodigy",
name="pygin",
version="1.0",
author="Tobias Winkler",
author_email="tobias.winkler@cs.rwth-aachen.de",
description="python bindings of prodigy",
description="python bindings of pygin",
long_description="",
ext_modules=[CMakeExtension("prodigy")],
ext_modules=[CMakeExtension("pygin")],
cmdclass={"build_ext": CMakeBuild},
zip_safe=False,
extras_require={"test": ["pytest"]},
)
\ No newline at end of file
)
......@@ -304,7 +304,7 @@ TEST(EquivalenceCheck, dep_bern){
l4 = l4.update("n", "n-t");
l5 = l4.update("c", "0");
l6 = l5.update("t", "0");
l7 = l6 + (l0 - l1);
l7 = l6 + l0.filterLeq("c", "0");
Dist res1 = l7;
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment