Generated on Wed Nov 1 15:04:30 2006 for Gecode by doxygen 1.4.5

branch.cc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Contributing authors:
00007  *     Gabor Szokoli <szokoli@gecode.org>
00008  *
00009  *  Copyright:
00010  *     Guido Tack, 2004
00011  *     Christian Schulte, 2004
00012  *     Gabor Szokoli, 2004
00013  *
00014  *  Last modified:
00015  *     $Date: 2006-04-11 15:58:37 +0200 (Tue, 11 Apr 2006) $ by $Author: tack $
00016  *     $Revision: 3188 $
00017  *
00018  *  This file is part of Gecode, the generic constraint
00019  *  development environment:
00020  *     http://www.gecode.org
00021  *
00022  *  See the file "LICENSE" for information on usage and
00023  *  redistribution of this file, and for a
00024  *     DISCLAIMER OF ALL WARRANTIES.
00025  *
00026  */
00027 
00028 #include "gecode/set/branch.hh"
00029 
00030 namespace Gecode {
00031 
00032   using namespace Set;
00033 
00034   void
00035   branch(Space* home, const SetVarArgs& xa, SetBvarSel vars, SetBvalSel vals) {
00036     if (home->failed()) return;
00037     ViewArray<SetView> x(home,xa);
00038     switch (vars) {
00039     case SETBVAR_NONE:
00040       Branch::create<Branch::ByNone>(home,x,vals); break;
00041     case SETBVAR_MIN_CARD:
00042       Branch::create<Branch::ByMinCard>(home,x,vals); break;
00043     case SETBVAR_MAX_CARD:
00044       Branch::create<Branch::ByMaxCard>(home,x,vals); break;
00045     case SETBVAR_MIN_UNKNOWN_ELEM:
00046       Branch::create<Branch::ByMinUnknown>(home,x,vals); break;
00047     case SETBVAR_MAX_UNKNOWN_ELEM:
00048       Branch::create<Branch::ByMaxUnknown>(home,x,vals); break;
00049     default:
00050       throw UnknownBranching("Set::branch");
00051     }
00052   }
00053 
00054 }
00055 
00056 // STATISTICS: set-post
00057