Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001564graphvizGraph Librariespublic2009-03-18 16:202011-04-28 04:03
ReporterAric Hagberg 
Assigned Toerg 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-*-OS Version
Summary0001564: strict, isn't - for self loops anyway (libcgraph)
Description



Adding self loop edges to strict graphs is now allowed
with libcgraph (formerly not).
<CD>
include <stdio.h>
#include <cgraph.h>
main(int argc, char **argv)
{
  Agraph_t *g;
  Agnode_t *a,*b;
  Agedge_t *e;
  FILE *file;



  const Agdesc_t Agstrictundirected = { 0, 1, 0, 1 };
  const int find = 0;
  const int create = 1;
  g = agopen("tmp",Agstrictundirected,NULL);
  a = agnode(g,"a",create);
  e = agedge(g,a,a,NULL,create);



  file=fopen("strict.dot","w");
  agwrite(g,file);



}



bash-3.2$ gcc ex2.c -I/usr/local/include/graphviz -L/usr/local/lib -lcgraph
bash-3.2$ ./a.out
bash-3.2$ cat strict.dot
strict graph tmp {
        a -- a;
}
</CD>
Additional Information

[erg]
Allowing loops is the semantics supported in libgraph. The intention has always been for libgraph
and libcgraph to have the same graph model. This is especially important now that we are in the
process of moving the main algorithms to libcgraph.

There is a bit to block loops. If you use the following, the graph will reject loops.

  const Agdesc_t Agstrictundirected = { 0, 1, 1, 1 };
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1605
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.22.2
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => erg


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker