Generated on Fri Mar 20 15:55:58 2015 for Gecode by doxygen 1.6.3

val.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, 2012
00008  *
00009  *  Last modified:
00010  *     $Date: 2013-06-23 18:58:11 +0200 (Sun, 23 Jun 2013) $ by $Author: schulte $
00011  *     $Revision: 13729 $
00012  *
00013  *  This file is part of Gecode, the generic constraint
00014  *  development environment:
00015  *     http://www.gecode.org
00016  *
00017  *  Permission is hereby granted, free of charge, to any person obtaining
00018  *  a copy of this software and associated documentation files (the
00019  *  "Software"), to deal in the Software without restriction, including
00020  *  without limitation the rights to use, copy, modify, merge, publish,
00021  *  distribute, sublicense, and/or sell copies of the Software, and to
00022  *  permit persons to whom the Software is furnished to do so, subject to
00023  *  the following conditions:
00024  *
00025  *  The above copyright notice and this permission notice shall be
00026  *  included in all copies or substantial portions of the Software.
00027  *
00028  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00029  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00030  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00031  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00032  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00033  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00034  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  *
00036  */
00037 
00038 namespace Gecode {
00039 
00040   forceinline 
00041   IntValBranch::IntValBranch(Select s0)
00042     : s(s0) {}
00043 
00044   forceinline 
00045   IntValBranch::IntValBranch(Rnd r)
00046     : ValBranch(r), s(SEL_RND) {}
00047 
00048   forceinline 
00049   IntValBranch::IntValBranch(VoidFunction v, VoidFunction c)
00050     : ValBranch(v,c), s(SEL_VAL_COMMIT) {}
00051 
00052   forceinline 
00053   IntValBranch::IntValBranch(Select s0, IntSharedArray n0)
00054     : n(n0), s(s0) {}
00055 
00056   forceinline IntValBranch::Select
00057   IntValBranch::select(void) const {
00058     return s;
00059   }
00060 
00061   forceinline IntSharedArray
00062   IntValBranch::values(void) const {
00063     return n;
00064   }
00065 
00066 
00067   inline IntValBranch
00068   INT_VAL_MIN(void) {
00069     return IntValBranch(IntValBranch::SEL_MIN);
00070   }
00071 
00072   inline IntValBranch
00073   INT_VAL_MED(void) {
00074     return IntValBranch(IntValBranch::SEL_MED);
00075   }
00076 
00077   inline IntValBranch
00078   INT_VAL_MAX(void) {
00079     return IntValBranch(IntValBranch::SEL_MAX);
00080   }
00081 
00082   inline IntValBranch
00083   INT_VAL_RND(Rnd r) {
00084     return IntValBranch(r);
00085   }
00086 
00087   inline IntValBranch
00088   INT_VAL_SPLIT_MIN(void) {
00089     return IntValBranch(IntValBranch::SEL_SPLIT_MIN);
00090   }
00091 
00092   inline IntValBranch
00093   INT_VAL_SPLIT_MAX(void) {
00094     return IntValBranch(IntValBranch::SEL_SPLIT_MAX);
00095   }
00096 
00097   inline IntValBranch
00098   INT_VAL_RANGE_MIN(void) {
00099     return IntValBranch(IntValBranch::SEL_RANGE_MIN);
00100   }
00101 
00102   inline IntValBranch
00103   INT_VAL_RANGE_MAX(void) {
00104     return IntValBranch(IntValBranch::SEL_RANGE_MAX);
00105   }
00106 
00107   inline IntValBranch
00108   INT_VAL(IntBranchVal v, IntBranchCommit c) {
00109     return IntValBranch(function_cast<VoidFunction>(v),
00110                         function_cast<VoidFunction>(c));
00111   }
00112 
00113   inline IntValBranch
00114   INT_VAL(BoolBranchVal v, BoolBranchCommit c) {
00115     return IntValBranch(function_cast<VoidFunction>(v),
00116                         function_cast<VoidFunction>(c));
00117   }
00118 
00119   inline IntValBranch
00120   INT_VALUES_MIN(void) {
00121     return IntValBranch(IntValBranch::SEL_VALUES_MIN);
00122   }
00123 
00124   inline IntValBranch
00125   INT_VALUES_MAX(void) {
00126     return IntValBranch(IntValBranch::SEL_VALUES_MAX);
00127   }
00128 
00129   inline IntValBranch
00130   INT_VAL_NEAR_MIN(IntSharedArray n) {
00131     return IntValBranch(IntValBranch::SEL_NEAR_MIN,n);
00132   }
00133 
00134   inline IntValBranch
00135   INT_VAL_NEAR_MAX(IntSharedArray n) {
00136     return IntValBranch(IntValBranch::SEL_NEAR_MAX,n);
00137   }
00138 
00139   inline IntValBranch
00140   INT_VAL_NEAR_INC(IntSharedArray n) {
00141     return IntValBranch(IntValBranch::SEL_NEAR_INC,n);
00142   }
00143 
00144   inline IntValBranch
00145   INT_VAL_NEAR_DEC(IntSharedArray n) {
00146     return IntValBranch(IntValBranch::SEL_NEAR_DEC,n);
00147   }
00148 
00149 }
00150 
00151 // STATISTICS: int-branch