{"id":217,"date":"2017-09-13T11:17:14","date_gmt":"2017-09-13T14:17:14","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=217"},"modified":"2017-09-13T11:17:14","modified_gmt":"2017-09-13T14:17:14","slug":"drvsort-f","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/drvsort-f\/","title":{"rendered":"drvsort.f"},"content":{"rendered":"<pre>c&lt;html&gt;\r\nc&lt;head&gt;&lt;title&gt;drvsort.f&lt;\/title&gt;&lt;\/head&gt;\r\nc&lt;body&gt;\r\nc&lt;pre&gt;      \r\n\tprogram drvsort\r\nc\r\nc   Program to drive sorting subroutines\r\nc\r\nc   John Mahaffy 3\/13\/95\r\nc\r\n      integer ndim, j\r\nc\r\nc   Set the array size\r\nc\r\n      parameter (ndim=10)\r\n      real x(ndim), xo(ndim)\r\n      integer ix(ndim)\r\nc\r\nc   Load x with pseudo-random numbers bounded by 0 and 1\r\nc   using a Fortran 90 standard Intrinsic Subroutine\r\nc&lt;a name=1&gt;&lt;font color=FF0000&gt;\r\n      call random_number (x(1:ndim))\r\nC\r\nc\r\nc   Load ix with the array indices for the original values\r\nc&lt;\/font&gt;\r\n      ix = (\/(j,j=1,ndim)\/)\r\nc\r\nc   Load xo with the contents of x to save the original order\r\nc\r\n      xo(1:ndim)=x(1:ndim)\r\nc\r\nc   Sort x from highest to lowest value.  When an element in x\r\nc   is shifted, shift the corresponding element in ix to the\r\nc   same new position\r\nc\r\n\r\n      call ssort( x, ix, ndim, -2)\r\n      write(*,2000)\r\n 2000 format(' Original ',5x,'  Sorted  ',\/,'  Array  ',\r\n     $ 5x,'   Array')\r\n      write(*,2001) (i, xo(i), ix(i), x(i), i=1,ndim)\r\n 2001 format(i3,2x,f5.3,5x, i3,2x, f5.3)\r\n      stop\r\n      end\r\nc&lt;\/pre&gt;\r\nc&lt;\/body&gt;\r\nc&lt;\/html&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>c&lt;html&gt; c&lt;head&gt;&lt;title&gt;drvsort.f&lt;\/title&gt;&lt;\/head&gt; c&lt;body&gt; c&lt;pre&gt; program drvsort c c Program to drive sorting subroutines c c John Mahaffy 3\/13\/95 c integer ndim, j c c Set the array size c parameter (ndim=10) real x(ndim), xo(ndim) integer ix(ndim) c c Load x with pseudo-random numbers bounded by 0 and 1 c using a Fortran 90 standard Intrinsic [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-217","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=217"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/217\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/217\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}