Board logo

标题: 【HeapPush2D】 [打印本页]

作者: 龙听    时间: 2022-11-2 09:57     标题: 【HeapPush2D】

  1. inputs:
  2.         MyArray[ MaxSize1, MaxSize2 ]( numericarray ),  
  3.         int ColIndx3( numericref ),
  4.         int Size( numericsimple ),
  5.         int Order( numericsimple ) ;                                    

  6. variables:
  7.         int var0( 0 ) ;

  8. if Order = -1 then
  9.         begin
  10.         if ColIndx3 < Size then
  11.                 begin
  12.                 var0 = ColIndx3 + 1 ;
  13.                 condition1 = MyArray[ 1, var0 ] > MyArray[ 1, ColIndx3 ] ;
  14.                 if condition1 then
  15.                         ColIndx3 = var0 ;
  16.                 end ;
  17.         HeapPush2D = ( MyArray[ 1, 0 ] < MyArray[ 1, ColIndx3 ] ) ;
  18.         end
  19. else if Order = 1 then
  20.         begin
  21.         if ColIndx3 < Size then
  22.                 begin
  23.                 var0 = ColIndx3 + 1 ;
  24.                 condition1 = MyArray[ 1, var0 ] < MyArray[ 1, ColIndx3 ] ;
  25.                 if condition1 then
  26.                          ColIndx3 =        var0 ;
  27.                 end ;
  28.         HeapPush2D = ( MyArray[ 1, 0 ] > MyArray[ 1, ColIndx3 ] ) ;
  29.         end
  30. else
  31.         RaiseRunTimeError( "Order input must be -1 or 1." ) ;
复制代码





欢迎光临 龙听期货论坛 (http://qhlt.club/) Powered by Discuz! 7.2