50 int load(
const Elem& elem) {
55 int add(
const Elem& elem) {
59 void del(
const Elem & elem) {
61 if (this->
size() != 0 && this->
rep[found] == elem) {
73 inline int insert(
const Elem& elem);
77 inline Elem *
find(
const Elem& elem);
82 int found = bsearch(elem);
86 if (found == (this->size()-1) && this->rep[found] < elem) {
95 int found = bsearch(elem);
96 if ( found < 0 || found == this->size() )
97 return ((Elem *)NULL);
98 if (this->rep[found] == elem) {
99 return (&(this->rep[found]));
101 return ((Elem *)NULL);
ResizeArrayRaw< Elem > rep
SortableResizeArray< Elem > & operator=(SortableResizeArray< Elem > &sa)
int index(const Elem &elem)
int insert(const Elem &elem)
int add(const Elem &elem)
SortedArray(SortableResizeArray< Elem > &ra)
int load(const Elem &elem)
void del(const Elem &elem)
SortedArray(SortedArray< Elem > &sa)
SortedArray< Elem > & operator=(SortedArray< Elem > &sa)
Elem * find(const Elem &elem)
void del(int index, int num=1)
int bsearch(const Elem &elem)