Generated on Tue May 22 09:39:43 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) : 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 // STATISTICS: int-other