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

📄 dcomp.h

📁 稀疏矩阵、链表、图、队列、二叉树、多叉树、排序、遗传算法等的实现
💻 H
字号:
/*
** The proper usage and copyright information for
** this software is covered in DSCRLic.TXT
** This code is Copyright 1999 by Dann Corbit
*/


/*
 ** Double comparison functions.
 */

typedef double  Etype;

/*
** stuff needed by radix sorts
*/
#define CHUNK(x, y) digit(double2key((*(x))), (y))
#define CHUNKS(x, a)\
{ uint64 foo = double2key((*(x))); \
  int t; \
  for (t = 0; t < sizeof(foo); t++)\
  a[digit(foo,t)+1][t]++;\
}

#define COST 4
/*
** Fake name mangling.  Does not give us a true template in C.
** [If we try to sort two arrays of the same type in a single file
** by using allsort.h as an include file, we will get multiple
** function defintions.
*/
#define GE ge_d
#define GT gt_d
#define LE le_d
#define LT lt_d
#define EQ eq_d
#define CMP cmp_d
/*
** Token pasting would be neater, but less obvious.
*/
#define INSORT                  InSort_d
#define ARRAYISSORTED           ArrayIsSorted_d
#define ARRAYISREVERSED         ArrayIsReversed_d
#define BATCHER                 Batcher_d
#define LINEARINSERTION         LinearInsertion_d
#define INSERTIONSORT           InsertionSort_d
#define INSERTONE               InsertOne_d
#define INSERTTWO               InsertTwo_d
#define INSERTFOUR              InsertFour_d
#define INSERTTHREE             InsertThree_d
#define INSERTZERO              InsertZero_d
#define MEDIAN                  Median_d
#define RADIXLSD                RadixLsd_d
#define REVERSEARRAY            ReverseArray_d
#define SWAP                    Swap_d
#define SHELLSORT               Shellsort_d
#define IQSORT5                 Iqsort5_d
#define QSORTB                  qsort_d
#define HEAPSORT                heapsort_d
#define PERCDOWN                percdown_d
#define PARSCAN                 parscan_d
#define PDELETEMIN              pdeletemin_d
#define PGETMIN                 pgetmin_d
#define PNORMALIZE              pnormalize_d
#define PSHELLSORT              pshellsort_d
#define MERGE_SORT              merge_sort_d
#define RADIXMSD                RadixMsd_d
#define MMERGE                  Mmerge_d
#define MSORT                   Msort_d
#define MERGESORTB              Mergesortb_d

#include "compobj.h"

⌨️ 快捷键说明

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