41 _FORCE_INLINE_
int _find(
const T& p_val,
bool &r_exact)
const {
48 int high = _data.size() -1;
54 middle = ( low + high ) / 2;
56 if( p_val < a[ middle] ) {
58 }
else if ( a[middle] < p_val) {
72 _FORCE_INLINE_
int _find_exact(
const T& p_val)
const {
78 int high = _data.size() -1;
84 middle = ( low + high ) / 2;
86 if( p_val < a[ middle] ) {
88 }
else if ( a[middle] < p_val) {
100 void insert(
const T& p_val) {
103 int pos = _find(p_val,exact);
106 _data.insert(pos,p_val);
109 bool has(
const T& p_val)
const {
111 return _find_exact(p_val)!=-1;
114 void erase(
const T& p_val) {
116 int pos = _find_exact(p_val);
122 int find(
const T& p_val)
const {
124 return _find_exact(p_val);
128 _FORCE_INLINE_
bool empty()
const {
return _data.empty(); }
130 _FORCE_INLINE_
int size()
const {
return _data.size(); }
132 inline T& operator[](
int p_index) {
134 return _data[p_index];
137 inline const T& operator[](
int p_index)
const {
139 return _data[p_index];