1
$\begingroup$

I am currently running a linear program with MATLAB to determine, by the exitflag of linprog, if two rotated and shifted hypercubes have nonempty intersection. I wondered if this is a waste of time, or if linprog does nothing more than checking feasibility before starting the optimization.

$\endgroup$
  • 1
    $\begingroup$ That's one way to do it. It should be relatively quick given that there are only 12 constraints. The question is why you're dissatisfied by the approach. Do you need to do it many times? $\endgroup$ – Wolfgang Bangerth Nov 22 '14 at 3:55
  • $\begingroup$ Given that "faces" of the hypercubes occur in parallel pairs, I would expect from experience with rotated & shifted rectangles that testing for intersection can be "optimized" by hand coding. $\endgroup$ – hardmath Nov 22 '14 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.