[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #13658] Work on concave polygons too
From: |
Sachin Kumar Singh |
Subject: |
[task #13658] Work on concave polygons too |
Date: |
Mon, 6 Apr 2020 18:37:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0 |
Follow-up Comment #40, task #13658 (project gnuastro):
All things are done according to the requirements. Also the
`gal_polygon_sort_vertex` function, until now, returned the array of output
points rather than indexes(as ordinds). The latest commit
<https://github.com/sachinkumarsingh092/gnuastro/tree/task-concave-sort> fixes
that and puts point structure in polygon.c.(I also toyed with the idea of a
map to sort, but it turned out to be rather redundant and overkilling so was
dropped altogether).
For storing indexes in ordinds, I used a linear search algorithm giving a
worst case of O(n^2). A binary search (O(log2(n))seems to be a better
alternative but as the size of array won't be very
large(GAL_POLYGON_MAX_CORNERS == 50) I think a linear search won't be that
bad:-).
Documentation and a slight error(a silly whitespace) will be fixed and rebased
as soon as the final commit gets a green flag:-)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?13658>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/02
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/02
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/03
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/04
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/05
- [task #13658] Work on concave polygons too,
Sachin Kumar Singh <=
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/07
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/07
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/08
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/08
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/08
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/08
- [task #13658] Work on concave polygons too, Sachin Kumar Singh, 2020/04/09
- [task #13658] Work on concave polygons too, Mohammad Akhlaghi, 2020/04/09