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

Algorithms

 
AnswerRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? [modified] Pin
RobCroll19-Aug-11 5:02
RobCroll19-Aug-11 5:02 
GeneralRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? Pin
David198719-Aug-11 5:32
David198719-Aug-11 5:32 
GeneralRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? Pin
RobCroll19-Aug-11 5:46
RobCroll19-Aug-11 5:46 
GeneralRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? Pin
David198719-Aug-11 6:04
David198719-Aug-11 6:04 
GeneralRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? [modified] Pin
BillWoodruff19-Aug-11 6:51
professionalBillWoodruff19-Aug-11 6:51 
AnswerRe: optimizing the set of possible boolean outcomes of evaluating multiple conditions ? Pin
GParkings3-Sep-11 5:57
GParkings3-Sep-11 5:57 
Questionconnection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff2-Aug-11 23:47
professionalBillWoodruff2-Aug-11 23:47 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
David19875-Aug-11 1:21
David19875-Aug-11 1:21 
I don't know of any good way to solve it.
The way I do know, you're not going to like.

Branch & bound, where every "step" represents "extending a line in one of 3 directions (except back) by 1 unit" and the "cost" is the number of intersections. Finished when all lines have reached their targets (or when the previous best cost is exceeded, obviously).
It only works if the lines can only change direction on integer coordinates.
Bonus: expand lines in "likely good" directions first (ie. not immediately intersecting, roughly towards their goal)

Pro: it will give the right result.
Con: it will take all eternity to run.

Bonus 2: first estimate an upper bound for the cost this way:
For every pair of things that need to be connected, use A* to find the shortest path among the possible ways to connect them (A* is trivially extended that way - put all starting points on the Open list, test for "done" at all end points). Add extra cost at intersections (since the cost is positive, that will not affect the optimality of A*).
The result will be bad, but it will give a better initial bound at very little cost and thus save time.

It will still take all eternity to run.
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff5-Aug-11 2:10
professionalBillWoodruff5-Aug-11 2:10 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
David19875-Aug-11 2:40
David19875-Aug-11 2:40 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff5-Aug-11 7:29
professionalBillWoodruff5-Aug-11 7:29 
AnswerRe: connection routing algorithm for connecting rectangles with lines ? Pin
cjb1106-Aug-11 9:35
cjb1106-Aug-11 9:35 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff7-Aug-11 13:02
professionalBillWoodruff7-Aug-11 13:02 
AnswerRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 10:48
Member 41945937-Aug-11 10:48 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? [modified] Pin
BillWoodruff7-Aug-11 14:30
professionalBillWoodruff7-Aug-11 14:30 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 15:34
Member 41945937-Aug-11 15:34 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945937-Aug-11 15:59
Member 41945937-Aug-11 15:59 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff7-Aug-11 17:40
professionalBillWoodruff7-Aug-11 17:40 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945938-Aug-11 17:57
Member 41945938-Aug-11 17:57 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff16-Aug-11 18:36
professionalBillWoodruff16-Aug-11 18:36 
QuestionRaytracing render quality [modified] Pin
Thomas.D Williams31-Jul-11 11:48
Thomas.D Williams31-Jul-11 11:48 
AnswerRe: Raytracing render quality Pin
Richard MacCutchan31-Jul-11 22:53
mveRichard MacCutchan31-Jul-11 22:53 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams31-Jul-11 23:44
Thomas.D Williams31-Jul-11 23:44 
GeneralRe: Raytracing render quality Pin
David19875-Aug-11 1:07
David19875-Aug-11 1:07 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams5-Aug-11 5:00
Thomas.D Williams5-Aug-11 5:00 

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.