chb.cpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2017
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include <gecode/set.hh>
namespace Gecode {
SetCHB::SetCHB(Home home, const SetVarArgs& x, SetBranchMerit bm) {
ViewArray<Set::SetView> y(home,x);
CHB::init(home,y,bm);
}
void
SetCHB::init(Home home, const SetVarArgs& x, SetBranchMerit bm) {
ViewArray<Set::SetView> y(home,x);
CHB::init(home,y,bm);
}
}
// STATISTICS: set-branch
Gecode::CHB::init
void init(Home home, ViewArray< View > &x, typename BranchTraits< typename View::VarType >::Merit bm)
Initialize for views x and Q-score as defined by bm.
Definition chb.hpp:358
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::SetCHB::init
void init(Home home, const SetVarArgs &x, SetBranchMerit bm=nullptr)
Initialize for set variables x.
Definition chb.cpp:44
Gecode::SetCHB::SetCHB
SetCHB(void)
Construct as not yet initialized.
Definition chb.hpp:37
Gecode::SetVarArgs
Passing set variables.
Definition set.hh:488
Gecode::ViewArray
View arrays.
Definition array.hpp:253
set.hh
Gecode::SetBranchMerit
std::function< double(const Space &home, SetVar x, int i)> SetBranchMerit
Branch merit function type for set variables.
Definition set.hh:1095
Gecode
Gecode toplevel namespace