GraphStream Users

Archives de la liste Aide

RES: Edge weight

Chronologique Discussions 
  • From: Matheus Silva <matheus.g.unicamp AT>
  • To: Stefan Balev <stefan.balev AT>
  • Cc: "graphstream-users AT" <graphstream-users AT>
  • Subject: RES: Edge weight
  • Date: Mon, 20 Jun 2016 20:58:06 -0300
  • Importance: normal

And just to clarify what i misswrote. To edges im applying layout.weight.




De: Matheus Silva
Enviado:segunda-feira, 20 de junho de 2016 18:24
Para: Stefan Balev
Cc:graphstream-users AT
Assunto: RES: Edge weight


Thank you, it helped a little.


Here’s my problem. When i do:

ps: A and B are nodes.

                A.addAttribute("layout.force", 0);

                B.addAttribute("layout.force", 0);


It Works, they are grouped together.


But when i do not apply this to nodes, but apply this to a specific edge, it does nothing, the lenght of the edge keep beeing 1. It can be happening because of the layout beeing set to   viewer.enableAutoLayout()?





De: Stefan Balev
Enviado:segunda-feira, 20 de junho de 2016 18:04
Para: Matheus Silva
Cc:graphstream-users AT
Assunto: Re: Edge weight


OK, I see. There is an attribute called "layout.weight". Its default value is 1. Setting it smaller/larger than 1 tends to make edges shorter/longer.



2016-06-20 22:39 GMT+02:00 Matheus Silva <matheus.g.unicamp AT>:

Well, setting the force on an edge to 0, i expect nodes from each side to get closer and if i increase the weight, them to get far from each other.



De: Stefan Balev
Enviado:segunda-feira, 20 de junho de 2016 17:37
Para: graphstream-users AT; Matheus Silva
Assunto: Re: Edge weight




What did you expect ? (no, this is not a Schweppes commercial, just trying to figure out what you want to do).








2016-06-20 22:21 GMT+02:00 Matheus Silva <matheus.g.unicamp AT>:

Greetings everyone.

Is there anyway to change the weight on each edge? Ive tried using the setAttribute("weight", myWeight) but it didnt work as expected.


Thank you.







Archives gérées par MHonArc 2.6.16.

Top of page