Click here to Skip to main content
15,887,585 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Whats the fastest way to search through a binary heap? Pin
CaptainSeeSharp19-Nov-09 7:17
CaptainSeeSharp19-Nov-09 7:17 
QuestionCrowd detection (people), how to? Pin
Gamma_ace12-Nov-09 15:53
Gamma_ace12-Nov-09 15:53 
AnswerRe: Crowd detection (people), how to? Pin
kaushik_acharya5-Nov-11 20:03
kaushik_acharya5-Nov-11 20:03 
QuestionAlgorithm to C# [modified] Pin
VS newbie 11-Nov-09 7:05
VS newbie 11-Nov-09 7:05 
AnswerRe: Algorithm to C# Pin
RichardM111-Nov-09 11:29
RichardM111-Nov-09 11:29 
QuestionCollision Detection with a Quad tree Pin
Anthony Mushrow5-Nov-09 16:22
professionalAnthony Mushrow5-Nov-09 16:22 
AnswerRe: Collision Detection with a Quad tree Pin
Luc Pattyn5-Nov-09 16:40
sitebuilderLuc Pattyn5-Nov-09 16:40 
AnswerRe: Collision Detection with a Quad tree Pin
ely_bob18-Nov-09 12:05
professionalely_bob18-Nov-09 12:05 
Alternative solution:
re-structure your "tree" and use a radial(gross) test


radial:
if((dist(a,b)^2-RadiusSqrd)<0)
{
//inside circle might be a collision canidate
}



(pathagarean therum with a bit of inside/outside circle, with small error...) it is fast.


Gross:

or iterativly restructure your list...
public static int blah(point P, point Q)//IComparer
{
     if(P.X>Q.x){ return 1;}
     else if(P.X==Q.x){return 0}
     else{return-1}
}


this way you would only need to "check" against neighbors in the tree structure.

alternativly you could use a float type(but that is basically the radial method of above)

using this method you basically only ever have a few checks,

there is one other way off hand..

I lik eto use the System.Drawing.Region (i forget the name) but it will give the union or difference of two "polygon"(regions) which is on the gpu and crazy fast.. in which case you may be able to do it brute force.. cus it is fast.. if you like this, or need more reference send me a ping and I will scrounge up the code for you.. leaving work --Hurray Smile | :)
Questionorder of algorithm Pin
khomeyni4-Nov-09 20:30
khomeyni4-Nov-09 20:30 
QuestionRe: order of algorithm Pin
harold aptroot5-Nov-09 1:32
harold aptroot5-Nov-09 1:32 
AnswerRe: order of algorithm Pin
khomeyni5-Nov-09 4:45
khomeyni5-Nov-09 4:45 
GeneralRe: order of algorithm Pin
harold aptroot5-Nov-09 5:10
harold aptroot5-Nov-09 5:10 
GeneralRe: order of algorithm Pin
khomeyni5-Nov-09 5:26
khomeyni5-Nov-09 5:26 
GeneralRe: order of algorithm Pin
harold aptroot5-Nov-09 5:30
harold aptroot5-Nov-09 5:30 
GeneralRe: order of algorithm Pin
khomeyni5-Nov-09 5:49
khomeyni5-Nov-09 5:49 
GeneralRe: order of algorithm Pin
harold aptroot5-Nov-09 6:45
harold aptroot5-Nov-09 6:45 
GeneralRe: order of algorithm Pin
khomeyni5-Nov-09 19:35
khomeyni5-Nov-09 19:35 
GeneralRe: order of algorithm Pin
harold aptroot6-Nov-09 1:00
harold aptroot6-Nov-09 1:00 
GeneralRe: order of algorithm Pin
RichardM111-Nov-09 11:33
RichardM111-Nov-09 11:33 
AnswerRe: order of algorithm Pin
RichardM111-Nov-09 11:58
RichardM111-Nov-09 11:58 
GeneralRe: order of algorithm Pin
khomeyni12-Nov-09 2:20
khomeyni12-Nov-09 2:20 
GeneralRe: order of algorithm Pin
RichardM113-Nov-09 15:20
RichardM113-Nov-09 15:20 
GeneralRe: order of algorithm Pin
harold aptroot12-Nov-09 2:40
harold aptroot12-Nov-09 2:40 
GeneralRe: order of algorithm Pin
RichardM113-Nov-09 15:19
RichardM113-Nov-09 15:19 
GeneralRe: order of algorithm Pin
RichardM112-Nov-09 12:58
RichardM112-Nov-09 12: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.