Skip to content

Graph functional interface #196

@bolt12

Description

@bolt12

So I have been looking for Graph APIs and the networkx for python is very rich and powerful. It has a lot of things but I just want to start with the ones that are simpler/useful.

In the link I provided a lot of them are already implemented so I thought that would be nice to have the following:

  • degree :: Graph a -> a -> Int - Returns the degree of a certain vertex
  • degreehistogram :: Graph a -> [(a, Float)] - Returns de list of the frequency of each degree value.
  • density :: Graph a -> Float - Returns the density of the graph
  • reverse :: Graph a -> Graph a - Returns the graph with the edges reverted
  • selfLoops :: Graph a -> Int - Returns the number of selfLoops in the graph

I want to discuss some of the types of these functions, if it makes sense to add these kind of functions and how to integrate this in alga. I also am thinking of doing isConnected :: Graph -> Bool and implement graph generation functions like Erdos Renyi/Barabasi-Albert.

should these functions be integrated in Graph API ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions