'How do I solve a generic multiple-constraint problem (in Java or Kotlin)?
I'm optimizing the placement of relative recordings of events on a timeline, but calculating their pairwise relative position is computationally expensive, and getting the "ideal" layout is difficult. But it feels like something where there would be libraries for this, and I'm not searching on the right algorithm name!
- For events
A,B,C,D... (up to ~15) - I'm reasonably sure that
Bhappened 5.002 seconds afterA. - I'm reasonably sure that
Chappened 7.001 seconds afterA. - ...keep going for some amount of all possible edges, (n(n-1))/2
- I sure hope that
Chappens ~2 seconds afterB!
But if I do the calc to get B-to-C, and it comes out to 2.1sec, I don't want everything to explode. I was hoping that it works out some sort of "best fit" that takes all of the relationships (and cousin relationships, and second-cousion relationships) into account.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
