Generating graph -EdgeDraft.EdgeType.UNDIRECTED not working

Computing metrics, community detection and data handling
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
smitalm
Posts:6
Joined:14 Feb 2013 17:52
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Generating graph -EdgeDraft.EdgeType.UNDIRECTED not working

Post by smitalm » 22 Mar 2013 13:16

Hello,

i am working on graph generator (LFR model), and i cannot make edges undirected. Even if i use following code, edge is still directed - has arrows (confirmed by checking data laboratory).

Code: Select all

EdgeDraft e = container.factory().newEdgeDraft();
		e.setSource(nodes[max]);
		e.setTarget(nodes[i]);
		e.setType(EdgeDraft.EdgeType.UNDIRECTED);
		container.addEdge(e);
Am i doing something wrong, or is there a bug?

EDIT* I am using this workaround: after my graph is generated as directed, i export and reimport it as undirected. If somebody knows faster workaround to change all edges to undirected, let me know plz.

diddyxn
Posts:11
Joined:22 May 2014 12:00
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Generating graph -EdgeDraft.EdgeType.UNDIRECTED not work

Post by diddyxn » 13 Jun 2014 11:56

You should put this line to make it work :

container.setEdgeDefault(EdgeDefault.UNDIRECTED);

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable