Simon Lindholm

Results 99 comments of Simon Lindholm

#90 is open for this, I really need to get around to reviewing it... It's non-trivial because of numerical precision issues.

Link, for reference: https://github.com/ecnerwala/icpc-book/ > Replaced/duplicate implementations Should look into these and see if they are better. > AngleCmp (Various angle comparison utilities) We already have the Angle class. >...

Thanks for the input! That's very helpful, you guys have a lot more contest experience than I do. > I liked using this for geometry with integers, I don't really...

TBH I don't have a strong opinion on this. It would be nice to join this together with the existing Polynomial.h; there's probably some shared code, and it would make...

That's fair. Not that I would mind a large PR; it gives a nice impression of how we imagine things looking in the end. Also, note that PolyRoots.h depends on...

I guess we should add the super-simple greedy "previous/next larger value" algorithm (https://en.wikipedia.org/wiki/All_nearest_smaller_values). Reasonably simple to code by hand, but short and might teach you something when reading through KACTL.

For high-dimensional problems, where derivatives are not available: https://en.wikipedia.org/wiki/Nelder%E2%80%93Mead_method#One_possible_variation_of_the_NM_algorithm

https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm is supposedly good; starts off with B^-1 = identity matrix, updates it according to some complex formula to get a search direction in each step. (Just like conjugated gradient...

Quantile can also be done with persistent segment trees: recurse on the segtrees for L and R together, descend to the left if `k < L->left->sum + R->left->sum` else to...

https://github.com/ludopulles/kactl/commit/b6e3a98ce9a013f55fa4fd35407ff791701874c9 has a bunch of useful identities.