Re: [jgrapht-users] Confused with using DOT importer in the latest version
Brought to you by:
barak_naveh,
perfecthash
From: Dimitrios M. <dim...@gm...> - 2020-06-08 06:18:09
|
This feature is missing in the new importers. It will be back in the next release. You have two options: - either use the old importer from the 1.4.0 release, - use the new importer from the 1.4.1-SNAPSHOT. This is available from maven, see our webpage on how to use snapshot versions. The new importer has a `VertexProvider` which you can set and bypass the automatic vertex creation. You provide a function which receives the id from file as an argument and creates the new vertex. We will be releasing 1.4.1 soon. In any case, see the following link for more details: https://stackoverflow.com/questions/61089620/import-a-edgelist-graph-using-its-elements-as-labels-with-jgrapht-1-4-0 Best, D. On Sun, Jun 7, 2020 at 12:38 AM ניב פגיר <ni...@gm...> wrote: > Hi All, > > first time using jgrapht, and I can't seem to use the newer DOTImporter, > nor do I find proper documentation for it. > > my dot string is simple (for now): > digraph graphname { > 1->2 > 2->3 > 2->5 > 5->2 > 3->5} > > I would like to have the vertices names be the ids from the dot string, > however the DOTImporter > only receives a string supplier as an argument, which can't know the id of > the input dot string, > I found the `addVertexAttributeConsumer` but I can't seem to remove the > vertices created by the > supplier, moreover, creating new vertices doesn't create the edges > (although that might be > possible to do with the `addEdgeConsumer` function, but I haven't got > there yet). > > I would appreciate some clarification or guidance to what I have missed > and what is or isn't possible with DOTImporter. > > Thanks, > Niv > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |