00001 #ifndef Pv_Vector_Included
00002 #define Pv_Vector_Included
00003
00004 #include <vector>
00005 #include <iostream>
00006
00007 template<class T>class Pv_Vector : public std::vector<T>{
00008 public:
00009 Pv_Vector():std::vector<T>(){}
00010 Pv_Vector(int s):std::vector<T>(s){}
00011 T& operator[](int i){
00012 return(at(i));
00013 }
00014 const T& operator[] (int i) const{
00015 return(at(i));
00016 }
00017 friend std::ostream& operator<< (std::ostream& s,const Pv_Vector& the_vect){
00018 s<<"Pv_Vector:\n";
00019 for(int i=0;i<(int)the_vect.size();i++){
00020 s<<i<<": "<<the_vect[i]<<"\n";
00021 }
00022 return(s);
00023 }
00024 };
00025 #endif