⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iceinsertionsort.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 *	Contains code for insertion sort.
 *	\file		IceInsertionSort.h
 *	\author		Pierre Terdiman
 *	\date		April, 4, 2000
 */
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Guard
#ifndef __ICEINSERTIONSORT_H__
#define __ICEINSERTIONSORT_H__

	class ICECORE_API InsertionSort
	{
		public:
		// Constructor/Destructor
								InsertionSort();
								~InsertionSort();
		// Sorting methods
				InsertionSort&	Sort(const sdword* input, udword nb);
				InsertionSort&	Sort(const udword* input, udword nb);
				InsertionSort&	Sort(const float* input, udword nb);

		//! Access to results. mRanks is a list of indices in sorted order, i.e. in the order you may further process your data
		inline_	const udword*	GetRanks()			const	{ return mRanks;	}

								PREVENT_COPY(InsertionSort)
		private:
				udword			mCurrentSize;		//!< Current size of the indices list
				udword*			mRanks;				//!< Ranks
		// Internal methods
				bool			CheckResize(udword nb);
	};

#endif // __ICEINSERTIONSORT_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -