Click here to Skip to main content
15,893,190 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun11-May-09 3:04
luke.orun11-May-09 3:04 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Bassam Abdul-Baki7-May-09 7:58
professionalBassam Abdul-Baki7-May-09 7:58 
QuestionHelp Required for detrmining Polygon Type Pin
ranjanguru4-May-09 9:00
ranjanguru4-May-09 9:00 
AnswerRe: Help Required for detrmining Polygon Type Pin
Luc Pattyn4-May-09 9:30
sitebuilderLuc Pattyn4-May-09 9:30 
AnswerRe: Help Required for detrmining Polygon Type Pin
Arash Partow4-May-09 11:44
Arash Partow4-May-09 11:44 
GeneralRe: Help Required for detrmining Polygon Type Pin
Luc Pattyn4-May-09 14:43
sitebuilderLuc Pattyn4-May-09 14:43 
GeneralRe: Help Required for detrmining Polygon Type Pin
ranjanguru4-May-09 19:07
ranjanguru4-May-09 19:07 
GeneralRe: Help Required for detrmining Polygon Type Pin
Arash Partow4-May-09 23:20
Arash Partow4-May-09 23:20 
Regarding:

Point 2
That is definitely correct, if that is a case you wish your routine to handle which would be quite common then the simplest solution would be computing the convex hull (better than the half-plane approach) and testing against it. Computing the hull would be O(nlogn) and testing it would be O(n) (find an anchor point then traverse edges, or compute the areas of the polygons - if they match then convex ye be.) which would result in a final complexity of O(nlogn) less than n^2.

Now there is this issue of the difference between simple and non-simple polygons, for example the 9 point star is an example of a non-simple self intersecting polygon, perhaps the OP could have better specified the classes of polygon he was interested in as that would help narrow down the most optimal algorithm he could use for his expected input.

Point 3
These are really edge cases you're mentioning but nonetheless possible. I guess if the general shape of the polygon is convex some may call it convex, but if a strict path-wise approach is taken then it would certainly be concave, I personally would attempt to simplify such polygons as running times of future operations performed upon the polygons such as (point in polygon etc...) will become needlessly long. At the end of the day the requirements of the task matter more than the pedantic/ambiguous nature of the mathematical definitions.


Smile | :)
GeneralRe: Help Required for detrmining Polygon Type Pin
Member 41945935-May-09 4:53
Member 41945935-May-09 4:53 
GeneralRe: Help Required for detrmining Polygon Type Pin
Arash Partow5-May-09 5:20
Arash Partow5-May-09 5:20 
Questionis there any decrpting algorithm that uses a dictionary to decrypt an encrypted file? Pin
Ha lee3-May-09 14:43
Ha lee3-May-09 14:43 
AnswerRe: is there any decrpting algorithm that uses a dictionary to decrypt an encrypted file? Pin
riced3-May-09 23:16
riced3-May-09 23:16 
AnswerRe: is there any decrpting algorithm that uses a dictionary to decrypt an encrypted file? Pin
Mark Churchill4-May-09 19:36
Mark Churchill4-May-09 19:36 
QuestionHelp me- Retreiving the points lying on a curve Pin
Darmi29-Apr-09 0:58
Darmi29-Apr-09 0:58 
AnswerRe: Help me- Retreiving the points lying on a curve Pin
Alan Balkany29-Apr-09 3:54
Alan Balkany29-Apr-09 3:54 
GeneralRe: Help me- Retreiving the points lying on a curve Pin
OriginalGriff29-Apr-09 5:32
mveOriginalGriff29-Apr-09 5:32 
QuestionAre the permutaion tables or sbox in DES fixed? Pin
maishuiking26-Apr-09 21:36
maishuiking26-Apr-09 21:36 
AnswerRe: Are the permutaion tables or sbox in DES fixed? Pin
Arash Partow26-Apr-09 23:51
Arash Partow26-Apr-09 23:51 
QuestionOCR algorithm Pin
mehdad.koulab26-Apr-09 19:24
mehdad.koulab26-Apr-09 19:24 
AnswerRe: OCR algorithm Pin
CPallini26-Apr-09 23:34
mveCPallini26-Apr-09 23:34 
QuestionSearching string.. Pin
Quake2Player24-Apr-09 14:02
Quake2Player24-Apr-09 14:02 
AnswerRe: Searching string Pin
Luc Pattyn24-Apr-09 16:58
sitebuilderLuc Pattyn24-Apr-09 16:58 
AnswerRe: Searching string.. Pin
Fatbuddha 16-May-09 23:14
Fatbuddha 16-May-09 23:14 
AnswerRe: Searching string.. Pin
wb_program11-May-09 8:54
wb_program11-May-09 8:54 
Questionhelp me plz to find the algorithm for circle hough transform Pin
javeria khalid21-Apr-09 7:45
javeria khalid21-Apr-09 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.