Click here to Skip to main content
15,898,134 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. [modified] Pin
Luc Pattyn10-May-09 13:19
sitebuilderLuc Pattyn10-May-09 13:19 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun11-May-09 2:27
luke.orun11-May-09 2:27 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn11-May-09 2:59
sitebuilderLuc Pattyn11-May-09 2:59 
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 
Luc's suggestions is nearly there, but:

1. You should use the orientation predicate (sign of the 3 point determinant (0,+,-)), instead of the half-plane equation.

2. Instead of testing each edge against each other point (via half-plain which btw shouldn't work), what you do is test the orientation of the next point of polygon against the current edege.

3. if the orientation is the same as the previously calculated orientation, or if the orientation is zero and the point is not in the AABB of the current edge then continue onto next edge, if any of those conditions fail for the current edge assume conconcave polygon and break from loop.

This should have a time complexity of O(n).
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 
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 

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.