[Lemon-devel] bug: direction of the coordinates in a grid

Kovács Péter kpeter at inf.elte.hu
Mon Feb 4 15:54:26 CET 2008


Hi,

Answering to Misi's letter: (29/01/2008)

 > But to access the points like pixels on a monitor??? That's nonsense!
 > :)))

Yes. :)
The origin should be in the bottom-left corner as in dim2::BoundingBox.

 > And the documentation for this file have to be improved too.
 > It's imposible to figure out the order of the coordinates from the
 > documentation itself, only from the little example at the top.

I don't find this example, so I can't figure out the order from the 
documentation.

The documentation should contain a comment that the origin is at the 
bottom-left corner.
Maybe grid_ugraph.png should be also modified to mark this structure 
(e.g. filled circle and a label for (0,0) node and/or two arrows to mark 
the top and right directions beside the image).

Regards,
Peter


> Hi,
> 
> I've fixed my previous issue with grid_ugraph.h. (In a most trivial way,
> by making the functions inline. :))
> 
> Today, I want to discuss another issue with it. :)
> The GridUGraph is coordinated in (x, y) manner. (When you create it, you
> supply (width, height), and when you access a node, you supply two
> coordinates: first is 0<=...<width, second: 0<=...<height).
> 
> And there are functions to access edges: up(), down(), left(), right().
> For example the node (0,0) has two edges incident to it: right() and
> down(). Meaning, the origin is in the top-left corner!
> 
> I think that's wrong. The origin can be in the top-left corner in a
> mathematical library. But then, it's a matrix and the coordinates are
> (row, column) and not (column, row).
> 
> But to access the points like pixels on a monitor??? That's nonsense! :)))
> 
> No seriously, I think this is really a bug, and have to be fixed. And
> the documentation for this file have to be improved too. It's imposible
> to figure out the order of the coordinates from the documentation
> itself, only from the little example at the top. And the position of the
> origin (that is, the behaviour of the up/down left/right functions) you
> can only deduce from the code!
> 
>                                                 Misi
> _______________________________________________
> Lemon-devel mailing list
> Lemon-devel at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-devel



More information about the Lemon-devel mailing list