7 #include <mix/SortedAr.H>
19 IntAr (
unsigned quant = DEFAULT_QUANT,
20 unsigned volume = START_VOLUME);
22 int& fetch (
unsigned i);
23 int get (
unsigned i)
const;
25 void insert (
unsigned i,
int val);
30 void addh (
const IntAr& intar);
31 void addl (
const IntAr& intar);
34 IntAr& assign (
unsigned cnt,
int* vect);
40 int& operator[] (
unsigned i) {
return fetch(i);};
41 int operator() (
unsigned i)
const {
return get(i);};
42 IntAr& operator= (
const IntAr& intar) {
return assign(intar);};
45 virtual Compar compare (
const char* item1,
const char* item2)
const;
48 virtual void exchange (
unsigned i1,
unsigned i2);
51 int find_ascent (
int item)
const
52 {
return quick_find_ascent((
const char*)&item);}
53 int find_descent (
int item)
const
54 {
return quick_find_descent((
const char*)&item);}
55 int find (
int item)
const
56 {
return slow_find((
const char*)&item);}
60 Compar find_range_ascent (
int value,
61 unsigned& L,
unsigned& R)
const {
62 return SortedAr::find_range_ascent((
const char*)&value, L, R);
64 Compar find_range_descent (
int value,
65 unsigned& L,
unsigned& R)
const {
66 return SortedAr::find_range_descent((
const char*)&value, L, R);
70 virtual void print_item (
unsigned i)
const;
71 virtual void print_contents ()
const;
85 UIntAr (
unsigned quant = DEFAULT_QUANT,
86 unsigned volume = START_VOLUME);
88 unsigned& fetch (
unsigned i);
89 unsigned get (
unsigned i)
const;
91 void insert (
unsigned i,
unsigned val);
93 void addh (
unsigned val);
94 void addl (
unsigned val);
96 void addh (
const UIntAr& uintar);
97 void addl (
const UIntAr& uintar);
100 UIntAr& assign (
unsigned cnt,
unsigned* vect);
103 unsigned* vector ()
const;
106 unsigned& operator[] (
unsigned i) {
return fetch(i);};
107 unsigned operator() (
unsigned i)
const {
return get(i);};
108 UIntAr& operator= (
const UIntAr& uintar) {
return assign(uintar);};
111 virtual Compar compare (
const char* item1,
const char* item2)
const;
114 virtual void exchange (
unsigned i1,
unsigned i2);
117 int find_ascent (
unsigned item)
const
118 {
return quick_find_ascent((
const char*)&item);}
119 int find_descent (
unsigned item)
const
120 {
return quick_find_descent((
const char*)&item);}
121 int find (
unsigned item)
const
122 {
return slow_find((
const char*)&item);}
126 Compar find_range_ascent (
unsigned value,
127 unsigned& L,
unsigned& R)
const {
128 return SortedAr::find_range_ascent((
const char*)&value, L, R);
130 Compar find_range_descent (
unsigned value,
131 unsigned& L,
unsigned& R)
const {
132 return SortedAr::find_range_descent((
const char*)&value, L, R);
136 virtual void print_item (
unsigned i)
const;
137 virtual void print_contents ()
const;
Definition: SortedAr.H:14