All Projects → jacobwilliams → daglib

jacobwilliams / daglib

Licence: other
Directed Acyclic Graphs With Modern Fortran

Programming Languages

fortran
972 projects

Projects that are alternatives of or similar to daglib

GiGraph
Simple yet versatile library for generating graphs in the DOT language
Stars: ✭ 25 (+25%)
Mutual labels:  graphviz, graphviz-dot-language
Graphvizer
Preview Graphviz in real time with Sublime Text 3
Stars: ✭ 74 (+270%)
Mutual labels:  graphviz, graphviz-dot-language
poddotify
A command line tool: from a Podfile.lock to an image.
Stars: ✭ 79 (+295%)
Mutual labels:  graphviz, graphviz-dot-language
DotNetGraph
Create GraphViz DOT graph with .NET / C#
Stars: ✭ 57 (+185%)
Mutual labels:  graphviz, graphviz-dot-language
batching-toposort
Efficiently sort interdependent tasks into a sequence of concurrently-executable batches
Stars: ✭ 21 (+5%)
Mutual labels:  toposort, directed-acyclic-graph
vscode-markdown-editor
A vscode extension to make your vscode become a full-featured WYSIWYG markdown editor
Stars: ✭ 249 (+1145%)
Mutual labels:  graphviz
cytoscape.js-fcose
fCoSE: a fast Compound Spring Embedder
Stars: ✭ 94 (+370%)
Mutual labels:  graphviz
breaking cycles in noisy hierarchies
breaking cycles in noisy hierarchies
Stars: ✭ 59 (+195%)
Mutual labels:  directed-acyclic-graph
noflo-graphviz
NoFlo visualization tools for GraphViz
Stars: ✭ 14 (-30%)
Mutual labels:  graphviz
datalinguist
Stanford CoreNLP in idiomatic Clojure.
Stars: ✭ 93 (+365%)
Mutual labels:  graphviz
graphviz-server
Java based GraphViz HTTP Server
Stars: ✭ 34 (+70%)
Mutual labels:  graphviz
ged2site
Create a family tree website from a Gedcom file
Stars: ✭ 25 (+25%)
Mutual labels:  graphviz
PlantUml-Language-Service
PlantUml Language Service extension for Visual Studio 2017 and 2019
Stars: ✭ 24 (+20%)
Mutual labels:  graphviz
digraph-parser
Java parser for digraph DSL (Graphviz DOT language)
Stars: ✭ 38 (+90%)
Mutual labels:  graphviz
rosie
A task building library that allows combining custom logic with the execution of command line programs. Designed around a directed acyclic graph allows for expressing non-trivial procedures.
Stars: ✭ 27 (+35%)
Mutual labels:  directed-acyclic-graph
lein-hiera
Generate Clojure namespace hierarchy graphs
Stars: ✭ 55 (+175%)
Mutual labels:  graphviz
phuml
phUML is a UML diagram generator. It takes arbitrary object oriented PHP code and creates fully blown class diagrams of it.
Stars: ✭ 75 (+275%)
Mutual labels:  graphviz
lolviz.js
A faithful (albeit optimized) port of Terence Parr List of Lists Visualization library, https://github.com/parrt/lolviz from Python to Javascript.
Stars: ✭ 18 (-10%)
Mutual labels:  graphviz
AAG-Visualizer
🌆 🏙 🌃 Viz.js Graphviz - An Elegant Visualizer for And-Inverter Graph
Stars: ✭ 95 (+375%)
Mutual labels:  graphviz
sphinx-server
Sphinx documentation Docker image with Python server and support for PlantUML and more.
Stars: ✭ 62 (+210%)
Mutual labels:  graphviz

daglib

Overview

Build Status

DAGLIB is a modern Fortran module for creating and manipulating directed acyclic graphs (DAGs). It includes a toposort feature, and also the ability to generate files in the GraphViz "dot" notation.

Building

A Fortran Package Manager manifest file is included, so that the library and tests cases can be compiled with FPM. For example:

fpm build --profile release
fpm test --profile release

Example

A simple example is shown below:

program dag_example

    use dag_module

    implicit none

    type(dag) :: d
    integer,dimension(:),allocatable :: order
    integer :: istat
    integer :: i

    integer,parameter :: n_nodes = 6
    character(len=*),parameter :: filetype = 'pdf'

    ! create a dag:

    call d%set_vertices(n_nodes)
    call d%set_edges(2,[1])     ! 2 depends on 1
    call d%set_edges(3,[5,1])   ! 3 depends on 5 and 1
    call d%set_edges(4,[5])     ! 4 depends on 5
    call d%set_edges(5,[2])     ! 5 depends on 2
    call d%set_edges(6,[2,4])   ! 6 depends on 2 and 4

    ! toposort:

    call d%toposort(order,istat)

    ! define some styles for the GraphViz output:

    do i = 1, n_nodes
        if (i==3 .or. i==6) then
            call d%set_vertex_info(i,attributes='shape=square,fillcolor="SlateGray1",style=filled')
        else
            call d%set_vertex_info(i,attributes='shape=circle,fillcolor="cornsilk",style=filled')
        end if
    end do

    ! generate the GraphViz output:

    call d%save_digraph('test.dot','RL',300)
    call d%destroy()
    call execute_command_line('dot -Tpdf -o test.pdf test.dot')

end program dag_example

This program produces the toposort order:

 order = [1, 2, 5, 3, 4, 6]

and the image file:

dag_example

Documentation

  • The API documentation for the current master branch can be found here. This is generated by processing the source files with FORD.

License

This library is released under a BSD-3 license.

See also

  • dag (a fork of this project)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].