mdr / ascii-graphs Goto Github PK
View Code? Open in Web Editor NEWParse ASCII art diagrams of graphs (nodes and edges)
License: MIT License
Parse ASCII art diagrams of graphs (nodes and edges)
License: MIT License
Thanks!
I get an infinite loop for the following code:
object AsciiTest extends App {
import com.github.mdr.ascii.layout._
val v = List("1", "2", "3", "7", "9")
val e = List("1" -> "3", "1" -> "7", "3" -> "2", "3" -> "9", "7" -> "9", "7" -> "2")
val graph = Graph(vertices = v, edges = e)
val ascii = Layouter.renderGraph(graph)
println(ascii.length)
}
The loop occurs in Layout.calculateEdgeOrdering
Wow, exactly the kind of output I was looking for!
Can you read in DOT files, too? That would be really awesome (but I lack the scala skills :( ).
I think I have a bug with the diagram parsing. When I enter the following diagram:
val graph =
"""
| +-------+
| | op1 |
| +-------+
| |
| |
| ----
| |
| v
| +-----+
| |gbk1 |
| +-----+
""".stripMargin('|')
Then the edge between op1
and gbk1
doesn't have any arrow. This is a problem for me because I need to work with a directed graph.
Any chance of some full installation instructions? The readme doesn't even mention Scala- I sort of figured it out from the source code directory names. Will this run in .net? On a mac? How do I get started?
Scala is not as popular as many other languages, so I'm a little out of my comfort zone here - but am intrigued to try this code. Which Scala should I try this with? I'm using a Mac.
Hi, can you please publish a version for Scala 2.10?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.