亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? _algorithms_base_private.inc_pas

?? Delphi Generic Algorytms library - Maps, Lists, Hashmaps, Datastructures.
?? INC_PAS
?? 第 1 頁 / 共 2 頁
字號:
(*
 * DGL(The Delphi Generic Library)
 *
 * Copyright (c) 2004
 * HouSisong@263.net              
 *
 * 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, 2005.10.13
//------------------------------------------------------------------------------
//_Algorithms_Base_Private.inc_pas


{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.Tansfrom(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromFunctionOfObject);
{$else}
class procedure _TAlgorithms.Tansfrom(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromFunction);
{$endif}
var
  It  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin

  It:=ItBegin;
  while (not It.IsEqual(ItEnd)) do
  begin
    {$ifdef  _DGL_ObjValue}
    _Assign(It.Value,TansfromFunction(It.Value));
    {$else}
    It.Value:=TansfromFunction(It.Value);
    {$endif}
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.Tansfrom(const ItBeginSrc,ItEndSrc,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromFunctionOfObject);
{$else}
class procedure _TAlgorithms.Tansfrom(const ItBeginSrc,ItEndSrc,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromFunction);
{$endif}
var
  ItSrc  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
  ItDest :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  ItSrc:=ItBeginSrc;
  ItDest:=ItBeginDest;
  while (not ItSrc.IsEqual(ItEndSrc)) do
  begin
    {$ifdef  _DGL_ObjValue}
    _Assign(ItDest.Value,TansfromFunction(ItSrc.Value));
    {$else}
    ItDest.Value:=TansfromFunction(ItSrc.Value);
    {$endif}
    ItSrc.Next();
    ItDest.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.Tansfrom(const ItBeginSrc0,ItEndSrc0,ItBeginSrc1,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromBinaryFunctionOfObject);
{$else}
class procedure _TAlgorithms.Tansfrom(const ItBeginSrc0,ItEndSrc0,ItBeginSrc1,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TansfromFunction:TTansfromBinaryFunction);
{$endif}
var
  ItSrc0  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
  ItSrc1  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
  ItDest  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  ItSrc0:=ItBeginSrc0;
  ItSrc1:=ItBeginSrc1;
  ItDest:=ItBeginDest;
  while (not ItSrc0.IsEqual(ItEndSrc0)) do
  begin
    {$ifdef  _DGL_ObjValue}
    _Assign(ItDest.Value,TansfromFunction(ItSrc0.Value,ItSrc1.Value));
    {$else}
    ItDest.Value:=TansfromFunction(ItSrc0.Value,ItSrc1.Value);
    {$endif}
    ItSrc0.Next();
    ItSrc1.Next();
    ItDest.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.ForEach(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const VisitProc:TVisitProcOfObject);
{$else}
class procedure _TAlgorithms.ForEach(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const VisitProc:TVisitProc);
{$endif}
var
  It  :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  It:=ItBegin;
  while (not It.IsEqual(ItEnd)) do
  begin
    VisitProc(It.Value);
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.FindIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunctionOfObject): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$else}
class function _TAlgorithms.FindIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunction): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$endif}
begin
  result:=ItBegin;
  while (not result.IsEqual(ItEnd)) do
  begin
    if TestFunction(result.Value) then
      exit
    else
      result.Next();
  end;
end;


{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.FindIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const Value:_ValueType;const TestBinaryFunction:TTestBinaryFunctionOfObject): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$else}
class function _TAlgorithms.FindIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const Value:_ValueType;const TestBinaryFunction:TTestBinaryFunction): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$endif}
begin
  result:=ItBegin;
  while (not result.IsEqual(ItEnd)) do
  begin
    if TestBinaryFunction(result.Value,Value) then
      exit
    else
      result.Next();
  end;
end;


{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.ReplaceIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunctionOfObject;const NewValue:_ValueType):integer;
{$else}
class function _TAlgorithms.ReplaceIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunction;const NewValue:_ValueType):integer;
{$endif}
var
  It: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  It:=ItBegin;
  result:=0;
  while (not It.IsEqual(ItEnd)) do
  begin
    if (TestFunction(It.Value)) then
    begin
      It.Value:=NewValue;
      inc(result);
    end;
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.ReplaceCopyIf(const ItBeginSrc,ItEndSrc,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunctionOfObject;const NewValue:_ValueType):integer;
{$else}
class function _TAlgorithms.ReplaceCopyIf(const ItBeginSrc,ItEndSrc,ItBeginDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunction;const NewValue:_ValueType):integer;
{$endif}
var
  ItSrc: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
  ItDest: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  ItSrc:=ItBeginSrc;
  ItDest:=ItBeginDest;
  result:=0;
  while (not ItSrc.IsEqual(ItEndSrc)) do
  begin
    if (TestFunction(ItSrc.Value)) then
    begin
      ItDest.Value:=NewValue;
      inc(result);
    end
    else
      ItDest.Value:=ItSrc.Value;
    ItSrc.Next();
    ItDest.Next();
  end;
end;



{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.Generate(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const GenerateFunction:TGenerateFunctionOfObject);
{$else}
class procedure _TAlgorithms.Generate(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const GenerateFunction:TGenerateFunction);
{$endif}
var
  It: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  It:=ItBegin;
  while (not It.IsEqual(ItEnd)) do
  begin
    It.Value:=GenerateFunction();
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class procedure _TAlgorithms.Generate(const ItBegin: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const N:integer;const GenerateFunction:TGenerateFunctionOfObject);
{$else}
class procedure _TAlgorithms.Generate(const ItBegin: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const N:integer;const GenerateFunction:TGenerateFunction);
{$endif}
var
  It: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
  i: integer;
begin
  It:=ItBegin;
  for i:=0 to N-1 do
  begin
    It.Value:=GenerateFunction();
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.RemoveIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunctionOfObject): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$else}
class function _TAlgorithms.RemoveIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunction): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$endif}
var
  ItRead: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  result:=FindIf(ItBegin,ItEnd,TestFunction);
  if result.IsEqual(ItEnd) then exit;

  ItRead:=result;
  ItRead.Next;
  while (not ItRead.IsEqual(ItEnd)) do
  begin
    if not TestFunction(ItRead.Value) then
    begin
      Result.Value:=ItRead.Value;
      Result.Next;
    end;
    ItRead.Next();
  end;
end;


{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.CountIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunctionOfObject):integer;
{$else}
class function _TAlgorithms.CountIf(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestFunction:TTestFunction):integer;
{$endif}
var
  It :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  result:=0;
  It:=ItBegin;
  while (not It.IsEqual(ItEnd)) do
  begin
    if TestFunction(It.Value) then
      inc(result);
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.MinElement(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestBinaryFunction:TTestBinaryFunctionOfObject): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$else}
class function _TAlgorithms.MinElement(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestBinaryFunction:TTestBinaryFunction): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$endif}
var
  It :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  if ItBegin.IsEqual(ItEnd) then
  begin
    result:=ItEnd;
    exit;
  end;

  result:=ItBegin;
  It:=ItBegin;
  It.Next;
  while (not It.IsEqual(ItEnd)) do
  begin
    if TestBinaryFunction(It.Value,result.Value) then
      result.Assign(It);
    It.Next();
  end;
end;

{$ifdef  _DGL_Algorithms_Object_Function}
class function _TAlgorithms.MaxElement(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestBinaryFunction:TTestBinaryFunctionOfObject): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$else}
class function _TAlgorithms.MaxElement(const ItBegin,ItEnd: {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;const TestBinaryFunction:TTestBinaryFunction): {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
{$endif}
var
  It :  {$ifdef _DGL_VectorItType}_IVectorIterator{$else}_IIterator{$endif} ;
begin
  if ItBegin.IsEqual(ItEnd) then
  begin
    result:=ItEnd;
    exit;
  end;

  result:=ItBegin;
  It:=ItBegin;
  It.Next;
  while (not It.IsEqual(ItEnd)) do
  begin
    if TestBinaryFunction(result.Value,It.Value) then
      result.Assign(It);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区中文在线| 在线看国产日韩| 26uuu国产一区二区三区| 91精品视频网| 97成人超碰视| 国产福利一区二区| 色域天天综合网| 日本丶国产丶欧美色综合| 一本大道久久a久久综合婷婷| 另类专区欧美蜜桃臀第一页| 国产欧美一区二区在线| 欧美综合一区二区三区| 精品久久久网站| 亚洲免费观看高清在线观看| 亚洲一区二区三区四区在线观看 | 国产**成人网毛片九色| 色综合天天综合色综合av| 欧美日韩亚洲综合在线| 日韩一区二区在线看| 日韩精品在线一区二区| 久久精品欧美日韩精品| 亚洲一区二区在线观看视频 | 美女视频一区在线观看| 蜜桃视频在线观看一区| 爽爽淫人综合网网站| 国产精品家庭影院| 欧美一区二区三区视频免费播放| 欧美日韩1234| 欧美精品一区二区久久久| 亚洲第一激情av| 色综合久久综合中文综合网| 国产日韩亚洲欧美综合| 久久99精品一区二区三区| 欧美亚州韩日在线看免费版国语版| 日韩一二三区视频| 奇米精品一区二区三区在线观看 | 亚洲精选在线视频| 国产精品人妖ts系列视频| 亚洲精品国产精品乱码不99 | 精品视频资源站| 91.麻豆视频| 色婷婷综合久久久久中文一区二区 | 91视频com| 2023国产精品| 亚洲精品高清在线观看| 国产不卡视频在线播放| 91久久精品一区二区| 国产麻豆9l精品三级站| 91毛片在线观看| 欧美日韩在线精品一区二区三区激情| 91精品一区二区三区在线观看| 久久成人18免费观看| 91福利国产精品| 欧美日韩一区二区三区高清| 国产麻豆精品在线观看| 久久色在线观看| 香蕉成人伊视频在线观看| 久久99久久精品| eeuss国产一区二区三区| 91网站最新地址| 精品国产乱码久久| 久久久久久亚洲综合影院红桃| 国产精品久久久久久久第一福利| 国产呦萝稀缺另类资源| 国产精品毛片久久久久久久| 91色porny在线视频| 丝瓜av网站精品一区二区| 精品国产不卡一区二区三区| 日韩视频一区二区在线观看| 午夜欧美在线一二页| 99re这里都是精品| 精品美女一区二区| 蜜臀精品一区二区三区在线观看 | 日本欧美韩国一区三区| 亚洲成人av在线电影| 日韩区在线观看| 国产一区日韩二区欧美三区| 91福利区一区二区三区| 一区二区三国产精华液| 精品福利一二区| 亚洲私人影院在线观看| 精品一区二区三区免费| 久久综合九色综合久久久精品综合| 中文在线资源观看网站视频免费不卡 | 午夜精品久久久久久不卡8050| 日韩**一区毛片| 欧美日韩欧美一区二区| 久久国内精品视频| 亚洲人成亚洲人成在线观看图片| 亚洲综合免费观看高清完整版| 国产精品不卡一区二区三区| 日韩女优电影在线观看| 色综合天天综合在线视频| 国产一区 二区| 亚洲天堂精品视频| 石原莉奈在线亚洲三区| 国产三级精品三级在线专区| 欧美综合亚洲图片综合区| 丝袜亚洲精品中文字幕一区| 国产乱人伦偷精品视频不卡 | 成人午夜av影视| 国产在线精品不卡| 久久久精品日韩欧美| **性色生活片久久毛片| eeuss鲁片一区二区三区| 在线观看一区二区精品视频| 亚洲欧美日韩国产中文在线| 国产欧美一区二区三区在线老狼| 狠狠色狠狠色综合系列| 日韩一区二区在线观看| 麻豆成人久久精品二区三区小说| 国产精品99久久久久久久女警| 国产欧美一区二区三区沐欲| 日韩专区欧美专区| 欧美成人伊人久久综合网| 日产国产欧美视频一区精品| 日韩欧美久久一区| 日本网站在线观看一区二区三区| 欧美一级在线免费| 奇米亚洲午夜久久精品| 精品少妇一区二区三区| 国产91精品免费| 久久久国产综合精品女国产盗摄| 精品一区二区三区不卡| 在线观看91av| 精品制服美女丁香| 中文字幕一区二区在线观看| 成人激情视频网站| 伊人夜夜躁av伊人久久| 在线看日本不卡| 日本少妇一区二区| 亚洲国产高清aⅴ视频| 91浏览器打开| 日韩精品免费专区| www成人在线观看| 99精品视频一区| 亚洲一级电影视频| 精品处破学生在线二十三| 国产美女主播视频一区| 亚洲欧美综合色| 91香蕉国产在线观看软件| 午夜精品久久久久久久久| xvideos.蜜桃一区二区| 91亚洲资源网| 日韩中文字幕一区二区三区| 久久久久久电影| 99视频热这里只有精品免费| 一区二区三区资源| 欧美mv日韩mv国产网站| www.欧美亚洲| 午夜电影一区二区三区| 国产精品美女www爽爽爽| 欧美日韩一区二区三区高清 | 亚洲一区免费视频| 538在线一区二区精品国产| 丰满少妇在线播放bd日韩电影| 亚洲自拍偷拍综合| 欧美激情一区二区三区不卡| 欧美电影影音先锋| 99久久免费国产| 免费av网站大全久久| 亚洲福利一二三区| 国产精品久久毛片| 精品国产麻豆免费人成网站| 欧美熟乱第一页| 国产69精品久久久久毛片| 另类小说综合欧美亚洲| 亚洲丝袜美腿综合| 中文字幕色av一区二区三区| 久久综合久色欧美综合狠狠| 欧美日韩国产系列| 一本色道a无线码一区v| 高清不卡一区二区在线| 蜜桃av噜噜一区| 国产精品久久三| 中国av一区二区三区| 精品噜噜噜噜久久久久久久久试看 | 成人午夜看片网址| 久久99精品久久久久久动态图 | 免费人成黄页网站在线一区二区 | 国产一区二三区好的| 日韩av电影天堂| 天天色综合天天| 亚洲在线观看免费视频| 国产精品久久777777| 国产欧美日韩久久| 国产亚洲欧美日韩俺去了| 精品美女被调教视频大全网站| 日韩午夜激情免费电影| 69久久99精品久久久久婷婷 | 亚洲国产高清在线| 国产精品初高中害羞小美女文| 久久久av毛片精品| 久久免费看少妇高潮| 欧美精品一区二区三区四区| 精品捆绑美女sm三区| 欧美本精品男人aⅴ天堂| 欧美v亚洲v综合ⅴ国产v| 26uuu成人网一区二区三区| 2023国产精品|