Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Mathgraph is an open source Python package for calculating topological indices and energy of graphs

Project description

##What is Mathgraph?

Mathgraph is an open source Python package for calculating topological indices and energy of graphs.

The source code is avalalble at: https://pypi.python.org/pypi/mathgraph

##Usage

~~~~~~~~~~~~~~~~~~ {.python .numberLines}
python
>>> import mathgraph as mg
>>> G = mg.MathGraph()
>>> G.add_edge(0,1)
>>> G.add_edge(1,2)
>>> G.add_edge(2,0)
>>> G.minimal_covering_energy()

Triangular graph, covering sets/energy for the same is as follows
[set([0, 1]), set([1, 2]), set([0, 2])]
[4.1307682818044205, 4.0, 4.0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

##Structure

Mathgraph is a container of mathchem and networkx objects.
def NX_graph(self):
""" Return NetworkX graph object """
return self.__NX_graph

def Mol_graph(self):
""" Return Mathchem graph object """
if self.__Mol_graph is None:
nxg = self.NX_graph()
self.__Mol_graph = mc.Mol(nx.generate_graph6(nxg))
return self.__Mol_graph

##Functionality
degree_matrix
complementary_subset
dominating_set
minimal_dominating_set
minimal_dominating_energy
covering_set
minimal_covering_set
minimal_covering_energy
min_laplacian_dominating_energy
atom_bond_connectivity_index2
atom_bond_connectivity_index4
seidel_energy
maximum_degree_energy
common_neighbourhood
atom_bond_connectivity_index5

##Installation

###As Python module
For any UNIX-like system the installation process is trivial:

pip install mathgraph

####Depends on:
numpy mathchem networkx

##About

Mathgraph package written by Sudharsan Vijayaraghavan and Ananda Kumar MR

###TODO:
optimizations of code
double dominating set and so on

Project details


Release history Release notifications

History Node

0.0.5

History Node

0.0.4

This version
History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mathgraph-0.0.3.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Mar 29, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page