GraphStream Users

Archives de la liste Aide


RES: Edge weight


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

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 litislab.fr
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 gmail.com>:

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 litislab.fr; Matheus Silva
Assunto: Re: Edge weight

 

Hi,

 

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

 

Cheers,

 

--

Stefan

 

 

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

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