문제

The (directed) graphs represent finite automata. Up until now my test program has been writing out dot files for testing. This is pretty good both for regression testing (keep the verified output files in subversion, ask it if there has been a change) and for visualisation. However, there are some problems...

Basically, I want something callable from C++ and which plans a layout for my states and transitions but leaves the drawing to me - something that will allow me to draw things however I want and draw on GUI (wxWidgets) windows.

I also want a license which will allow commercial use - I don't need that at present, and I may very well release as open source, but I don't want to limit my options ATM.

The problems with GraphViz are (1) the warnings about building from source on Windows, (2) all the unnecessary dependencies for rendering and parsing, and (3) the (presumed) lack of a documented API specifically and purely for layout.

Basically, I want to be able to specify my states (with bounding rectangle sizes) and transitions, and read out positions for the states and waypoints for each transition, then draw based on those co-ordinates myself. I haven't really figured out how annotations on transitions should be handled, but there should be some kind of provision for specifying bounding-box-sizes for those, associating them with transitions, and reading out positions.

Does anyone know of a library that can handle those requirements?

I'm not necessarily against implementing something for myself, but in this case I'd rather avoid it if possible.

도움이 되었습니까?

해결책 4

Although the answers so far were worth an upvote, I can't really accept any of them. I've still been searching, though.

One thing I found is AGLO. The code is GPL v1, but there are papers that describe the algorithms, so it should be easy enough to re-implement from scratch if necessary.

There's also the paper by Gansner, Koutsofios, North and Vo - "A Technique for Drawing Directed Graphs" - available from here on the Graphviz site.

I've also been looking closely at the BSD-licensed (but Java) JGraph.

One way or the other, it looks like I might be re-implementing the wheel, if not actually re-inventing it.

다른 팁

Hmm, GDToolkit (or GDT) looks okay: many of the images in the tutorial look pretty nice, and it doesn't look like it's terribly complicated to use.

Edit: But checking the license, it looks like it's commercial software :-(. Whoops!

OGDF is under the GPL.

Pigale is also under the GPL.

GoVisual is commercial software, but it looks like it starts at $1800 for one developer.

google.appengine.ext.db 또는 google.appengine.ext.ndb? 를 사용하고 있습니까?

표준 DB 모듈을 사용하는 경우 여야합니다.

print str(user.key())
.

NDB를 사용하면 다음과 같이 얻을 수 있습니다 :

print user.key.urlsafe()
.

Here is a good collection of Graph Libs with comparison and searching functionality:
http://gvsr.polytech.univ-nantes.fr/GVSR/task?action=browse#

Maybe you find a lib which fits for you.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top