1. Request for private mentoring

binary-search attempted. There's a better way, right?

-Bruce

new topic     » topic index » view message » categorize

2. Re: Request for private mentoring

axtens_bruce said...

binary-search attempted. There's a better way, right?

-Bruce

Was hoping to point you to the archives, but looks like they are down: https://openeuphoria.org/forum/m/138487.wc (same is true of usingeuphoria.com )

That said, you can look at the db_find_key() method in std/eds.e - as per Greg and the official docs, EDS uses a fast binary search: https://openeuphoria.org/forum/m/136464.wc & https://openeuphoria.org/wiki/view/updating%20oE%20%20db_find_key.wc

Also, check out the bsearch() routine in https://openeuphoria.org/forum/m/124974.wc from Pete Eberlein.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Request for private mentoring

axtens_bruce said...

binary-search attempted. There's a better way, right?

There is a binary_search() function in std/search.e.

include std/search.e 
namespace search 
public function binary_search(object needle, sequence haystack, integer start_point=1, integer end_point=0) 

I accepted your invite for mentoring; I will add more specific comments there.

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu