代码拉取完成,页面将自动刷新
(*
* DGL(The Delphi Generic Library)
*
* Copyright (c) 2004
* HouSisong@gmail.com
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*)
//------------------------------------------------------------------------------
// DGL㷨ʵ
// Create by HouSisong, 2004.09.01
//------------------------------------------------------------------------------
//Algorithms.inc_pas ; Algorithms.inc_h
{$ifndef __Algorithms_inc_pas_}
{$define __Algorithms_inc_pas_}
{$I DGLIntf.inc_pas}
{$I PointerItBox.inc_pas}
{$I _Algorithms_Base.inc_pas}
{$define _DGL_VectorItType}
{$I _Algorithms_Base.inc_pas}
{$undef _DGL_VectorItType}
{$define _DGL_Algorithms_Object_Function}
{$I _Algorithms_Base_Private_PValueType.inc_pas}
{$undef _DGL_Algorithms_Object_Function}
{$I _Algorithms_Base_Private_PValueType.inc_pas}
class procedure _TAlgorithms.SwapValue(const It0,It1:_PValueType_Iterator);
var
tmp : _ValueType;
begin
tmp:=It0[0];
It0[0]:=It1[0];
It1[0]:=tmp;
end;
class procedure _TAlgorithms.SwapValue(const It0:_PValueType_Iterator;const Index0: _TNativeInt;const It1:_PValueType_Iterator;const Index1: _TNativeInt);
var
tmp : _ValueType;
begin
tmp:=It0[Index0];
It0[Index0]:=It1[Index1];
It1[Index1]:=tmp;
end;
class procedure _TAlgorithms.SwapValue(const It:_PValueType_Iterator;const Index0,Index1: _TNativeInt);
var
tmp : _ValueType;
begin
tmp:=It[Index0];
It[Index0]:=It[Index1];
It[Index1]:=tmp;
end;
class procedure _TAlgorithms.Sort(const ItBegin,ItEnd:_PValueType_Iterator);
begin
Sort(ItBegin,ItEnd,_IsLess);
end;
class function _TAlgorithms.LowerBound(const ItBegin,ItEnd:_PValueType_Iterator;const Value:_ValueType):_PValueType_Iterator;
begin
result:=LowerBound(ItBegin,ItEnd,Value,_IsLess);
end;
class function _TAlgorithms.IsSorted(const ItBegin,ItEnd:_PValueType_Iterator):boolean;
begin
result:=IsSorted(ItBegin,ItEnd,_IsLess);
end;
{$endif } // __Algorithms_inc_pas_
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。