User talk:Lacis alfredo
Welcome!
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Chocolate_chip_cookies.jpg/300px-Chocolate_chip_cookies.jpg)
![](http://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png)
Welcome to Wikipedia, Lacis alfredo! I am Marek69 and have been editing Wikipedia for quite some time. Thank you for your contributions. I just wanted to say hi and welcome you to Wikipedia! If you have any questions, feel free to leave me a message on my talk page or by typing {{helpme}} at the bottom of this page. I love to help new users, so don't be afraid to leave a message! I hope you like the place and decide to stay. Here are some pages that you might find helpful:
- Introduction
- The five pillars of Wikipedia
- How to edit a page
- Help pages
- How to write a great article
I hope you enjoy editing here and being a Wikipedian! Also, when you post on talk pages you should sign your name on talk pages using four tildes (~~~~); that should automatically produce your username and the date after your post. If you need help, check out Wikipedia:Questions, ask me on my talk page, or place {{helpme}} on your talk page and ask your question there. Again, welcome!
Marek.69 talk 15:07, 20 July 2010 (UTC)
nidiformis
[edit]Lacis alfredo, hi and welcome. The photo definitely is Omphalotus nidiformis (as it has now been reclassified as). I saw heaps around Sydney 3 years ago but not many since. I made your page a redirect to the current page. Nice photo BTW - I placed it in a category on commons so it is indexed with the other photos of the same fungus. Casliber (talk · contribs) 19:15, 26 September 2010 (UTC)
Binary Search
[edit]I see that you have mentioned "Expensive Retrievals" and introduced the "inclusive" form of the bounds. But, I think the word should be "exclusive". In any case, your reference is to an article that uses a variant method, but one that is unnecessarily complex. I have form on this matter, as some time ago I presented a version of the method not to be found in any normal reference but then removed the text as I have been accused of "Original Research". See the version of the 24'th August 2010 [oldid=380578637], which shows a flowchart and graphs of performance and has example code of what is called the exclusive bounds method because to search elements 1 to N (or disc file records 1 to N) because the initialisation is L:=first - 1; R:=last + 1, or, L:=0; R:=N + 1; so that the span to search is L+1 to R-1, thus excluding the bounds L and R. Note that this method does not pre-emptively read the first and last elements as in your article. To convert the standard code to the file record reading code, all that need be done is that a reference to Array(P) becomes a read of record P, and then inspection of the record's key. There is only one statement referring to Array(P).
Every text I've seen uses the "inclusive" bounds style, and wastes effort assigning "mid + 1" or "mid - 1" rather than just "mid" (I call it P, for Probe).
This is the code, Fortran-style. Fortran does offer a three-way test, here is a version for searching an array of integers. For labels Fortran uses numbers at the start of statements, thus the 1, 2, 3, and 4. The if-statement performs a go to to one of the three nominated labels according to the sign of its arithmetic expression.
Integer Function BinarySearch(A,X,N) ! Search for the value X in A(1)..A(N) Integer A(*),X !The array is indexed 1 to ? Integer N !Stated number of elements. Integer L,R,P L = 0 !Exclusive bounds, R = N + 1 !To search elements 1 to N. 1 P = (R - L)/2 !Probe; integer division. Not (L + R)/2! if (P <= 0) Return(-L) !Search exhausted. P = L + P !Convert an offset from L to an array index. if (X - A(P)) 3,4,2 !Test: negative,zero,positive. 2 L = P !A(P) < X. Shift the left bound up. go to 1 3 R = P !X < A(P). Shift the right bound down. go to 1 4 Return(P) !X = A(P). Found at index P. End Function BinarySearch
But I can't place this in the article without a reference to a published article... NickyMcLean (talk) 12:01, 17 September 2014 (UTC)
Hi, thanks for your message - my error. Not concentrating, I hadn't realised I had reverted. I have now replaced your edit. Sorry for the mess. Regards Denisarona (talk) 11:36, 18 September 2014 (UTC)