Skip to main content



      Home
Home » Eclipse Projects » GEF » DirectedGraphLayout
DirectedGraphLayout [message #103957] Fri, 07 November 2003 06:53 Go to next message
Eclipse UserFriend
Hi,

I am using a DirectedGraphLayout to add components that have multiple anchor
points. Is it possible to order the components providing the inputs so that
they have the same order as the anchor points. At present I am getting a
large number of crossed connections.

Thanks for any help,

John.
Re: DirectedGraphLayout [message #104082 is a reply to message #103957] Fri, 07 November 2003 13:32 Go to previous messageGo to next message
Eclipse UserFriend
I've tried changing the values of weight, offsetTarget and sourceTarget, but
none of these changes have the desired effect. The question I have is is
this the right approach or is there something else I should be looking at.

Thanks,

John.

"John Howard" <john.howard9@btinternet.com> wrote in message
news:bog117$ff8$1@eclipse.org...
> Hi,
>
> I am using a DirectedGraphLayout to add components that have multiple
anchor
> points. Is it possible to order the components providing the inputs so
that
> they have the same order as the anchor points. At present I am getting a
> large number of crossed connections.
>
> Thanks for any help,
>
> John.
>
>
>
Re: DirectedGraphLayout [message #104094 is a reply to message #103957] Fri, 07 November 2003 14:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Can you not re-position the anchor points to match the nodes? The point of
graph layout is to arrange the nodes in the "best" way possible. But what
you're saying is the anchors themselves determine the node ordering. So do
you need to skip the minCross step?

Can you post a picture of your graph? For 3.0 we are adding constraints to
nodes, but currently I've done this by defining an overall ordering of a
subset of the nodes.

"John Howard" <john.howard9@btinternet.com> wrote in message
news:bog117$ff8$1@eclipse.org...
> Hi,
>
> I am using a DirectedGraphLayout to add components that have multiple
anchor
> points. Is it possible to order the components providing the inputs so
that
> they have the same order as the anchor points. At present I am getting a
> large number of crossed connections.
>
> Thanks for any help,
>
> John.
>
>
>
Re: DirectedGraphLayout [message #104131 is a reply to message #104094] Fri, 07 November 2003 16:04 Go to previous messageGo to next message
Eclipse UserFriend
Attached is a fairly extreme example of the problem normally there would
only be 2 or 3 anchor points. The left hand side is not a problem as we can
handle this by duplicating the attribute nodes, it is the right hand side
that is the issue. The graphs are all relatively simple and it would be
good if we could use the GraphLayout as it saves us having to write our own
algorithm. I'd prefer to not have to re-order the inputs as I suspect the
user would expect them to be in a fixed order. There are ceratin attributes
of the Edges that look that they might be appropriate, just not sure how to
use them. What is the layout policy if we skip the minCross step?

Thanks,

John.




"Randy Hudson" <none@us.ibm.com> wrote in message
news:bogroe$g8c$1@eclipse.org...
> Can you not re-position the anchor points to match the nodes? The point
of
> graph layout is to arrange the nodes in the "best" way possible. But what
> you're saying is the anchors themselves determine the node ordering. So
do
> you need to skip the minCross step?
>
> Can you post a picture of your graph? For 3.0 we are adding constraints
to
> nodes, but currently I've done this by defining an overall ordering of a
> subset of the nodes.
>
> "John Howard" <john.howard9@btinternet.com> wrote in message
> news:bog117$ff8$1@eclipse.org...
> > Hi,
> >
> > I am using a DirectedGraphLayout to add components that have multiple
> anchor
> > points. Is it possible to order the components providing the inputs so
> that
> > they have the same order as the anchor points. At present I am getting
a
> > large number of crossed connections.
> >
> > Thanks for any help,
> >
> > John.
> >
> >
> >
>
>


Re: DirectedGraphLayout [message #104229 is a reply to message #104131] Sat, 08 November 2003 20:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I think you can get good enough results with a simple "peephole"
optimization that runs after MinCross. Look at the class LocalOptimizer.
This class swaps two adjacent nodes if doing so reduces the number of
crossings. You can do the same thing, except you have customize the
shouldSwap(node, node) method for your own purposes.

In order to replace the LocalOptimizer with your own, you'll have to use
internal API. If you create something based off LocalOptimzer, please
submit it to us in a bugzilla so we can consider releasing it. Thanks!

"John Howard" <john.howard9@btinternet.com> wrote in message
news:boh1a3$m02$1@eclipse.org...
> Attached is a fairly extreme example of the problem normally there would
> only be 2 or 3 anchor points. The left hand side is not a problem as we
can
> handle this by duplicating the attribute nodes, it is the right hand side
> that is the issue. The graphs are all relatively simple and it would be
> good if we could use the GraphLayout as it saves us having to write our
own
> algorithm. I'd prefer to not have to re-order the inputs as I suspect the
> user would expect them to be in a fixed order. There are ceratin
attributes
> of the Edges that look that they might be appropriate, just not sure how
to
> use them. What is the layout policy if we skip the minCross step?
>
> Thanks,
>
> John.
>
>
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:bogroe$g8c$1@eclipse.org...
> > Can you not re-position the anchor points to match the nodes? The point
> of
> > graph layout is to arrange the nodes in the "best" way possible. But
what
> > you're saying is the anchors themselves determine the node ordering. So
> do
> > you need to skip the minCross step?
> >
> > Can you post a picture of your graph? For 3.0 we are adding constraints
> to
> > nodes, but currently I've done this by defining an overall ordering of a
> > subset of the nodes.
> >
> > "John Howard" <john.howard9@btinternet.com> wrote in message
> > news:bog117$ff8$1@eclipse.org...
> > > Hi,
> > >
> > > I am using a DirectedGraphLayout to add components that have multiple
> > anchor
> > > points. Is it possible to order the components providing the inputs
so
> > that
> > > they have the same order as the anchor points. At present I am
getting
> a
> > > large number of crossed connections.
> > >
> > > Thanks for any help,
> > >
> > > John.
> > >
> > >
> > >
> >
> >
>
>
>
Re: DirectedGraphLayout [message #104476 is a reply to message #104229] Tue, 11 November 2003 09:27 Go to previous message
Eclipse UserFriend
Thanks, I will take a look at it. At present I have implemented a
workaround, but it is not very elegant and what you are suggesting makes a
lot more sense. If I come up with something useful, I'll submit it.

John.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:bok6pg$6fu$1@eclipse.org...
> I think you can get good enough results with a simple "peephole"
> optimization that runs after MinCross. Look at the class LocalOptimizer.
> This class swaps two adjacent nodes if doing so reduces the number of
> crossings. You can do the same thing, except you have customize the
> shouldSwap(node, node) method for your own purposes.
>
> In order to replace the LocalOptimizer with your own, you'll have to use
> internal API. If you create something based off LocalOptimzer, please
> submit it to us in a bugzilla so we can consider releasing it. Thanks!
>
> "John Howard" <john.howard9@btinternet.com> wrote in message
> news:boh1a3$m02$1@eclipse.org...
> > Attached is a fairly extreme example of the problem normally there would
> > only be 2 or 3 anchor points. The left hand side is not a problem as we
> can
> > handle this by duplicating the attribute nodes, it is the right hand
side
> > that is the issue. The graphs are all relatively simple and it would be
> > good if we could use the GraphLayout as it saves us having to write our
> own
> > algorithm. I'd prefer to not have to re-order the inputs as I suspect
the
> > user would expect them to be in a fixed order. There are ceratin
> attributes
> > of the Edges that look that they might be appropriate, just not sure how
> to
> > use them. What is the layout policy if we skip the minCross step?
> >
> > Thanks,
> >
> > John.
> >
> >
> >
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:bogroe$g8c$1@eclipse.org...
> > > Can you not re-position the anchor points to match the nodes? The
point
> > of
> > > graph layout is to arrange the nodes in the "best" way possible. But
> what
> > > you're saying is the anchors themselves determine the node ordering.
So
> > do
> > > you need to skip the minCross step?
> > >
> > > Can you post a picture of your graph? For 3.0 we are adding
constraints
> > to
> > > nodes, but currently I've done this by defining an overall ordering of
a
> > > subset of the nodes.
> > >
> > > "John Howard" <john.howard9@btinternet.com> wrote in message
> > > news:bog117$ff8$1@eclipse.org...
> > > > Hi,
> > > >
> > > > I am using a DirectedGraphLayout to add components that have
multiple
> > > anchor
> > > > points. Is it possible to order the components providing the inputs
> so
> > > that
> > > > they have the same order as the anchor points. At present I am
> getting
> > a
> > > > large number of crossed connections.
> > > >
> > > > Thanks for any help,
> > > >
> > > > John.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>
Previous Topic:Connecting connections to connections ...
Next Topic:Deleting compound connections
Goto Forum:
  


Current Time: Tue May 13 18:11:10 EDT 2025

Powered by FUDForum. Page generated in 0.05298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top