int_vector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef INT_VECTOR_H_
00031 # define INT_VECTOR_H_
00032
00033 #include <stdlib.h>
00034 #include <iostream>
00035 #include <cmath>
00036 #include <string>
00037 #include <errno.h>
00038 #include <stdio.h>
00039
00040 #include <vector>
00041 using namespace std;
00042
00043 class int_vector
00044 {
00045 public:
00046 int_vector();
00047 int_vector(const int_vector&);
00048 int_vector(const std::vector<int>&);
00049 ~int_vector();
00050
00051 int size() const;
00052 int resize(int _size);
00053
00054 int &operator[](int k_vertex);
00055 int operator[](int k_vertex) const;
00056 int_vector& operator=(const int_vector&);
00057
00058 int add_unique(int k_index);
00059 int add(int k_vertex);
00060 int add(const std::vector <int>& _int_list);
00061
00063
00065 int exists(int index_to_find) const;
00066
00067 friend bool operator==(const int_vector& cont_1,const int_vector& cont_2);
00068 friend bool operator!=(const int_vector& cont_1,const int_vector& cont_2);
00069
00070 private:
00071
00072 std::vector <int> int_list;
00073 };
00074
00075
00076 #endif