
/*****************************************************************************\

MODULE: tools

SUMMARY:

Some useful tools that are used throughout NTL.

\*****************************************************************************/


#include <stdlib.h>
#include <iostream.h>

struct INIT_SIZE_TYPE { INIT_SIZE_TYPE() { } };
const INIT_SIZE_TYPE INIT_SIZE = INIT_SIZE_TYPE();
// INIT_SIZE is used in several constructors
// to specify an initial size or length


struct INIT_VAL_TYPE { INIT_VAL_TYPE() { } };
const INIT_VAL_TYPE INIT_VAL = INIT_VAL_TYPE();
// INIT_VAL is used in several constructors to
// specify an initial value


/* some min/max and swap routines */
int min(int a, int b);
int max(int a, int b);

long min(long a, long b);
long max(long a, long b);

long min(int a, long b);
long max(int a, long b);

long min(long a, int b);
long max(long a, int b);

void swap(long& a, long& b);
void swap(int& a, int& b);


void Error(const char *s);
// print an error message and call abort

double GetTime();
// returns number of seconds of CPU time used by this process;

