Jump to content

  • Log In with Google      Sign In   
  • Create Account


Shannon Barber

Member Since 23 Jun 2000
Offline Last Active Aug 28 2014 11:15 AM

Posts I've Made

In Topic: Thread-safe weak pointers

16 August 2014 - 11:22 AM

Don't delete resources, instead "logically delete them" so you are not constantly memory thrashing that array.

 

Clean-up on major events like saving.


In Topic: How can I recognize hand drawn shapes? (eg. the wizard in Trine)

16 August 2014 - 11:19 AM

I was going to suggest the stroke-based method.

 

e.g. every 100ms (and on mouse up/down) capture the line-segment.

Capture the whole set of segments, then process it.

Merge lines, one at a time, and maintain a priority queue based on the "best-match rank"

You need to merge the most similar two lines each iteration to guarantee the best result.

You need a heuristic to rank how similar the current set of line segments is to your ideal line segments.

I think you can't just ignore magnitude, I think you need to use relative magnitude to the whole shape (e.g. normalize it).

Then measure the angle from the previous stroke.

Use the sum of least squares to rank it?

Repeat until you merge everything into 1 line.

The top ranking match on the the priority queue is your current best answer.


In Topic: Modern C++ looking for information

06 July 2014 - 12:37 AM

I think modern C++ is called C# ... just sayin'


In Topic: Vector Efficiency question

05 July 2014 - 10:14 PM

So the string comparisons are relatively slow?
 

 

You would have to get very creative to find a slower way.

 

Perhaps you load a data file into a vector (or map) with string names, but then you would process that data into trees of data using pointers.


In Topic: I've got problems with interviews

05 July 2014 - 10:07 PM

Learn the answer to every question you are asked in all interviews.

It doesn't matter if the interviewers are "the problem" they are the 'gate keepers' - defeat them (with charm).

 

If you can't write down the basic algorithm to find a loop in a linked list then I know you haven't studied data-structures or haven't studied them in years.

I expect you to know how more advanced data structures work, like priority heaps, red-black trees, AVL trees, b-trees, etc... but I don't expect you to know all of them so it's hard to ask questions about those.

 

#old #hires


PARTNERS