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

📄 sortdlg.h

📁 这 里 是 用mfc 做的 一些排序 ,各种 排序都有
💻 H
字号:
// sortDlg.h : header file
//

#if !defined(AFX_SORTDLG_H__E0EF278E_6D84_44F5_8936_52A931818666__INCLUDED_)
#define AFX_SORTDLG_H__E0EF278E_6D84_44F5_8936_52A931818666__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "time.h"
/////////////////////////////////////////////////////////////////////////////
// CSortDlg dialog

class CSortDlg : public CDialog
{
// Construction
public:
	CSortDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CSortDlg)
	enum { IDD = IDD_SORT_DIALOG };
	CButton	m_clear;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSortDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
long start,stop,runtime;

void bubble_sort(int x[]);
void BubbleExchange(int x[],int i,int exchange);

void InsertionSort(int x[]);
void Insert(int x[],int i);

void Shellsort(int x[]);
void ShellInsert(int x[],const int gap);

void MergeSort(int x[]);
void MergePass(int init_array[],int merge_array[],const int len);
void merge(int init_array[],int merge_array[],const int i,const int m,const int n);

void BinaryInsertSort(int x[]);
void BinaryInsert(int x[],int i);

void SelectSort(int x[]);
void SelectExchange(int x[],const int i);

void RadixSort(int* data,int left,int right);
int digit(int data,int n);
void SortOnDigit(int* data,int d,int left,int right);

void quick_sort(int x[], int low, int high);
int partition(int x[],int low,int high);

void HeapSort(int x[]);
void FilterDown(const int i,const int EndOfHeap);

void HeapSort(int*list,int num);
void FiltDown(int*list,int i,int end);


protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CSortDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void Onshellsort();
	afx_msg void OnBubbleSort();
	afx_msg void OnInsertSort();
	afx_msg void OnMergeSort();
	afx_msg void OnClear();
	afx_msg void OnCardinaNumberSort();
	afx_msg void OnHeapSort();
	afx_msg void OnDirectChooseSort();
	afx_msg void OnBinaryInsertSort();
	afx_msg void OnQuickSort();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SORTDLG_H__E0EF278E_6D84_44F5_8936_52A931818666__INCLUDED_)

⌨️ 快捷键说明

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