Generated on Mon May 10 06:46:44 2010 for Gecode by doxygen 1.6.3

lds.cpp

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, 2004
00008  *
00009  *  Bugfixes provided by:
00010  *     Stefano Gualandi
00011  *
00012  *  Last modified:
00013  *     $Date: 2009-05-12 10:35:58 +0200 (Tue, 12 May 2009) $ by $Author: schulte $
00014  *     $Revision: 9057 $
00015  *
00016  *  This file is part of Gecode, the generic constraint
00017  *  development environment:
00018  *     http://www.gecode.org
00019  *
00020  *  Permission is hereby granted, free of charge, to any person obtaining
00021  *  a copy of this software and associated documentation files (the
00022  *  "Software"), to deal in the Software without restriction, including
00023  *  without limitation the rights to use, copy, modify, merge, publish,
00024  *  distribute, sublicense, and/or sell copies of the Software, and to
00025  *  permit persons to whom the Software is furnished to do so, subject to
00026  *  the following conditions:
00027  *
00028  *  The above copyright notice and this permission notice shall be
00029  *  included in all copies or substantial portions of the Software.
00030  *
00031  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00032  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00033  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00034  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00035  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00036  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00037  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00038  *
00039  */
00040 
00041 #include <gecode/search.hh>
00042 #include <gecode/search/sequential/lds.hh>
00043 #ifdef GECODE_HAS_THREADS
00044 #include <gecode/search/parallel/lds.hh>
00045 #endif
00046 #include <gecode/search/support.hh>
00047 
00048 namespace Gecode { namespace Search {
00049     
00050   Engine* 
00051   lds(Space* s, size_t sz, const Options& o) {
00052 #ifdef GECODE_HAS_THREADS
00053     Options to = o.expand();
00054     if (to.threads == 1.0)
00055       return new Sequential::LDS(s,sz,to);
00056     else
00057       return new Sequential::LDS(s,sz,to);
00058 #else
00059     return new Sequential::LDS(s,sz,o);
00060 #endif
00061   }
00062 
00063 }}
00064 
00065 // STATISTICS: search-other