Errors in Voronoi basic tutorial

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Errors in Voronoi basic tutorial

Darren Pearce-Lazard
Hi there,

Unless I am mistaken, I found a couple of errors in the basic tutorial (http://www.boost.org/doc/libs/1_54_0/libs/polygon/doc/voronoi_basic_tutorial.htm).

Firstly, 'point_traits' is used for the segment type instead of 'segment_traits'. Secondly, 'p1()' and 'p0()' should be simply 'p0' and 'p1'. So this code:

template <>
struct point_traits<Segment> {
  typedef int coordinate_type;
  typedef Point point_type;
    
  static inline coordinate_type get(const Segment& segment, direction_1d dir) {
    return dir.to_int() ? segment.p1() : segment.p0();
  }
};

should be:

template <>
struct segment_traits<Segment> {
  typedef int coordinate_type;
  typedef Point point_type;
    
  static inline coordinate_type get(const Segment& segment, direction_1d dir) {
    return dir.to_int() ? segment.p1 : segment.p0;
  }
};

Apologies if this has already been covered in another post.

])arren.

_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Errors in Voronoi basic tutorial

Adam Wulkiewicz
Hi Darren,

Darren Pearce-lazard wrote:
> Unless I am mistaken, I found a couple of errors in the basic tutorial
> (http://www.boost.org/doc/libs/1_54_0/libs/polygon/doc/voronoi_basic_tutorial.htm).
>
Boost.Polygon and Boost.Geometry are two different libraries. This is a
mailing list of the latter which means that you probably won't reach the
authors/maintainers of the former, of course unless they are subscribers
of this list too. You shoud rather ask questions about Boost.Polygon at
Boost developers or Boost users mailing list.

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Errors in Voronoi basic tutorial

Darren Pearce-Lazard
Oh ok. Apologies for the mis-posting. However, I did get to this list by searching for Andrii Sydorchuk (the author of the Voronoi code):


There seem to be other Voronoi posts there. Do you still think I should re-post to boost developers/users?

Thanks,

])arren.


On Fri, Feb 12, 2016 at 11:46 AM, Adam Wulkiewicz <[hidden email]> wrote:
Hi Darren,

Darren Pearce-lazard wrote:
Unless I am mistaken, I found a couple of errors in the basic tutorial (http://www.boost.org/doc/libs/1_54_0/libs/polygon/doc/voronoi_basic_tutorial.htm).

Boost.Polygon and Boost.Geometry are two different libraries. This is a mailing list of the latter which means that you probably won't reach the authors/maintainers of the former, of course unless they are subscribers of this list too. You shoud rather ask questions about Boost.Polygon at Boost developers or Boost users mailing list.

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Errors in Voronoi basic tutorial

Adam Wulkiewicz
Darren Pearce-lazard wrote:
> Oh ok. Apologies for the mis-posting. However, I did get to this list
> by searching for Andrii Sydorchuk (the author of the Voronoi code):
>
> http://boost-geometry.203548.n3.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=426673
>
> There seem to be other Voronoi posts there. Do you still think I
> should re-post to boost developers/users?
>

He indeed seems to be a subscriber though on other mailing lists you
could reach more people. I guess you may wait some time before reposting
but it's up to you :)

If you have a fix you could also consider creating a pull request
directly on Github: https://github.com/boostorg/polygon
The documentation is in the /doc directory.

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Errors in Voronoi basic tutorial

sonic
Perhaps it is a good idea to create a the boost::polygon as a number of posts address the library. I also have some questions regarding this boost::polygon.

Regarding traits, I am not sure if semantics is really that important to get the job done. Perhaps the author was of the same opinion at the time. 

Regarding "p0()" instead of "p0", it could be for the same reason as in "point_xy<>" in boost geometry - so that one could an accessor and/or be able to store a sack of potatoes as a CoordinateType. :)


greetings,
mike

On 12 February 2016 at 16:12, Adam Wulkiewicz <[hidden email]> wrote:
Darren Pearce-lazard wrote:
Oh ok. Apologies for the mis-posting. However, I did get to this list by searching for Andrii Sydorchuk (the author of the Voronoi code):

http://boost-geometry.203548.n3.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=426673

There seem to be other Voronoi posts there. Do you still think I should re-post to boost developers/users?


He indeed seems to be a subscriber though on other mailing lists you could reach more people. I guess you may wait some time before reposting but it's up to you :)

If you have a fix you could also consider creating a pull request directly on Github: https://github.com/boostorg/polygon
The documentation is in the /doc directory.


Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry