|
|
# ? Sep 8, 2016 05:32 |
|
|
# ? May 15, 2024 22:31 |
|
ur right i fixed it. 2 be fair gently caress trying to get gtm spooled up on a tablet, im writing this poo poo off the top of my head. this is why i always fail at white board coding. i decide im done too fast and i think im a little dyslexic with code.
|
# ? Sep 8, 2016 05:36 |
|
Lutha Mahtin posted:maybe im misremembering my algorithms basics, but i thought "doesn't look at the whole thing at once" was the idea behind the divide and conquer strategy. stooge just does it in a very silly way the first round of quicksort has you comparing the entire list to the pivot element, the invariant used in the recursion becomes very simple (i.e. the half of the list to the left of the pivot contains all elements that are to be to the left of the pivot when finished), and there can only be so many pivots to go through. bubble sort has the invariant that at each step two elements are put into the correct order in relation to each other, and there are only so many pairs of elements in the list. stooge sort is by comparison tricky to see the functioning of i will stop trying to talk you into something being difficult if you don't find it difficult though, if you found the right intuition it is not like it is some truly difficult task, but e.g. student usually don't very quickly
|
# ? Sep 8, 2016 08:16 |
|
Cybernetic Vermin posted:if you find that too easy the next step is to figure out the computational complexity of it "well thats easy its just... wait what no. it is worse than bubble sort" loving O(n(log(3)/log(1.5)) apparently its a really common problem in algorithms classes but i don't remember it
|
# ? Sep 8, 2016 15:30 |
|
The Management posted:I just use HashMap for everything, op this but unironically
|
# ? Sep 8, 2016 21:21 |
|
bogosort is pretty cool
|
# ? Sep 8, 2016 23:18 |
|
while cool, quantum bogosort is the best
|
# ? Sep 8, 2016 23:30 |
|
hobbesmaster posted:while cool, quantum bogosort is the best Haha
|
# ? Sep 9, 2016 00:24 |
|
Lutha Mahtin posted:maybe im misremembering my algorithms basics, but i thought "doesn't look at the whole thing at once" was the idea behind the divide and conquer strategy. stooge just does it in a very silly way In particular (and don't post answers): - what are the postconditions of each recursive step - why are they each ensured - would it still be a sort if the swap were done only for sublists of length 2 Gazpacho fucked around with this message at 05:20 on Sep 9, 2016 |
# ? Sep 9, 2016 05:17 |
|
my postcondition: terrible
|
# ? Sep 9, 2016 05:22 |
|
op I was reading about the meanshift algorithm the other day and it's p rad https://saravananthirumuruganathan.wordpress.com/2010/04/01/introduction-to-mean-shift-algorithm/
|
# ? Sep 9, 2016 14:16 |
|
i wonder if radix sort is banned in germany
|
# ? Sep 9, 2016 17:23 |
|
Symbolic Butt posted:op I was reading about the meanshift algorithm the other day and it's p rad i have no idea what any of this means
|
# ? Sep 9, 2016 18:27 |
|
just took a mean shift and can confirm its p. rad
|
# ? Sep 9, 2016 19:23 |
|
Captain Foo posted:i have no idea what any of this means it's a clustering algorithm, like this: http://stanford.edu/class/ee103/visualizations/kmeans/kmeans.html
|
# ? Sep 9, 2016 20:04 |
|
Symbolic Butt posted:it's a clustering algorithm, like this: http://stanford.edu/class/ee103/visualizations/kmeans/kmeans.html Oh ok this is actually cool
|
# ? Sep 9, 2016 23:28 |
|
i use akra-bazzi, op
|
# ? Sep 10, 2016 01:35 |
|
walked into a co-workers cube and and told him I wanted to make a naive delauney triangulation algorithm for shits and giggles. got almost an hour before I gave up and started reading literature, all my assumptions were wrong
|
# ? Sep 10, 2016 02:04 |
|
haha very productive work day!
|
# ? Sep 10, 2016 02:58 |
|
Uncle Enzo posted:got almost an hour before I gave up and started reading literature, all my assumptions were wrong yospos.o
|
# ? Sep 10, 2016 05:31 |
|
Uncle Enzo posted:walked into a co-workers cube and and told him I wanted to make a naive delauney triangulation algorithm for shits and giggles. never implement your own math because math is hard delaunay triangulation is cool though, I used it in a procedural generated room system that I implemented in js:
|
# ? Sep 10, 2016 09:55 |
|
Uncle Enzo posted:walked into a co-workers cube and and told him I wanted to make a naive delauney triangulation algorithm for shits and giggles. it really seems like one of those problems where modest improvements on the naive algorithm would still often perform really well, since the neighborhood you need to consider for each point can be bounded pretty strictly (i.e. you can discard any pair of points which by themselves already fail the circle condition, which will be a lot of candidates discarded), and it seems fairly probable that you'll be able to chew up a fair bit of the outer boundary based off of point which can only be used in one way granted i am then likely falling in all the same traps as you, but it indeed is one that intuitively seems pretty doable
|
# ? Sep 10, 2016 10:34 |
|
Lutha Mahtin posted:yospos.o a.out of YOSPOS
|
# ? Sep 10, 2016 10:38 |
|
yeah i just want to make an implementation for my own understanding, we use TIN's every day in my job. the datasets we tin are getting to be 8tb and bigger, with 10's of billions of points. I want something that will work on, like, 100 points, written in whatever. also I've got an idea to make a multidimensional tin to interpolate other point attributes besides elevation. not sure if it's been tried before but this stuff isn't really my job, so i have total freedom to fail.
|
# ? Sep 10, 2016 16:40 |
|
here is a collection of my favorite algorithms https://graphics.stanford.edu/~seander/bithacks.html specifically, the ones that aren't super platform dependent
|
# ? Sep 10, 2016 21:42 |
|
Bloody posted:here is a collection of my favorite algorithms wow im amazed something good came out of this post
|
# ? Sep 11, 2016 03:08 |
|
Bloody posted:here is a collection of my favorite algorithms
|
# ? Sep 11, 2016 05:55 |
|
|
# ? Sep 11, 2016 17:59 |
|
the only algorithm it doesnt have is one for writing good posts
|
# ? Sep 11, 2016 19:58 |
|
Uncle Enzo posted:yeah i just want to make an implementation for my own understanding, we use TIN's every day in my job. the datasets we tin are getting to be 8tb and bigger, with 10's of billions of points. I want something that will work on, like, 100 points, written in whatever. from teaching algorithm design a bit i find that the most common reason why people fail to make an initial working naive algorithm is almost invariably that they literally cannot resist being too clever about it. for delauny triangulation one should certainly start with an outer loop which literally enumerates all ways of connecting a subset of the points with lines, and then discarding everything that is not a triangulation (the ridiculously vast majority of it) and then everything that fails the delauny condition. then one moves the conditions from the those two filtering steps up into the generator step bit by bit (likely discovering some more clever way to do it as one works) ended up pondering it a bit, and it is surprisingly interesting to come up with an algorithm which decides whether a set of line segments describes a triangulation or not (not exactly hard, but it took me a bit of effort before i had a succinct statement)
|
# ? Sep 11, 2016 20:37 |
Bloody posted:here is a collection of my favorite algorithms The book "Hacker's Delight" has a ton of these and it makes for really fun and interesting reading if bit-level hacks are your bag
|
|
# ? Sep 11, 2016 21:53 |
|
breadth-first is the best way to search.Silver Alicorn posted:bresenham line algorithm is pretty much the only one I understand & have inplemented I gave an intern a project involving implementing this and man i had no idea you could gently caress up something this straightforward so badly Gazpacho posted:my postcondition: terrible heh
|
# ? Sep 12, 2016 02:50 |
|
rotor posted:I gave an intern a project involving implementing this and man i had no idea you could gently caress up something this straightforward so badly i cced an implementation off stackoverflow for my project, is there any other way ?
|
# ? Sep 12, 2016 09:52 |
Loving Africa Chaps posted:algorithms? yeah i got some https://www.youtube.com/watch?v=kPRA0W1kECg vaguely soothing computer noises
|
|
# ? Sep 12, 2016 10:43 |
|
https://www.youtube.com/watch?v=xP5-iIeKXE8
|
# ? Sep 12, 2016 13:34 |
|
LeftistMuslimObama posted:ur right i fixed it. 2 be fair gently caress trying to get gtm spooled up on a tablet, im writing this poo poo off the top of my head. I just wanted to use the new Smiley, I'm glad I was right though
|
# ? Sep 12, 2016 14:04 |
|
rotor posted:breadth-first is the best way to search. why? i struggle with this interview question all the time. we talk about dfs, we talk about bfs, then they're like "use which one when" and im like "uhh it depends?"
|
# ? Sep 12, 2016 14:20 |
|
Nice!
|
# ? Sep 12, 2016 16:17 |
|
Bloody posted:why? i struggle with this interview question all the time. we talk about dfs, we talk about bfs, then they're like "use which one when" and im like "uhh it depends?" its what you say after "uhh, it depends" the "cheap" answer is if you know its deep go depth first, if you know its shallow go breadth first. however, depth first does not require you to store the frontier so if its too wide depth first is your only option. but depth first could be an issue if its too deep so you'd need to use iterative deepening. djikstra's algorithm is the best though (a* if you need to get fancy)
|
# ? Sep 12, 2016 16:28 |
|
|
# ? May 15, 2024 22:31 |
|
a* indeed the correct choice, constant heuristic for dijkstras, constant heuristic and weights for breadth first, some really sweet guarantees, it has it all~
|
# ? Sep 12, 2016 21:25 |