nasa / bingo

Apache License 2.0
47 stars 28 forks source link

Agraph generator choice #30

Closed tylertownsend closed 4 years ago

tylertownsend commented 4 years ago

The AGraph generator accepts a boolean which will indicate which AGraph is generated. It supports the pure python module or the pybind11 module.

tylertownsend commented 4 years ago

Can we put a warning message in the constructor if the user wants to use cpp but it couldnt be loaded. in this case, I say we should also fall back on constructing python agraphs

what do you think?

I think that's a good idea. I refactored it to throw a warning. But now instead of checking a boolean for each call, we set a member function to call based on the the constructor. Now if bingocpp is not present, it defaults to the python function to create AGraph.