15 class svec :
public vector<T>
19 int isize()
const {
return (
int)vector<T>::size();}
20 long long lsize()
const {
return vector<T>::size();}
23 const T & operator[] (
long long i)
const {
25 cout <<
"ERROR: i=" << i <<
" lsize=" << lsize() << endl;
29 cout <<
"ERROR: i=" << i <<
" lsize=" << lsize() << endl;
34 return vector<T>::operator[](i);
37 T & operator[] (
long long i) {
40 cout <<
"ERROR: i=" << i <<
" lsize=" << lsize() << endl;
44 cout <<
"ERROR: i=" << i <<
" lsize=" << lsize() << endl;
49 return vector<T>::operator[](i);
65 sort(v.begin(), v.end());
72 sort(v.begin(), v.end());
76 for (i=0; i<v.
lsize(); i++) {
78 while (i+1<v.
lsize() && !(v[k] < v[i+1]))
92 iter = lower_bound(begin, end, item);
93 long long pos = distance(begin, iter);
101 if (v[pos] < item || item < v[pos])
114 iter = lower_bound(begin, end, item);
115 long pos = distance(begin, iter);
long long lsize() const
Definition: SVector.h:20
long long BinSearch(svec< T > &v, const T &item)
Definition: SVector.h:87
void Sort(svec< T > &v)
Definition: SVector.h:63
long long BinSearchFuzzy(svec< T > &v, const T &item)
Definition: SVector.h:109
void ThrowError(const string &info, const string &type)
Definition: ErrorHandling.h:29
int isize() const
Definition: SVector.h:19
void UniqueSort(svec< T > &v)
Definition: SVector.h:70