<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: search an ordered table in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873790#M73083</link>
    <description>&lt;P class="sectionBodyText"&gt;You can locate the position in the array using something like&lt;/P&gt;
&lt;P class="sectionBodyText"&gt;J = MAXLOC(XX,MASK=XX.LT.X)&lt;/P&gt;</description>
    <pubDate>Mon, 06 Oct 2008 01:07:13 GMT</pubDate>
    <dc:creator>DavidWhite</dc:creator>
    <dc:date>2008-10-06T01:07:13Z</dc:date>
    <item>
      <title>search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873787#M73080</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt; Does anybody know if there is a function in IMSL that is able to search an ordered table.&lt;/P&gt;
&lt;P&gt;I've found SRCH which can search a sorted vector for a given scalar and return its index.&lt;/P&gt;
&lt;P&gt;However, I'd like to have a return of an index J such that given a value x is between arrayxx(J) and xx(J+1).&lt;/P&gt;
&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2008 04:14:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873787#M73080</guid>
      <dc:creator>Mike896</dc:creator>
      <dc:date>2008-10-04T04:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873788#M73081</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Why not look at 1 or 2 browser search hits? e.g. &lt;A href="http://www.pdas.com/binsrch.htm" target="_blank"&gt;http://www.pdas.com/binsrch.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2008 14:03:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873788#M73081</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-10-04T14:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873789#M73082</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Just write a quick binary search routine....since it is an ordered table that will probably be quicker (to execute) than most other methods.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Ed.R.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2008 22:02:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873789#M73082</guid>
      <dc:creator>edr</dc:creator>
      <dc:date>2008-10-04T22:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873790#M73083</link>
      <description>&lt;P class="sectionBodyText"&gt;You can locate the position in the array using something like&lt;/P&gt;
&lt;P class="sectionBodyText"&gt;J = MAXLOC(XX,MASK=XX.LT.X)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2008 01:07:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873790#M73083</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2008-10-06T01:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873791#M73084</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/142656"&gt;David White&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P class="sectionBodyText"&gt;You can locate the position in the array using something like&lt;/P&gt;
&lt;P class="sectionBodyText"&gt;J = MAXLOC(XX,MASK=XX.LT.X)&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;This is a very interesting method. Simple and work.&lt;/P&gt;
&lt;P&gt;Thank you and all.&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2008 02:02:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873791#M73084</guid>
      <dc:creator>Mike896</dc:creator>
      <dc:date>2008-10-06T02:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873792#M73085</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/323852"&gt;Mike896&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;This is a very interesting method. Simple and work.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;But not very efficient. Since your vector is already sorted, binary search would work much faster. For small datasets, however, simplicity is a virtue.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2008 06:50:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873792#M73085</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2008-10-06T06:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873793#M73086</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;FWIT, a sorted list of &lt;EM&gt;N&lt;/EM&gt; can be optimally searched in &lt;EM&gt;N&lt;/EM&gt;&lt;SUP&gt;1/2&lt;/SUP&gt; steps via Grover's algorithm. However, the computer to do it has yet to be built.&lt;/P&gt;
&lt;P&gt;Gerry&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 00:24:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873793#M73086</guid>
      <dc:creator>g_f_thomas</dc:creator>
      <dc:date>2008-10-07T00:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873794#M73087</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;from Numerical Recipes: "In most cases, when all is said and done, it is hard to do better than bisection,&lt;BR /&gt;which will find the right place in the table in about log_2(n) tries."&lt;/P&gt;
&lt;P&gt;Take a look at routine "locate.f90". It does exactly what you're looking for. See Chapter 3, Interpolation and Extrapolation, specifically 3.4 "How to Search an Ordered Table" . Description and source code is on page 111 (of Fortran 77 edition), or 1045 (as function) in Fotran 90 Edition.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 01:29:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873794#M73087</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2008-10-07T01:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873795#M73088</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Yes, I have seen it. In fact, I used to use locate.f (mine is f77 version.But recently as I build the Numerical-Recipe library with IVF, there are lot of problems related to functions as an actual argument. Until now, I don't know how to solve this problem.&lt;/P&gt;
&lt;P&gt;Therefore, I go to seek IMSL, but thereare no similar functions/subroutines.&lt;/P&gt;
&lt;P&gt;thank you and all of you.&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 02:00:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873795#M73088</guid>
      <dc:creator>Mike896</dc:creator>
      <dc:date>2008-10-07T02:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873796#M73089</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;I'm using this particular routine in several applications and it works perfectly. The F90 version is a function (unlike subroutine from F77). Do you have it? I saw that there is a newer NR (C++ edition only) available.&lt;/P&gt;
&lt;P&gt;I have had a not-so-great experience with IMSL a few years back, so usually go the other way, trying to replace their "stuff" with something else.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 03:46:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873796#M73089</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2008-10-07T03:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873797#M73090</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Mine is f77 version. I don't have f90 version and C++ version.&lt;/P&gt;
&lt;P&gt;Thank you for your reply.&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 05:51:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873797#M73090</guid>
      <dc:creator>Mike896</dc:creator>
      <dc:date>2008-10-07T05:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873798#M73091</link>
      <description>&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;I'm not sure you need/want this but link to pdf (book and source code) is &lt;A href="http://www.physics.louisville.edu/help/nr/bookf90pdf.html"&gt;here&lt;/A&gt; so you can take a look. Section B3.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2008 08:10:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873798#M73091</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2008-10-07T08:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: search an ordered table</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873799#M73092</link>
      <description>&lt;DIV style="margin:0px;"&gt;Thank you for your information.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I've found it and it works.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Mike&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Oct 2008 00:27:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/search-an-ordered-table/m-p/873799#M73092</guid>
      <dc:creator>Mike896</dc:creator>
      <dc:date>2008-10-08T00:27:38Z</dc:date>
    </item>
  </channel>
</rss>

