Generated on Tue May 22 09:39:50 2018 for Gecode by doxygen 1.6.3

float.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  *     Vincent Barichard <Vincent.Barichard@univ-angers.fr>
00006  *
00007  *  Copyright:
00008  *     Christian Schulte, 2002
00009  *     Vincent Barichard, 2012
00010  *
00011  *  This file is part of Gecode, the generic constraint
00012  *  development environment:
00013  *     http://www.gecode.org
00014  *
00015  *  Permission is hereby granted, free of charge, to any person obtaining
00016  *  a copy of this software and associated documentation files (the
00017  *  "Software"), to deal in the Software without restriction, including
00018  *  without limitation the rights to use, copy, modify, merge, publish,
00019  *  distribute, sublicense, and/or sell copies of the Software, and to
00020  *  permit persons to whom the Software is furnished to do so, subject to
00021  *  the following conditions:
00022  *
00023  *  The above copyright notice and this permission notice shall be
00024  *  included in all copies or substantial portions of the Software.
00025  *
00026  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00027  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00028  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00029  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00030  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00031  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00032  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00033  *
00034  */
00035 
00036 namespace Gecode { namespace Float {
00037 
00038   /*
00039    * Constructors and initialization
00040    *
00041    */
00042   forceinline
00043   FloatView::FloatView(void) {}
00044   forceinline
00045   FloatView::FloatView(const FloatVar& y)
00046     : VarImpView<FloatVar>(y.varimp()) {}
00047   forceinline
00048   FloatView::FloatView(FloatVarImp* y)
00049     : VarImpView<FloatVar>(y) {}
00050 
00051   /*
00052    * Value access
00053    *
00054    */
00055   forceinline FloatVal
00056   FloatView::domain(void) const {
00057     return x->domain();
00058   }
00059   forceinline FloatNum
00060   FloatView::min(void) const {
00061     return x->min();
00062   }
00063   forceinline FloatNum
00064   FloatView::max(void) const {
00065     return x->max();
00066   }
00067   forceinline FloatNum
00068   FloatView::med(void) const {
00069     return x->med();
00070   }
00071   forceinline FloatVal
00072   FloatView::val(void) const {
00073     return x->val();
00074   }
00075 
00076   forceinline FloatNum
00077   FloatView::size(void) const {
00078     return x->size();
00079   }
00080 
00081 
00082   /*
00083    * Domain tests
00084    *
00085    */
00086   forceinline bool
00087   FloatView::zero_in(void) const {
00088     return x->zero_in();
00089   }
00090   forceinline bool
00091   FloatView::in(FloatNum n) const {
00092     return x->in(n);
00093   }
00094   forceinline bool
00095   FloatView::in(const FloatVal& n) const {
00096     return x->in(n);
00097   }
00098 
00099 
00100   /*
00101    * Domain update by value
00102    *
00103    */
00104   forceinline ModEvent
00105   FloatView::lq(Space& home, int n) {
00106     return x->lq(home,n);
00107   }
00108   forceinline ModEvent
00109   FloatView::lq(Space& home, FloatNum n) {
00110     return x->lq(home,n);
00111   }
00112   forceinline ModEvent
00113   FloatView::lq(Space& home, FloatVal n) {
00114     return x->lq(home,n);
00115   }
00116 
00117   forceinline ModEvent
00118   FloatView::gq(Space& home, int n) {
00119     return x->gq(home,n);
00120   }
00121   forceinline ModEvent
00122   FloatView::gq(Space& home, FloatNum n) {
00123     return x->gq(home,n);
00124   }
00125   forceinline ModEvent
00126   FloatView::gq(Space& home, FloatVal n) {
00127     return x->gq(home,n);
00128   }
00129 
00130   forceinline ModEvent
00131   FloatView::eq(Space& home, int n) {
00132     return x->eq(home,n);
00133   }
00134   forceinline ModEvent
00135   FloatView::eq(Space& home, FloatNum n) {
00136     return x->eq(home,n);
00137   }
00138   forceinline ModEvent
00139   FloatView::eq(Space& home, const FloatVal& n) {
00140     return x->eq(home,n);
00141   }
00142 
00143 
00144 
00145   /*
00146    * Delta information for advisors
00147    *
00148    */
00149   forceinline FloatNum
00150   FloatView::min(const Delta& d) const {
00151     return FloatVarImp::min(d);
00152   }
00153   forceinline FloatNum
00154   FloatView::max(const Delta& d) const {
00155     return FloatVarImp::max(d);
00156   }
00157 
00158 
00159   forceinline ModEventDelta
00160   FloatView::med(ModEvent me) {
00161     return VarImpView<FloatVar>::med(me);
00162   }
00163 
00164 }}
00165 
00166 // STATISTICS: float-var
00167