Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am currently looking at an implementation of the McGregor Maximum Subgraph in Python however I cannot seem to find an already implemented one.
I have found the algorithm implemented as part of the Boost C++ libraries however the Python bindings are missing.
This seem a bit odd? Is this the right algorithm to use? Are there any libraries out there which perform this task.
Check out the networkx package; I'm not sure if its networkx.algorithms.mis.maximal_independent_set is the same as the McGregor, but if you're working in networks, networkx is a useful package.
https://networkx.github.io/
The NetworkX implementation of ISMAGS does include the maximal subgraph problem.
https://networkx.org/documentation/stable/reference/algorithms/isomorphism.ismags.html
In addition, this implementation also provides an interface to find the largest common induced subgraph [2] between any two graphs, again taking symmetry into account.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking to draw graphs in Python (nodes, edges, loops etc; not graphs as in bar charts and the like). I am struggling to find a good cross-platform library for this; would Tkinter or Qt be capable of this? If not are there any alternatives to this?
Networkx is the most used library to generate and analyze networks in python, then I strongly suggest it. Please, take a look at this documentation:
https://www.udacity.com/wiki/creating-network-graphs-with-python
https://networkx.github.io/documentation/stable/tutorial.html
Draw graph in NetworkX
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have a huge set of coupled nonlinear integro-partial differential equations. After a long while trying to simplify the equations and solve them at least semi-analytically I have come to conclude there has been left no way for me but an efficient numerical method. Finite element seems most amenable as is based on Galerkin method which gives a weak form solution, so a great hope that it might finally solve the equations. But at the same time I am so new to this field to write the codes all from the scratch:
Is there any Python library already available that can efficiently do a Finite Element analysis?
Also I was interested if softwares like FEniCS/Dolphin might also solve integro-differential equations?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any library available to have inverse of a function? To be more specific, given a function y=f(x) and domain, is there any library which can output x=f(y)? Sadly I cannot use matlab/mathematics in my application, looking for C/Python library..
I am a bit late, but for future readers of the post, I just published a python package that does this precisely. https://pypi.python.org/pypi/pynverse
There is a detailed description of how to use it and how it does it in the description!
As has already been mentioned, not all functions are invertible. In some cases imposing additional constraints helps: think about the inverse of sin(x).
Once you are sure your function has a unique inverse, solve the equation f(x) = y. The solution gives you the inverse, y(x).
In python, look for nonlinear solvers from scipy.optimize.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I need to create a program that analyzes the traveling salesman problem using Python. Does anyone know of a good resource that will help me learn how to create and use undirected graphs in Python? Any info that may help me with the TSP would be greatly appreciated as well.
About Python library for directed and undirected graphs, you can take a look at igraph or NetworkX.
As for the TSP, a little googling indicates that some Python code and discussion is available here, and some background is given in these slides, A Short History of the Traveling Salesman Problem, and on this page, Traveling Salesman Problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for an API (preferably in python) that could be used to analyze complex networks. Basically I want to find things like:
Average shortest path,
Degree distribution
Giant Component
local clustering coefficient, global clustering coefficient etc..
Thanks
I would suggest Networkx and PyGraphViz. I've used them for a similar (but not as complex) graphing project in python and I love it.
The boost graph library has Python bindings.
I've used igraph on Linux. It started to grind on 64k nodes but that graph was becoming unwieldy any way.
Not sure about performance next to PyGraphViz but now you have a plenty of options.