Commit 1312599f authored by Chanelle Lee's avatar Chanelle Lee
Browse files

Testing to see if it will work by combining into just one c++ module

parent 24d9f0a0
......@@ -13,5 +13,4 @@ set(SOURCES "${SOURCE_DIR}/evidenceFunctions.cpp")
# Generate python module
#find_package(pybind11 REQUIRED)
add_subdirectory(pybind11)
pybind11_add_module(agentFunctions ${SOURCES} "${SOURCE_DIR}/bindings.cpp")
pybind11_add_module(evidenceFunctions ${SOURCES} "${SOURCE_DIR}/bindings.cpp")
pybind11_add_module(helperFunctions ${SOURCES} "${SOURCE_DIR}/bindings.cpp")
......@@ -70,8 +70,7 @@ setup(name='noComparisonSimulation',
# tell setuptools to look for any packages under 'src'
packages=find_packages('src'),
package_dir={'': 'src'},
ext_modules=[CMakeExtension('noComparisonSimulation/agentFunctions'),
CMakeExtension('noComparisonSimulation/evidenceFunctions')],
ext_modules=[CMakeExtension('noComparisonSimulation/helperFunctions')],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
)
......@@ -3,8 +3,8 @@
#include "agentFunctions.hpp"
#include "evidenceFunctions.hpp"
PYBIND11_MODULE(agentFunctions, m){
m.doc() = "Functions for improving agent performance";
PYBIND11_MODULE(helperFunctions, m){
m.doc() = "Functions for improving agent and evidence performance";
m.def("update_on_evidence", &update_on_evidence,
"Updates agent's belief based on negative evidence");
m.def("aggregate_MProdOp", &aggregate_MProdOp,
......@@ -13,9 +13,5 @@ PYBIND11_MODULE(agentFunctions, m){
"Check for consistent beliefs between neighbours");
m.def("check_neighbourhood_consistent", &check_neighbourhood_consistent,
"Checks neighbourhood only contains consistent beliefs");
}
PYBIND11_MODULE(evidenceFunctions, m){
m.doc() = "Functions for improving evidence performance";
m.def("pick_option", &pick_option, "Picks an option from a weighted distribution");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment