3 #if !defined __LongAr_H
7 #include <mix/SortedAr.H>
19 LongAr (
unsigned quant = DEFAULT_QUANT,
20 unsigned volume = START_VOLUME);
22 long& fetch (
unsigned i);
23 long get (
unsigned i)
const;
25 void insert (
unsigned i,
long val);
30 void addh (
const LongAr& longar);
31 void addl (
const LongAr& longar);
34 LongAr& assign (
unsigned cnt,
long* vect);
37 long* vector ()
const;
40 long& operator[] (
unsigned i) {
return fetch(i);};
41 long operator() (
unsigned i)
const {
return get(i);};
42 LongAr& operator= (
const LongAr& longar) {
return assign(longar);};
45 virtual Compar compare (
const char* item1,
const char* item2)
const;
48 virtual void exchange (
unsigned i1,
unsigned i2);
51 int find_ascent (
long item)
const
52 {
return quick_find_ascent((
const char*)&item);}
53 int find_descent (
long item)
const
54 {
return quick_find_descent((
const char*)&item);}
55 int find (
long item)
const
56 {
return slow_find((
const char*)&item);}
60 Compar find_range_ascent (
long value,
61 unsigned& L,
unsigned& R)
const {
62 return SortedAr::find_range_ascent((
const char*)&value, L, R);
64 Compar find_range_descent (
long 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 ULongAr (
unsigned quant = DEFAULT_QUANT,
86 unsigned volume = START_VOLUME);
88 unsigned long& fetch (
unsigned i);
89 unsigned long get (
unsigned i)
const;
91 void insert (
unsigned i,
unsigned long val);
93 void addh (
unsigned long val);
94 void addl (
unsigned long val);
96 void addh (
const ULongAr& ulongar);
97 void addl (
const ULongAr& ulongar);
100 ULongAr& assign (
unsigned cnt,
unsigned long* vect);
103 unsigned long* vector ()
const;
106 unsigned long& operator[] (
unsigned i) {
return fetch(i);};
107 unsigned long operator() (
unsigned i)
const {
return get(i);};
108 ULongAr& operator= (
const ULongAr& ulongar) {
return assign(ulongar);};
111 virtual Compar compare (
const char* item1,
const char* item2)
const;
115 virtual void exchange (
unsigned i1,
unsigned i2);
118 int find_ascent (
unsigned long item)
const
119 {
return quick_find_ascent((
const char*)&item);}
120 int find_descent (
unsigned long item)
const
121 {
return quick_find_descent((
const char*)&item);}
122 int find (
unsigned long item)
const
123 {
return slow_find((
const char*)&item);}
127 Compar find_range_ascent (
unsigned long value,
128 unsigned& L,
unsigned& R)
const {
129 return SortedAr::find_range_ascent((
const char*)&value, L, R);
131 Compar find_range_descent (
unsigned long value,
132 unsigned& L,
unsigned& R)
const {
133 return SortedAr::find_range_descent((
const char*)&value, L, R);
137 virtual void print_item (
unsigned i)
const;
138 virtual void print_contents ()
const;
Definition: SortedAr.H:14