Generated on Fri Oct 19 11:24:52 2018 for Gecode by doxygen 1.6.3

array.hpp

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Copyright:
00007  *     Christian Schulte, 2005
00008  *
00009  *  This file is part of Gecode, the generic constraint
00010  *  development environment:
00011  *     http://www.gecode.org
00012  *
00013  *  Permission is hereby granted, free of charge, to any person obtaining
00014  *  a copy of this software and associated documentation files (the
00015  *  "Software"), to deal in the Software without restriction, including
00016  *  without limitation the rights to use, copy, modify, merge, publish,
00017  *  distribute, sublicense, and/or sell copies of the Software, and to
00018  *  permit persons to whom the Software is furnished to do so, subject to
00019  *  the following conditions:
00020  *
00021  *  The above copyright notice and this permission notice shall be
00022  *  included in all copies or substantial portions of the Software.
00023  *
00024  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00025  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00026  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00027  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00028  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00029  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00030  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00031  *
00032  */
00033 
00034 namespace Gecode {
00035 
00036   /*
00037    * Implementation
00038    *
00039    */
00040 
00041   forceinline
00042   IntArgs::IntArgs(void) : ArgArray<int>(0) {}
00043 
00044   forceinline
00045   IntArgs::IntArgs(int n) : ArgArray<int>(n) {}
00046 
00047   forceinline
00048   IntArgs::IntArgs(const SharedArray<int>& x)
00049     : ArgArray<int>(x.size()) {
00050     for (int i=0; i<x.size(); i++)
00051       a[i] = x[i];
00052   }
00053 
00054   forceinline
00055   IntArgs::IntArgs(const std::vector<int>& x)
00056     : ArgArray<int>(x) {}
00057 
00058   forceinline
00059   IntArgs::IntArgs(std::initializer_list<int> x)
00060     : ArgArray<int>(x) {}
00061 
00062   template<class InputIterator>
00063   forceinline
00064   IntArgs::IntArgs(InputIterator first, InputIterator last)
00065     : ArgArray<int>(first,last) {}
00066 
00067   forceinline
00068   IntArgs::IntArgs(int n, const int* e)
00069     : ArgArray<int>(n, e) {}
00070 
00071   forceinline
00072   IntArgs::IntArgs(const ArgArray<int>& a)
00073     : ArgArray<int>(a) {}
00074 
00075   forceinline IntArgs
00076   IntArgs::create(int n, int start, int inc) {
00077     IntArgs r(n);
00078     for (int i=0; i<n; i++, start+=inc)
00079       r[i] = start;
00080     return r;
00081   }
00082 
00083 
00084   forceinline
00085   IntVarArgs::IntVarArgs(void) {}
00086 
00087   forceinline
00088   IntVarArgs::IntVarArgs(int n)
00089     : VarArgArray<IntVar>(n) {}
00090 
00091   forceinline
00092   IntVarArgs::IntVarArgs(const IntVarArgs& a)
00093     : VarArgArray<IntVar>(a) {}
00094 
00095   forceinline
00096   IntVarArgs::IntVarArgs(const VarArray<IntVar>& a)
00097     : VarArgArray<IntVar>(a) {}
00098 
00099   forceinline
00100   IntVarArgs::IntVarArgs(const std::vector<IntVar>& a)
00101     : VarArgArray<IntVar>(a) {}
00102 
00103   forceinline
00104   IntVarArgs::IntVarArgs(std::initializer_list<IntVar> a)
00105     : VarArgArray<IntVar>(a) {}
00106 
00107   template<class InputIterator>
00108   forceinline
00109   IntVarArgs::IntVarArgs(InputIterator first, InputIterator last)
00110     : VarArgArray<IntVar>(first,last) {}
00111 
00112 
00113   forceinline
00114   BoolVarArgs::BoolVarArgs(void) {}
00115 
00116   forceinline
00117   BoolVarArgs::BoolVarArgs(int n)
00118     : VarArgArray<BoolVar>(n) {}
00119 
00120   forceinline
00121   BoolVarArgs::BoolVarArgs(const BoolVarArgs& a)
00122     : VarArgArray<BoolVar>(a) {}
00123 
00124   forceinline
00125   BoolVarArgs::BoolVarArgs(const VarArray<BoolVar>& a)
00126     : VarArgArray<BoolVar>(a) {}
00127 
00128   forceinline
00129   BoolVarArgs::BoolVarArgs(const std::vector<BoolVar>& a)
00130     : VarArgArray<BoolVar>(a) {}
00131 
00132   forceinline
00133   BoolVarArgs::BoolVarArgs(std::initializer_list<BoolVar> a)
00134     : VarArgArray<BoolVar>(a) {}
00135 
00136   template<class InputIterator>
00137   forceinline
00138   BoolVarArgs::BoolVarArgs(InputIterator first, InputIterator last)
00139     : VarArgArray<BoolVar>(first,last) {}
00140 
00141 
00142   forceinline
00143   IntVarArray::IntVarArray(void) {}
00144 
00145   forceinline
00146   IntVarArray::IntVarArray(Space& home, int n)
00147     : VarArray<IntVar>(home,n) {}
00148 
00149   forceinline
00150   IntVarArray::IntVarArray(const IntVarArray& a)
00151     : VarArray<IntVar>(a) {}
00152 
00153   forceinline
00154   IntVarArray::IntVarArray(Space& home, const IntVarArgs& a)
00155     : VarArray<IntVar>(home,a) {}
00156 
00157 
00158   forceinline
00159   BoolVarArray::BoolVarArray(void) {}
00160 
00161   forceinline
00162   BoolVarArray::BoolVarArray(Space& home, int n)
00163     : VarArray<BoolVar>(home,n) {}
00164 
00165   forceinline
00166   BoolVarArray::BoolVarArray(const BoolVarArray& a)
00167     : VarArray<BoolVar>(a) {}
00168 
00169   forceinline
00170   BoolVarArray::BoolVarArray(Space& home, const BoolVarArgs& a)
00171     : VarArray<BoolVar>(home,a) {}
00172 
00173 }
00174 
00175 // STATISTICS: int-other