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

Algorithms

 
Answerlink to usable c# sample of output of logic-matrix auto-generator for your review and comments Pin
BillWoodruff18-Aug-11 15:27
professionalBillWoodruff18-Aug-11 15:27 
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 
Hi,

I am looking for an algorithm that given:

1. a bounding box 'bb => [x, y, width, height]

2. List<rectangle> 'ra => a set of rectangles r#1 ... r#n, all of which are guaranteed to be fully contained in bounding box 'bb, and all of which are guaranteed not to overlap any other rectangle

3. List set of rectangle pairs => all in rectangle array 'ra, which need to be 'connected' by 1-3 line segments.

Returns a collection of calculated points for drawing connecting lines between each rectangle-pair. The constraint is that the connection lines, on each rectangle in a rectangle pair, can only intersect with the rectangle's bounding box at the center point on each of the four sides of each rectangle:

left + half rectangle width, rectangle top
left + rectangle width, rectangle top + half rectangle height
left + half rectangle width, rectangle top + rectangle height
left, half rectangle top + half rectangle height

Simplest case would be a straight line: two points; then three points for a path with one right-angle turn; and, finally four points for a path with two right-angle turns.

Where: intersections of lines are minimized.

Assuming that this algorithm has to be recursive in order to 'converge' on reducing intersections, it would be extra goodness to have some control over the 'depth' of recursion required for a given test-case: it is beyond my abilities to know whether estimation of the depth of recursion required for a given case is 'paradoxical:' in the sense that, in order to calculate it, you'd have to first execute the algorithm until, possibly, you ran out of stack space: in other words it would require two passes.

thanks, Bill
"In the River of Delights, Panic has not failed me." Jorge Luis Borges

GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
David19875-Aug-11 1:21
David19875-Aug-11 1:21 
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 

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.