bool-trace-view.hpp
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, 2016
*
* 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.
*
*/
namespace Gecode { namespace Int {
class BoolTraceView {
public:
BoolTraceView(void);
BoolTraceView(Space& home, BoolView y);
void prune(Space& home, BoolView y, const Delta& d);
void update(Space&home, BoolTraceView x);
static unsigned int slack(BoolView x);
};
forceinline
BoolTraceView::BoolTraceView(void) {}
forceinline
BoolTraceView::BoolTraceView(Space&, BoolView) {}
forceinline void
BoolTraceView::prune(Space&, BoolView, const Delta&) {}
forceinline void
BoolTraceView::update(Space&, BoolTraceView) {}
forceinline unsigned int
BoolTraceView::slack(BoolView x) {
return x.width()-1;
}
}}
// STATISTICS: int-trace
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::Int::BoolTraceView::BoolTraceView
BoolTraceView(void)
Default constructor (initializes with no view).
Definition bool-trace-view.hpp:53
Gecode::Int::BoolTraceView::slack
static unsigned int slack(BoolView x)
Return slack of x.
Definition bool-trace-view.hpp:61
Gecode::Int::BoolTraceView::update
void update(Space &home, BoolTraceView x)
Update duplicate view during copying.
Definition bool-trace-view.hpp:59
Gecode::Int::BoolTraceView::prune
void prune(Space &home, BoolView y, const Delta &d)
Update duplicated view from view y and modification delta d.
Definition bool-trace-view.hpp:57
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::BoolView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition bool.hpp:89
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
forceinline
#define forceinline
Definition config.hpp:187