Coder Social home page Coder Social logo

goombaio / dag Goto Github PK

View Code? Open in Web Editor NEW
121.0 6.0 28.0 93 KB

A DAG, Directed acyclic graph implementation in golang.

License: Apache License 2.0

Makefile 6.42% Go 91.47% Shell 2.11%
dag directed-acyclic-graph golang graph data-structure golang-library golang-package

dag's People

Contributors

jmdots avatar repejota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dag's Issues

Add AUTHORS file

Description

Add AUTHORS file

Steps to reproduce

Create an AUTHORS file with the core developers listed as:

  • Full Name 1 (github login)
  • Full Name 2 (github login)

Hide Vertices and add GetVertex method to DAG type.

Is your feature request related to a problem? Please describe.
Hide Vertices and add GetVertex method to DAG type.

Describe the solution you'd like

  • Do not export Vertices just renaming it to vertices. That will hide the ordered map from the API.
  • Add GetVertex(id interface{}) method to DAG type.
  • Fix the existing methods to use GetVertex instead of accessing vertices ordered map as needed.

Add Degree to Vertices

Is your feature request related to a problem? Please describe.
Add Degree method to Vertices

Describe the solution you'd like
Must return the number of children and parents of the vertex

Implement topological sort

Is your feature request related to a problem? Please describe.
Implement topological sort for the graph

Implement get root/source vertices/nodes.

Is your feature request related to a problem? Please describe.
Implement get root/source vertices/nodes.

Describe the solution you'd like
root/source vertices/nodes are vertices that have no parents defined by the graph edges.

Implement delete edge.

Is your feature request related to a problem? Please describe.
Implement delete edge from the graph.

Implement get leaf/sink vertices/nodes.

Is your feature request related to a problem? Please describe.
Implement get leaf/sink vertices/nodes.

Describe the solution you'd like
Leaf vertices or nodes are vertices that have no children defined by the graph edges

Implement DAG validation

Is your feature request related to a problem? Please describe.
Implement DAG validation

Describe the solution you'd like

  • Must have at least one root vertex
  • Can be sorted topologically / Has no cycles

Implement vertex deletion.

Is your feature request related to a problem? Please describe.
Implement deleteVertex

Describe the solution you'd like
delete vertex and all edges referencing it.

Add InDegree to Vertices

Is your feature request related to a problem? Please describe.
Add InDegree method to Vertices

Describe the solution you'd like
Must return the number parents of the vertex

Add OutDegree method to Vertices

Is your feature request related to a problem? Please describe.
Add OutDegree method to Vertices

Describe the solution you'd like
Must return the number children of the vertex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.