{"id":221,"date":"2017-09-13T11:18:51","date_gmt":"2017-09-13T14:18:51","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=221"},"modified":"2017-09-13T11:18:51","modified_gmt":"2017-09-13T14:18:51","slug":"sort2-f","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/sort2-f\/","title":{"rendered":"sort2.f"},"content":{"rendered":"<pre>      SUBROUTINE SSORT (X, IY, N, KFLAG)\r\n      IMPLICIT NONE\r\nc\r\nc    Example of a Bubble Sort\r\nc\r\nC***BEGIN PROLOGUE  SSORT\r\nC***PURPOSE  Sort an array and make the same interchanges in\r\nC            an auxiliary array.  The array is sorted in\r\nC            decreasing order.\r\nC***TYPE      SINGLE PRECISION\r\nC***KEYWORDS  SORT, SORTING\r\nC\r\nC   Description of Parameters\r\nC      X - array of values to be sorted   (usually abscissas)\r\nC      IY - array to be carried with X (all swaps of X elements are\r\nC          matched in IY .  After the sort IY(J) contains the original\r\nC          postition of the value X(J) in the unsorted X array.\r\nC      N - number of values in array X to be sorted\r\nC      KFLAG - Not used in this implementation\r\nC\r\nC***REVISION HISTORY  (YYMMDD)\r\nC   950310  DATE WRITTEN\r\nC   John Mahaffy\r\nC***END PROLOGUE  SSORT\r\nC     .. Scalar Arguments ..\r\n      INTEGER KFLAG, N\r\nC     .. Array Arguments ..\r\n      REAL X(*)\r\n      INTEGER IY(*)\r\nC     .. Local Scalars ..\r\n      REAL TEMP\r\n      INTEGER I, J, JMAX, ITEMP\r\nC     .. External Subroutines ..\r\nC     None\r\nC     .. Intrinsic Functions ..\r\nC     None\r\nC\r\nC***FIRST EXECUTABLE STATEMENT  SSORT\r\nC\r\n      JMAX=N-1\r\n      DO 200 I=1,N-1\r\n         TEMP=1.E38\r\n         DO 100 J=1,JMAX\r\n            IF(X(J).GT.X(J+1)) GO TO 100\r\n              TEMP=X(J)\r\n              X(J)=X(J+1)\r\n              X(J+1)=TEMP\r\n              ITEMP=IY(J)\r\n              IY(J)=IY(J+1)\r\n              IY(J+1)=ITEMP\r\n  100    CONTINUE\r\n         IF(TEMP.EQ.1.E38) GO TO 300\r\n         JMAX=JMAX-1\r\n  200 CONTINUE\r\n  300 RETURN\r\n      END<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SUBROUTINE SSORT (X, IY, N, KFLAG) IMPLICIT NONE c c Example of a Bubble Sort c C***BEGIN PROLOGUE SSORT C***PURPOSE Sort an array and make the same interchanges in C an auxiliary array. The array is sorted in C decreasing order. C***TYPE SINGLE PRECISION C***KEYWORDS SORT, SORTING C C Description of Parameters C X &#8211; [&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-221","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/221","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=221"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/221\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/221\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}