array.hpp
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
00031
00032
00033
00034 namespace Gecode {
00035
00036
00037
00038
00039
00040
00041 forceinline
00042 IntArgs::IntArgs(void) : PrimArgArray<int>(0) {}
00043
00044 forceinline
00045 IntArgs::IntArgs(int n) : PrimArgArray<int>(n) {}
00046
00047 forceinline
00048 IntArgs::IntArgs(const SharedArray<int>& x)
00049 : PrimArgArray<int>(x.size()) {
00050 for (int i=x.size(); i--;)
00051 a[i] = x[i];
00052 }
00053 forceinline
00054 IntArgs::IntArgs(const std::vector<int>& x)
00055 : PrimArgArray<int>(x) {}
00056 template<class InputIterator>
00057 forceinline
00058 IntArgs::IntArgs(InputIterator first, InputIterator last)
00059 : PrimArgArray<int>(first,last) {}
00060
00061 forceinline
00062 IntArgs::IntArgs(int n, const int* e) : PrimArgArray<int>(n, e) {}
00063
00064 forceinline
00065 IntArgs::IntArgs(const PrimArgArray<int>& a) : PrimArgArray<int>(a) {}
00066
00067 forceinline IntArgs
00068 IntArgs::create(int n, int start, int inc) {
00069 IntArgs r(n);
00070 for (int i=0; i<n; i++, start+=inc)
00071 r[i] = start;
00072 return r;
00073 }
00074
00075 forceinline
00076 IntVarArray::IntVarArray(void) {}
00077
00078 forceinline
00079 IntVarArray::IntVarArray(Space& home, int n)
00080 : VarArray<IntVar>(home,n) {}
00081
00082 forceinline
00083 IntVarArray::IntVarArray(const IntVarArray& a)
00084 : VarArray<IntVar>(a) {}
00085
00086 forceinline
00087 IntVarArray::IntVarArray(Space& home, const IntVarArgs& a)
00088 : VarArray<IntVar>(home,a) {}
00089
00090
00091 forceinline
00092 BoolVarArray::BoolVarArray(void) {}
00093
00094 forceinline
00095 BoolVarArray::BoolVarArray(Space& home, int n)
00096 : VarArray<BoolVar>(home,n) {}
00097
00098 forceinline
00099 BoolVarArray::BoolVarArray(const BoolVarArray& a)
00100 : VarArray<BoolVar>(a) {}
00101
00102 forceinline
00103 BoolVarArray::BoolVarArray(Space& home, const BoolVarArgs& a)
00104 : VarArray<BoolVar>(home,a) {}
00105
00106 }
00107
00108