commit 2025-08-17 02:47 is coding ZCppMain/ZtCSortObjList.H 시험이 필요
This commit is contained in:
@ -386,9 +386,12 @@ namespace ZNsMain
|
||||
mp_HeadLink=0;
|
||||
else
|
||||
{
|
||||
ZCLink::MakeCircle( mp_HeadLink=mp_HeadLink->mp_NextLink,
|
||||
AP_CutLink->mp_PrevLink
|
||||
/*/////////////*/ );
|
||||
ZCLink::MakeCircle
|
||||
(
|
||||
mp_HeadLink=mp_HeadLink->mp_NextLink,
|
||||
AP_CutLink->mp_PrevLink
|
||||
);
|
||||
//////////////////
|
||||
}/*
|
||||
else*/
|
||||
}
|
||||
|
@ -1,15 +1,789 @@
|
||||
|
||||
|
||||
#ifndef __ZCPPMAIN__ZCSORT_LIST_H__
|
||||
#define __ZCPPMAIN__ZCSORT_LIST_H__
|
||||
|
||||
|
||||
/*////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD> CDoublieList.H <20><> CObjList.H <20><> include <20>Ѵ<EFBFBD>.
|
||||
|
||||
-- 2013-04-30 22:57:00
|
||||
|
||||
////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
#include "ZCppMain/ZMainHead.H"
|
||||
|
||||
|
||||
namespace ZNsMain
|
||||
{
|
||||
|
||||
template<typename TypeObjList> class ZtCSortObjList
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ḯ<EFBFBD><E1B8AE>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>.
|
||||
|
||||
template<typename TTypObjList> class ZtCSortObjList
|
||||
{
|
||||
public :
|
||||
typedef typename TTypObjList::ZCLink ZCLink ;
|
||||
typedef typename TTypObjList::TypeData TypeData;
|
||||
typedef typename TTypObjList::TypeArg TypeArg ;
|
||||
typedef typename TTypObjList::TypeSize TypeSize;
|
||||
private:
|
||||
|
||||
static inline bool IsMore(TypeArg AR_LeftType, TypeArg AR_RightType)
|
||||
{
|
||||
/* IsMore() <20>Լ<EFBFBD><D4BC><EFBFBD> IsLess() <20><> QuickSort() <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD>. */
|
||||
|
||||
return AR_LeftType > AR_RightType ;
|
||||
}/*
|
||||
static inline bool IsMore(TypeArg AR_LeftType, TypeArg AR_RightType)*/
|
||||
|
||||
static inline bool IsLess(TypeArg AR_LeftType, TypeArg AR_RightType)
|
||||
{
|
||||
return AR_LeftType < AR_RightType ;
|
||||
}/*
|
||||
static inline bool IsLess(TypeArg AR_LeftType, TypeArg AR_RightType)*/
|
||||
|
||||
|
||||
static inline void SwapLinkPtr(ZCLink*& APR_LinkI, ZCLink*& APR_LinkJ)
|
||||
{
|
||||
ZCLink* VP_Temp=APR_LinkI; APR_LinkI=APR_LinkJ; APR_LinkJ=VP_Temp;
|
||||
}/*
|
||||
static inline void SwapLinkPtr( ZCLink*& APR_LinkI, ZCLink*& APR_LinkJ) */
|
||||
|
||||
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess ,
|
||||
ZCLink* APA_LinkPtrArr[],
|
||||
TypeSize AL_FirstIndex ,
|
||||
TypeSize AL_LastIndex
|
||||
)
|
||||
/*##################################################*/
|
||||
{
|
||||
if(AL_FirstIndex<AL_LastIndex)
|
||||
{
|
||||
TypeSize i=AL_FirstIndex ;
|
||||
TypeSize j=AL_LastIndex+1 ;
|
||||
|
||||
ZCLink* VP_PivotLinkPtr=APA_LinkPtrArr[i];
|
||||
|
||||
do //////
|
||||
{
|
||||
while(AL_LastIndex >i && APF_IsLess(APA_LinkPtrArr[++i]->GetData(), VP_PivotLinkPtr->GetData()));
|
||||
while(AL_FirstIndex<j && APF_IsMore(APA_LinkPtrArr[--j]->GetData(), VP_PivotLinkPtr->GetData()));
|
||||
|
||||
if(i<j) SwapLinkPtr(APA_LinkPtrArr[i], APA_LinkPtrArr[j]);
|
||||
}
|
||||
while(i<j);
|
||||
|
||||
/* SwapLinkPtr(APA_LinkPtrArr[AL_FirstIndex], APA_LinkPtrArr[j]);
|
||||
|
||||
<20><> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD>ó<EFBFBD><C3B3> 2 <20>ٷ<EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20>ʾƼ<CABE> <20><><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
APA_LinkPtrArr[AL_FirstIndex]=APA_LinkPtrArr[j];
|
||||
APA_LinkPtrArr[j ]=VP_PivotLinkPtr ;
|
||||
|
||||
QuickSort(APF_IsMore, APF_IsLess, APA_LinkPtrArr, AL_FirstIndex, j-1 );
|
||||
QuickSort(APF_IsMore, APF_IsLess, APA_LinkPtrArr, j+1, AL_LastIndex);
|
||||
}/*
|
||||
if(AL_FirstIndex<AL_LastIndex)*/
|
||||
}/*
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess ,
|
||||
ZCLink* APA_LinkPtrArr[],
|
||||
TypeSize AL_FirstIndex ,
|
||||
TypeSize AL_LastIndex
|
||||
)
|
||||
###########################################################*/
|
||||
|
||||
|
||||
static void QuickSortAsc
|
||||
(
|
||||
ZCLink* APA_LinkPtrArr[], TypeSize AL_FirstIndex, TypeSize AL_LastIndex
|
||||
)
|
||||
/*####################*/
|
||||
{
|
||||
if(AL_FirstIndex<AL_LastIndex)
|
||||
{
|
||||
TypeSize i=AL_FirstIndex ;
|
||||
TypeSize j=AL_LastIndex+1 ;
|
||||
|
||||
ZCLink* VP_PivotLinkPtr=APA_LinkPtrArr[i];
|
||||
|
||||
do ////
|
||||
{
|
||||
while(AL_LastIndex >i && APA_LinkPtrArr[++i]->GetData() < VP_PivotLinkPtr->GetData());
|
||||
while(AL_FirstIndex<j && APA_LinkPtrArr[--j]->GetData() > VP_PivotLinkPtr->GetData());
|
||||
|
||||
if(i<j) SwapLinkPtr(APA_LinkPtrArr[i], APA_LinkPtrArr[j]);
|
||||
}
|
||||
while(i<j);
|
||||
|
||||
/* SwapLinkPtr(APA_LinkPtrArr[AL_FirstIndex], APA_LinkPtrArr[j]);
|
||||
|
||||
<20><> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD>ó<EFBFBD><C3B3> 2 <20>ٷ<EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾƼ<CABE> <20><><EFBFBD><EFBFBD>.*/
|
||||
|
||||
APA_LinkPtrArr[AL_FirstIndex]=APA_LinkPtrArr[j];
|
||||
APA_LinkPtrArr[j ]=VP_PivotLinkPtr ;
|
||||
|
||||
QuickSortAsc(APA_LinkPtrArr, AL_FirstIndex, j-1 );
|
||||
QuickSortAsc(APA_LinkPtrArr, j+1, AL_LastIndex);
|
||||
}/*
|
||||
if(AL_FirstIndex<AL_LastIndex)*/
|
||||
}/*
|
||||
static void QuickSortAsc
|
||||
(
|
||||
ZCLink* APA_LinkPtrArr[], TypeSize AL_FirstIndex, TypeSize AL_LastIndex
|
||||
)
|
||||
/*####################*/
|
||||
|
||||
|
||||
static void QuickSortDesc
|
||||
(
|
||||
ZCLink* APA_LinkPtrArr[], TypeSize AL_FirstIndex, TypeSize AL_LastIndex
|
||||
)
|
||||
/*#####################*/
|
||||
{
|
||||
if(AL_FirstIndex<AL_LastIndex)
|
||||
{
|
||||
TypeSize i=AL_FirstIndex ;
|
||||
TypeSize j=AL_LastIndex+1;
|
||||
|
||||
ZCLink* VP_PivotLinkPtr=APA_LinkPtrArr[i];
|
||||
|
||||
do //////
|
||||
{
|
||||
while(AL_LastIndex >i && APA_LinkPtrArr[++i]->GetData() > VP_PivotLinkPtr->GetData());
|
||||
while(AL_FirstIndex<j && APA_LinkPtrArr[--j]->GetData() < VP_PivotLinkPtr->GetData());
|
||||
|
||||
if(i<j) SwapLinkPtr(APA_LinkPtrArr[i], APA_LinkPtrArr[j]);
|
||||
}
|
||||
while(i<j);
|
||||
|
||||
/* SwapLinkPtr(APA_LinkPtrArr[AL_FirstIndex], APA_LinkPtrArr[j]);
|
||||
|
||||
<20><> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD>ó<EFBFBD><C3B3> 2 <20>ٷ<EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20>ʾƼ<CABE> <20><><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
APA_LinkPtrArr[AL_FirstIndex]=APA_LinkPtrArr[j];
|
||||
APA_LinkPtrArr[j ]=VP_PivotLinkPtr ;
|
||||
|
||||
QuickSortDesc(APA_LinkPtrArr, AL_FirstIndex, j-1);
|
||||
QuickSortDesc(APA_LinkPtrArr, j+1, AL_LastIndex);
|
||||
}/*
|
||||
if(AL_FirstIndex<AL_LastIndex)*/
|
||||
}/*
|
||||
static void QuickSortDesc
|
||||
(
|
||||
ZCLink* APA_LinkPtrArr[], TypeSize AL_FirstIndex, TypeSize AL_LastIndex
|
||||
)
|
||||
/*#####################*/
|
||||
|
||||
|
||||
/*private:*/
|
||||
public :
|
||||
|
||||
|
||||
static void QuickSort(TTypObjList& ARR_CObjList, bool AB_IsAscending=true)
|
||||
{
|
||||
if(ARR_CObjList.GetSize()<=1) return;
|
||||
|
||||
TypeSize VL_SortSize = ARR_CObjList.GetSize() ;
|
||||
ZCLink** VPP_LinkPtrArr = new ZCLink*[VL_SortSize];
|
||||
|
||||
if(VPP_LinkPtrArr==0)
|
||||
{
|
||||
// Add codes for memory over
|
||||
|
||||
return;
|
||||
}/*
|
||||
if(VPP_LinkPtrArr==0)*/
|
||||
|
||||
ZCLink* VP_TempLink =
|
||||
ARR_CObjList.GetHeadLinkPtr();
|
||||
TypeSize i=0 ;
|
||||
|
||||
for(; i<VL_SortSize; ++i)
|
||||
{
|
||||
VPP_LinkPtrArr[i] =VP_TempLink;
|
||||
VP_TempLink =VP_TempLink->GetNextPtr();
|
||||
}/*
|
||||
for(; i<VL_SortSize; ++i)*/
|
||||
|
||||
if(AB_IsAscending==true)
|
||||
QuickSortAsc (VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
else QuickSortDesc(VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
|
||||
for(i=1; i<VL_SortSize; ++i) // VL_SortSize-1 <20><> <20><>ȯ
|
||||
{
|
||||
ZCLink::JoinLink(VPP_LinkPtrArr[i-1], VPP_LinkPtrArr[i]);
|
||||
}/*
|
||||
//////////////////////////*/
|
||||
|
||||
ZCLink::MakeCircle
|
||||
(VPP_LinkPtrArr[0], VPP_LinkPtrArr[VL_SortSize-1]);
|
||||
|
||||
ARR_CObjList.mp_HeadLink = VPP_LinkPtrArr[0];
|
||||
|
||||
delete[] VPP_LinkPtrArr; ////////////////////
|
||||
}/*
|
||||
static void QuickSort(TTypObjList& ARR_CObjList, bool AB_IsAscending=true)*/
|
||||
|
||||
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypObjList& ARR_CObjList ,
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess
|
||||
)
|
||||
//////////////////////////////////////////////////////
|
||||
{
|
||||
if(ARR_CObjList.GetSize()<=1) return;
|
||||
|
||||
TypeSize VL_SortSize = ARR_CObjList.GetSize() ;
|
||||
ZCLink** VPP_LinkPtrArr= new ZCLink*[VL_SortSize];
|
||||
|
||||
if(VPP_LinkPtrArr==0)
|
||||
{
|
||||
// Add codes for memory over
|
||||
|
||||
return;
|
||||
}/*
|
||||
if(VPP_LinkPtrArr==0)*/
|
||||
|
||||
ZCLink* VP_TempLink =
|
||||
ARR_CObjList.GetHeadLinkPtr();
|
||||
TypeSize i=0 ;
|
||||
|
||||
for(; i<VL_SortSize; ++i)
|
||||
{
|
||||
VPP_LinkPtrArr[i]=VP_TempLink;
|
||||
VP_TempLink =VP_TempLink->GetNextPtr();
|
||||
}/*
|
||||
///////////////////////*/
|
||||
|
||||
QuickSort
|
||||
(APF_IsMore, APF_IsLess, VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
|
||||
for(i=1; i<VL_SortSize; ++i) // VL_SortSize-1 <20><> <20><>ȯ
|
||||
{
|
||||
ZCLink::JoinLink(VPP_LinkPtrArr[i-1], VPP_LinkPtrArr[i]);
|
||||
}/*
|
||||
//////////////////////////*/
|
||||
|
||||
ZCLink::MakeCircle
|
||||
(VPP_LinkPtrArr[0], VPP_LinkPtrArr[VL_SortSize-1]);
|
||||
|
||||
ARR_CObjList.mp_HeadLink = VPP_LinkPtrArr[0];
|
||||
|
||||
delete[] VPP_LinkPtrArr; ////////////////////
|
||||
}/*
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypObjList& ARR_CObjList ,
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess
|
||||
)
|
||||
////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
static void QuickSortPart /*########################*/
|
||||
(
|
||||
TTypObjList& ARR_CObjList,
|
||||
ZCLink* AP_HeadLink ,
|
||||
TypeSize AL_HeadPos ,
|
||||
ZCLink* AP_TailLink ,
|
||||
TypeSize AL_TailPos ,
|
||||
bool AB_IsAscending=true
|
||||
)
|
||||
/*##################################################*/
|
||||
{
|
||||
// AP_HeadLink <20><><EFBFBD><EFBFBD> AP_TailLink <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
if(ARR_CObjList.IsEmpty()==true || ARR_CObjList.Find(AP_HeadLink)!=AL_HeadPos || ARR_CObjList.Find(AP_TailLink)!=AL_TailPos || AL_HeadPos>AL_TailPos)
|
||||
{
|
||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
||||
fileout<<"Error !! In static void QuickSortPart("<<endl
|
||||
<<" TTypObjList& ARR_CObjList,"<<endl
|
||||
<<" ZCLink* AP_HeadLink ,"<<endl
|
||||
<<" TypeSize AL_HeadPos ,"<<endl
|
||||
<<" ZCLink* AP_TailLink ,"<<endl
|
||||
<<" TypeSize AL_TailPos ,"<<endl
|
||||
<<" bool AB_IsAscending=true )"<<endl
|
||||
<<"Parameters are not valid"<<endl;
|
||||
fileout.close();
|
||||
exit(1);
|
||||
}/*
|
||||
if(ARR_CObjList.IsEmpty()==true || ARR_CObjList.Find(AP_HeadLink)!=AL_HeadPos || ARR_CObjList.Find(AP_TailLink)!=AL_TailPos || AL_HeadPos>AL_TailPos)*/
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
if(AL_HeadPos==1 && AL_TailPos==ARR_CObjList.GetSize())
|
||||
{
|
||||
QuickSort(ARR_CObjList, AB_IsAscending); return;
|
||||
}/*
|
||||
if(AL_HeadPos==1 && AL_TailPos==ARR_CObjList.GetSize())*/
|
||||
|
||||
ZCLink* VP_PrevHead=AP_HeadLink->GetPrevPtr();
|
||||
ZCLink* VP_NextTail=AP_TailLink->GetNextPtr();
|
||||
TypeSize VL_SortSize=AL_TailPos-AL_HeadPos+1 ;
|
||||
|
||||
ZCLink** VPP_LinkPtrArr = new ZCLink*[VL_SortSize];
|
||||
|
||||
if(VPP_LinkPtrArr==0)
|
||||
{
|
||||
// Add codes for memory over
|
||||
|
||||
return;
|
||||
}/*
|
||||
if(VPP_LinkPtrArr==0)*/
|
||||
|
||||
ZCLink* VP_TempLink = AP_HeadLink; TypeSize i=0;
|
||||
|
||||
for(; i<VL_SortSize; ++i)
|
||||
{
|
||||
VPP_LinkPtrArr[i]=VP_TempLink;
|
||||
VP_TempLink =VP_TempLink->GetNextPtr();
|
||||
}/*
|
||||
///////////////////////*/
|
||||
|
||||
if(AB_IsAscending==true)
|
||||
QuickSortAsc (VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
else QuickSortDesc(VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
|
||||
for(i=1; i<VL_SortSize; ++i) // VL_SortSize-1 <20><> <20><>ȯ
|
||||
{
|
||||
ZCLink::JoinLink(VPP_LinkPtrArr[i-1], VPP_LinkPtrArr[i]);
|
||||
}/*
|
||||
//////////////////////////*/
|
||||
|
||||
ZCLink::JoinLink(VP_PrevHead /*##########*/ , VPP_LinkPtrArr[0]);
|
||||
ZCLink::JoinLink(VPP_LinkPtrArr[VL_SortSize-1], VP_NextTail );
|
||||
|
||||
if(AL_HeadPos==1)
|
||||
ARR_CObjList.mp_HeadLink=VPP_LinkPtrArr[0];
|
||||
|
||||
delete[] VPP_LinkPtrArr; //////////////////////
|
||||
}/*
|
||||
static void QuickSortPart ############################
|
||||
(
|
||||
TTypObjList& ARR_CObjList,
|
||||
ZCLink* AP_HeadLink ,
|
||||
TypeSize AL_HeadPos ,
|
||||
ZCLink* AP_TailLink ,
|
||||
TypeSize AL_TailPos ,
|
||||
bool AB_IsAscending=true
|
||||
)
|
||||
/*##################################################*/
|
||||
|
||||
|
||||
static void MergeSort
|
||||
(TTypObjList& ARR_AddList, TTypObjList& ARR_CutList, bool AB_IsAscending=true)
|
||||
/*#################*/
|
||||
{
|
||||
/*/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<20><> <20><><EFBFBD>Ḯ<EFBFBD><E1B8AE>Ʈ ARR_AddList <20><> ARR_CutList <20><> <20>̹<EFBFBD> <20><><EFBFBD>ĵǾ<C4B5> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǽ<EFBFBD><C7BD>Ѵ<EFBFBD>. ARR_CutList <20><> <20><> <20><>ũ<EFBFBD><C5A9><EFBFBD><EFBFBD> <20><><EFBFBD>ʷ<EFBFBD> <20><><EFBFBD><EFBFBD> ARR_AddList <20><>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ARR_AddList <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ĵǾ<C4B5>
|
||||
<20>ִٸ<D6B4> ARR_CutList <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ĵǾ<C4B5> <20>־<EFBFBD><D6BE><EFBFBD> <20>ϰ<EFBFBD>, AB_IsAscending <20><>
|
||||
true <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
if( &ARR_AddList==&ARR_CutList ||
|
||||
ARR_AddList.mp_HeadLink==0 ||
|
||||
ARR_CutList.mp_HeadLink==0 ) return ;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><>¥<EFBFBD><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<20><>ũ<EFBFBD><C5A9> <20>̵<EFBFBD><CCB5><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB><EFBFBD> <20><> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȴ<EFBFBD>. */
|
||||
|
||||
ARR_AddList.OnDelete( ARR_AddList.mp_HeadLink, 1,
|
||||
ARR_AddList.mp_HeadLink->mp_PrevLink, ARR_AddList.ml_Size );
|
||||
ARR_CutList.OnDelete( ARR_CutList.mp_HeadLink, 1,
|
||||
ARR_CutList.mp_HeadLink->mp_PrevLink, ARR_CutList.ml_Size );
|
||||
bool (*pf_IsTrueValue)(TypeArg AR_Left,TypeArg rRigh);
|
||||
|
||||
if(AB_IsAscending==true)
|
||||
pf_IsTrueValue=IsMore;
|
||||
else pf_IsTrueValue=IsLess;
|
||||
|
||||
if(pf_IsTrueValue(ARR_AddList.GetTailData(), ARR_CutList.GetHeadData())==false)
|
||||
{
|
||||
ARR_AddList.JoinTail(ARR_CutList); return; // <20>̶<EFBFBD><CCB6><EFBFBD> <20><> <20>̻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ䰡 <20><><EFBFBD><EFBFBD>.
|
||||
}/*
|
||||
if(pf_IsTrueValue(ARR_AddList.GetTailData(), ARR_CutList.GetHeadData())==false)*/
|
||||
|
||||
ZCLink* VP_LhsTail =ARR_AddList.mp_HeadLink->mp_PrevLink;
|
||||
ZCLink* VP_LhsTemp =ARR_AddList.mp_HeadLink;
|
||||
ZCLink* VP_RhsHead =ARR_CutList.mp_HeadLink;
|
||||
|
||||
TypeSize VL_LhsTempPos=1 ; // VP_LhsTemp <20><> <20><>ġ
|
||||
bool VB_IsMoved =false;
|
||||
ZCLink* VP_TempLink =0 ;
|
||||
|
||||
do //////
|
||||
{
|
||||
if(pf_IsTrueValue(VP_LhsTemp->GetData(), VP_RhsHead->GetData())==true)
|
||||
{
|
||||
VP_TempLink=VP_RhsHead;
|
||||
VP_RhsHead =VP_RhsHead->mp_NextLink;
|
||||
|
||||
ARR_AddList.JoinBefore( ARR_CutList.CutLink(VP_TempLink,1),
|
||||
VP_LhsTemp,
|
||||
VL_LhsTempPos
|
||||
/*/////////////////*/ ); //////////////////////////////////
|
||||
|
||||
/* VP_LhsTemp <20>տ<EFBFBD> <20><>ũ<EFBFBD><C5A9> <20>ϳ<EFBFBD> <20><><EFBFBD>ԵǾ<D4B5><C7BE><EFBFBD><EFBFBD>Ƿ<EFBFBD>,
|
||||
VP_LhsTemp <20><> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20>ϳ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2>. */
|
||||
|
||||
++VL_LhsTempPos; VB_IsMoved=true;
|
||||
}/*
|
||||
if(pf_IsTrueValue(VP_LhsTemp->GetData(), VP_RhsHead->GetData())==true)*/
|
||||
|
||||
if(ARR_CutList.mp_HeadLink==0) return;
|
||||
|
||||
if(VP_LhsTemp==VP_LhsTail)
|
||||
{
|
||||
ARR_AddList.JoinTail(ARR_CutList); return;
|
||||
}/*
|
||||
if(VP_LhsTemp==VP_LhsTail)*/
|
||||
|
||||
if(VB_IsMoved==false)
|
||||
{
|
||||
VP_LhsTemp=VP_LhsTemp->mp_NextLink; ++VL_LhsTempPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
VB_IsMoved=false;
|
||||
}
|
||||
}
|
||||
while(true);
|
||||
}/*
|
||||
static void MergeSort
|
||||
(TTypObjList& ARR_AddList, TTypObjList& ARR_CutList, bool AB_IsAscending=true)
|
||||
/*#################*/
|
||||
|
||||
|
||||
template<typename TFunctor> void MakeUnique( /*############*/
|
||||
TTypObjList& ARR_CObjList ,
|
||||
TFunctor AR_Functor ,
|
||||
bool AB_IsSorted =false,
|
||||
bool AB_IsAscending=true
|
||||
/*#########*/ ) /*#########################################*/
|
||||
{
|
||||
// ARR_CObjList <20><> <20><> <20><><EFBFBD>带 <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
if(AB_IsSorted==false)
|
||||
QuickSort(ARR_CObjList,AB_IsAscending);
|
||||
|
||||
TypeSize VL_LoopSize= ARR_CObjList.GetSize() ;
|
||||
TypeSize VL_Index = 1 ;
|
||||
ZCLink* VP_HeadLink= ARR_CObjList.GetHeadLinkPtr();
|
||||
ZCLink* VP_CutLink = 0 ;
|
||||
|
||||
/* VL_LoopSize-1 <20><> <20><>ȯ<EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ұ<EFBFBD> <20>̿<EFBFBD><CCBF>Ѵٸ<D1B4>
|
||||
<20>յ<EFBFBD> <20><><EFBFBD>忡 <20><><EFBFBD><EFBFBD> <20> ó<><C3B3><EFBFBD><EFBFBD> <20>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>带 <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. */
|
||||
|
||||
for(TypeSize i=1; i<VL_LoopSize; ++i)
|
||||
{
|
||||
if(VP_HeadLink->GetData()==VP_HeadLink->GetNextPtr()->GetData())
|
||||
{
|
||||
AR_Functor //////////////////////////
|
||||
(
|
||||
VP_HeadLink->GetData(), VP_HeadLink->GetNextPtr()->GetData()
|
||||
);
|
||||
VP_CutLink=VP_HeadLink->GetNextPtr();
|
||||
|
||||
ARR_CObjList.Delete(VP_CutLink, VL_Index+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
(VP_HeadLink=VP_HeadLink->GetNextPtr(), ++VL_Index);
|
||||
}
|
||||
}/*
|
||||
for(TypeSize i=1; i<VL_LoopSize; ++i)*/
|
||||
}/*
|
||||
template<typename TFunctor> void MakeUnique( ################
|
||||
TFunctor AR_Functor ,
|
||||
bool AB_IsSorted=false ,
|
||||
bool AB_IsAscending=true
|
||||
################# ) #######################################*/
|
||||
|
||||
|
||||
static void MakeUnique( /*#################################*/
|
||||
TTypObjList& ARR_CObjList ,
|
||||
bool AB_IsSorted =false,
|
||||
bool AB_IsAscending=true
|
||||
/*#########*/ ) /*#########################################*/
|
||||
{
|
||||
// ARR_CObjList <20><> <20><> <20><><EFBFBD>带 <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
if(AB_IsSorted==false)
|
||||
QuickSort(ARR_CObjList,AB_IsAscending);
|
||||
|
||||
TypeSize VL_LoopSize =ARR_CObjList.GetSize() ;
|
||||
TypeSize VL_Index =1 ;
|
||||
ZCLink* VP_HeadLink =ARR_CObjList.GetHeadLinkPtr();
|
||||
ZCLink* VP_CutLink =0 ;
|
||||
|
||||
/* VL_LoopSize-1 <20><> <20><>ȯ<EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ұ<EFBFBD> <20>̿<EFBFBD><CCBF>Ѵٸ<D1B4>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>带 <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
*/
|
||||
for(TypeSize i=1; i<VL_LoopSize; ++i)
|
||||
{
|
||||
if(VP_HeadLink->GetData()==VP_HeadLink->GetNextPtr()->GetData())
|
||||
{
|
||||
VP_CutLink = VP_HeadLink->GetNextPtr() ;
|
||||
|
||||
ARR_CObjList.Delete(VP_CutLink, VL_Index+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
(VP_HeadLink=VP_HeadLink->GetNextPtr(), ++VL_Index);
|
||||
}
|
||||
}/*
|
||||
for(TypeSize i=1; i<VL_LoopSize; ++i)*/
|
||||
}/*
|
||||
static void MakeUnique( #####################################
|
||||
TTypObjList& ARR_CObjList ,
|
||||
bool AB_IsSorted =false,
|
||||
bool AB_IsAscending=true
|
||||
############# ) ###########################################*/
|
||||
|
||||
|
||||
template<typename TFunctor> static void SplitGroup( /*#####*/
|
||||
TTypObjList& ARR_CObjList ,
|
||||
TFunctor AR_Functor ,
|
||||
bool AB_IsSorted =false,
|
||||
bool AB_IsAscending=true
|
||||
/*#########*/ ) /*#########################################*/
|
||||
{
|
||||
/* ARR_CObjList <20><> <20><> <20><><EFBFBD>带 <20><><EFBFBD><EFBFBD> <20>ͳ<EFBFBD><CDB3><EFBFBD> <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> AR_Functor <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
*/
|
||||
if(ARR_CObjList.IsEmpty()) return;
|
||||
|
||||
if(AB_IsSorted==false)
|
||||
{
|
||||
QuickSort(ARR_CObjList, AB_IsAscending); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵǾ<C8B5><C7BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD>...
|
||||
}/*
|
||||
if(AB_IsSorted==false)*/
|
||||
|
||||
TypeSize VL_LoopSize=ARR_CObjList.GetSize() ;
|
||||
TypeSize VL_TailPos =1 ;
|
||||
|
||||
ZCLink* VP_CutHead =ARR_CObjList.GetHeadLinkPtr();
|
||||
ZCLink* VP_CutTail =VP_CutHead ;
|
||||
ZCLink* VP_CutTemp =VP_CutTail->GetNextPtr() ;
|
||||
|
||||
// VL_LoopSize-1 <20><> <20><>ȯ
|
||||
|
||||
for(TypeSize i=2; i<=VL_LoopSize; ++i)
|
||||
{
|
||||
if(VP_CutTail->GetData()==VP_CutTemp->GetData())
|
||||
{
|
||||
VP_CutTail=VP_CutTemp ;
|
||||
VP_CutTemp=VP_CutTemp->GetNextPtr() ;
|
||||
|
||||
++VL_TailPos;
|
||||
}
|
||||
else // VP_CutTail->GetData()!=VP_CutTemp->GetData()
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD><D9B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ٴ<EFBFBD> <20><><EFBFBD>̴<EFBFBD>.
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> functor <20><> ó<><C3B3><EFBFBD><EFBFBD> <20>ѱ<EFBFBD><D1B1><EFBFBD>. functor <20><>
|
||||
<20>Ѱܹ<D1B0><DCB9><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>ݵ<EFBFBD><DDB5><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD>) <20>Ѵ<EFBFBD>. CutLink()
|
||||
<20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִµ<D6B4>
|
||||
<20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڷᰡ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵDZ<C8B5> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>. */
|
||||
|
||||
AR_Functor //////////////////////////////////////
|
||||
(
|
||||
ARR_CObjList.CutLink
|
||||
(
|
||||
VP_CutHead, 1, VP_CutTail, VL_TailPos
|
||||
)
|
||||
);
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
VP_CutHead =VP_CutTemp;
|
||||
VP_CutTail =VP_CutTemp;
|
||||
VP_CutTemp =VP_CutTemp->GetNextPtr();
|
||||
|
||||
VL_TailPos =1 ;
|
||||
}/*
|
||||
else // VP_CutTail->GetData()!=VP_CutTemp->GetData()*/
|
||||
}/*
|
||||
for(TypeSize i=2; i<=VL_LoopSize; ++i)*/
|
||||
|
||||
if(ARR_CObjList.IsEmpty()==false) AR_Functor(ARR_CObjList);
|
||||
}/*
|
||||
template<typename TFunctor> static void SplitGroup( ##########
|
||||
TTypObjList& ARR_CObjList ,
|
||||
TFunctor AR_Functor ,
|
||||
bool AB_IsSorted=false ,
|
||||
bool AB_IsAscending=true
|
||||
############# ) ############################################*/
|
||||
|
||||
public:
|
||||
};/*
|
||||
template<typename TypeObjList> class ZtCSortObjList*/
|
||||
template<typename TTypObjList> class ZtCSortObjList */
|
||||
|
||||
|
||||
|
||||
// <20>ܹ<EFBFBD><DCB9><EFBFBD> <20><><EFBFBD>Ḯ<EFBFBD><E1B8AE>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>.
|
||||
|
||||
template<typename TTypObjList> class ZtCSortSimList
|
||||
{
|
||||
public :
|
||||
typedef typename TTypObjList::ZCLink ZCLink ;
|
||||
typedef typename TTypObjList::TypeData TypeData ;
|
||||
typedef typename TTypObjList::TypeArg TypeArg ;
|
||||
typedef typename TTypObjList::TypeSize TypeSize ;
|
||||
private:
|
||||
|
||||
static inline void SwapLinkPtr(ZCLink*& APR_LinkI, ZCLink*& APR_LinkJ)
|
||||
{
|
||||
ZCLink*
|
||||
VP_Temp =APR_LinkI;
|
||||
APR_LinkI=APR_LinkJ;
|
||||
APR_LinkJ=VP_Temp;
|
||||
}/*
|
||||
static inline void SwapLinkPtr( ZCLink*& APR_LinkI, ZCLink*& APR_LinkJ) */
|
||||
|
||||
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess ,
|
||||
ZCLink* APA_LinkPtrArr[],
|
||||
TypeSize AL_FirstIndex ,
|
||||
TypeSize AL_LastIndex
|
||||
)
|
||||
/*##################################################*/
|
||||
{
|
||||
if(AL_FirstIndex<AL_LastIndex)
|
||||
{
|
||||
TypeSize i=AL_FirstIndex ;
|
||||
TypeSize j=AL_LastIndex+1 ;
|
||||
|
||||
ZCLink* VP_PivotLinkPtr=APA_LinkPtrArr[i];
|
||||
|
||||
do //////
|
||||
{
|
||||
while(AL_LastIndex >i && APF_IsLess(APA_LinkPtrArr[++i]->GetData(), VP_PivotLinkPtr->GetData()));
|
||||
while(AL_FirstIndex<j && APF_IsMore(APA_LinkPtrArr[--j]->GetData(), VP_PivotLinkPtr->GetData()));
|
||||
|
||||
if(i<j) SwapLinkPtr(APA_LinkPtrArr[i], APA_LinkPtrArr[j]);
|
||||
}
|
||||
while(i<j);
|
||||
|
||||
/* SwapLinkPtr(APA_LinkPtrArr[AL_FirstIndex],APA_LinkPtrArr[j]);
|
||||
|
||||
<20><> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD>ó<EFBFBD><C3B3> 2 <20>ٷ<EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20>ʾƼ<CABE> <20><><EFBFBD><EFBFBD>.
|
||||
*/
|
||||
APA_LinkPtrArr[AL_FirstIndex]=APA_LinkPtrArr[j];
|
||||
APA_LinkPtrArr[j ]=VP_PivotLinkPtr ;
|
||||
|
||||
QuickSort(APF_IsMore, APF_IsLess, APA_LinkPtrArr, AL_FirstIndex, j-1 );
|
||||
QuickSort(APF_IsMore, APF_IsLess, APA_LinkPtrArr, j+1, AL_LastIndex);
|
||||
}/*
|
||||
if(AL_FirstIndex<AL_LastIndex)*/
|
||||
}/*
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess ,
|
||||
ZCLink* APA_LinkPtrArr[],
|
||||
TypeSize AL_FirstIndex ,
|
||||
TypeSize AL_LastIndex
|
||||
)
|
||||
/*##################################################*/
|
||||
|
||||
/*private:*/
|
||||
public :
|
||||
|
||||
template
|
||||
<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort
|
||||
(
|
||||
TTypObjList& ARR_CObjList,
|
||||
TTypFuncIsMore APF_IsMore ,
|
||||
TTypFuncIsLess APF_IsLess
|
||||
)
|
||||
/*##################################################*/
|
||||
{
|
||||
if(ARR_CObjList.GetSize()<=1) return;
|
||||
|
||||
TypeSize VL_SortSize = ARR_CObjList.GetSize() ;
|
||||
ZCLink** VPP_LinkPtrArr = new ZCLink*[VL_SortSize];
|
||||
|
||||
if(VPP_LinkPtrArr==0)
|
||||
{
|
||||
// Add codes for memory over
|
||||
|
||||
return;
|
||||
}/*
|
||||
if(VPP_LinkPtrArr==0)*/
|
||||
|
||||
ZCLink* VP_TempLink =
|
||||
ARR_CObjList.GetHeadLinkPtr();
|
||||
TypeSize i=0 ;
|
||||
|
||||
for(; i<VL_SortSize; ++i)
|
||||
{
|
||||
VPP_LinkPtrArr[i]=VP_TempLink ;
|
||||
VP_TempLink =VP_TempLink->GetNextPtr();
|
||||
}
|
||||
/////////////////////////
|
||||
|
||||
QuickSort(APF_IsMore, APF_IsLess, VPP_LinkPtrArr, 0, VL_SortSize-1);
|
||||
|
||||
for(i=1; i<VL_SortSize; ++i) // VL_SortSize-1 <20><> <20><>ȯ
|
||||
{
|
||||
ZCLink::JoinLink(VPP_LinkPtrArr[i-1], VPP_LinkPtrArr[i]);
|
||||
}
|
||||
////////////////////////////
|
||||
|
||||
#if(_CODE_OLD_) // <20>Ʒ<EFBFBD> <20>ڵ常 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
ZCLink::MakeCircle(VPP_LinkPtrArr[0], VPP_LinkPtrArr[VL_SortSize-1]);
|
||||
#else
|
||||
ARR_CObjList.mp_HeadLink=VPP_LinkPtrArr[0] ;
|
||||
ARR_CObjList.mp_TailLink=VPP_LinkPtrArr[VL_SortSize-1];
|
||||
#endif
|
||||
|
||||
delete[] VPP_LinkPtrArr;
|
||||
}/*
|
||||
template<typename TTypFuncIsMore, typename TTypFuncIsLess>
|
||||
static void QuickSort(TTypObjList& ARR_CObjList, TTypFuncIsMore APF_IsMore, TTypFuncIsLess APF_IsLess) */
|
||||
|
||||
public:
|
||||
};/*
|
||||
template<typename TTypObjList> class ZtCSortSimList */
|
||||
|
||||
}/*
|
||||
namespace ZNsMain*/
|
||||
|
||||
|
||||
#endif //__ZCPPMAIN__ZCSORT_LIST_H__
|
||||
|
Reference in New Issue
Block a user