3 #if !defined __FloatAr_H
8 #include <mix/SortedAr.H>
20 FloatAr (
unsigned quant = DEFAULT_QUANT,
21 unsigned volume = START_VOLUME);
23 float& fetch (
unsigned i);
24 float get (
unsigned i)
const;
26 void insert (
unsigned i,
float val);
28 void addh (
float val);
29 void addl (
float val);
31 void addh (
const FloatAr& flar);
32 void addl (
const FloatAr& flar);
35 FloatAr& assign (
unsigned cnt,
float* vect);
37 float* vector ()
const;
40 float& operator[] (
unsigned i) {
return fetch(i);};
41 float operator() (
unsigned i)
const {
return get(i);};
45 virtual Compar compare (
const char* item1,
const char* item2)
const;
48 virtual void exchange (
unsigned i1,
unsigned i2);
51 int find_ascent (
float item)
const
52 {
return quick_find_ascent((
const char*)&item);}
53 int find_descent (
float item)
const
54 {
return quick_find_descent((
const char*)&item);}
55 int find (
float item)
const
56 {
return slow_find((
const char*)&item);}
60 Compar find_range_ascent (
float value,
61 unsigned& L,
unsigned& R)
const {
62 return SortedAr::find_range_ascent((
const char*)&value, L, R);
64 Compar find_range_descent (
float value,
65 unsigned& L,
unsigned& R)
const {
66 return SortedAr::find_range_descent((
const char*)&value, L, R);
71 virtual void print_item (
unsigned i)
const;
72 virtual void print_contents ()
const;
Definition: SortedAr.H:14