Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ if(BUILD_TESTING)
Int::Extensional::TupleSet::Sparse::IncrementalDelta
Int::Extensional::TupleSet::Auto::DefaultDispatch
Int::Linear::Bool::Int::Lq
Int::MinDistance
Int::MiniModel::LinExpr::Bool::352
NoGoods::Queens
Search::DFS::Sol::Binary::Nary::Binary::1::1::1)
Expand Down
129 changes: 129 additions & 0 deletions Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -35084,3 +35084,132 @@ test/flatzinc/on_restart_sol_set$(OBJSUFFIX) test/flatzinc/on_restart_sol_set$(S
./gecode/support/static-stack.hpp ./gecode/support/thread.hpp ./gecode/support/thread/thread.hpp \
./gecode/support/timer.hpp ./test/flatzinc.hh ./test/test.hh \
./test/test.hpp
gecode/int/min-distance$(OBJSUFFIX) gecode/int/min-distance$(SBJSUFFIX): \
./gecode/int.hh ./gecode/int/array-traits.hpp ./gecode/int/array.hpp \
./gecode/int/branch.hpp ./gecode/int/branch/action.hpp ./gecode/int/branch/afc.hpp \
./gecode/int/branch/assign.hpp ./gecode/int/branch/chb.hpp ./gecode/int/branch/traits.hpp \
./gecode/int/branch/val.hpp ./gecode/int/branch/var.hpp ./gecode/int/channel.hpp \
./gecode/int/div.hh ./gecode/int/div.hpp ./gecode/int/exception.hpp \
./gecode/int/extensional.hpp ./gecode/int/extensional/dfa.hpp ./gecode/int/extensional/tuple-set.hpp \
./gecode/int/int-set-1.hpp ./gecode/int/int-set-2.hpp ./gecode/int/ipl.hpp \
./gecode/int/irt.hpp ./gecode/int/limits.hpp ./gecode/int/min-distance.hpp \
./gecode/int/propagator.hpp ./gecode/int/reify.hpp ./gecode/int/trace.hpp \
./gecode/int/trace/bool-delta.hpp ./gecode/int/trace/bool-trace-view.hpp ./gecode/int/trace/int-delta.hpp \
./gecode/int/trace/int-trace-view.hpp ./gecode/int/trace/traits.hpp ./gecode/int/var-imp.hpp \
./gecode/int/var-imp/bool.hpp ./gecode/int/var-imp/delta.hpp ./gecode/int/var-imp/int.hpp \
./gecode/int/var/bool.hpp ./gecode/int/var/int.hpp ./gecode/int/var/print.hpp \
./gecode/int/view.hpp ./gecode/int/view/bool-test.hpp ./gecode/int/view/bool.hpp \
./gecode/int/view/cached.hpp ./gecode/int/view/constint.hpp ./gecode/int/view/int.hpp \
./gecode/int/view/iter.hpp ./gecode/int/view/minus.hpp ./gecode/int/view/neg-bool.hpp \
./gecode/int/view/offset.hpp ./gecode/int/view/print.hpp ./gecode/int/view/rel-test.hpp \
./gecode/int/view/scale.hpp ./gecode/int/view/zero.hpp ./gecode/iter.hh \
./gecode/iter/ranges-add.hpp ./gecode/iter/ranges-append.hpp ./gecode/iter/ranges-array.hpp \
./gecode/iter/ranges-cache.hpp ./gecode/iter/ranges-compl.hpp ./gecode/iter/ranges-diff.hpp \
./gecode/iter/ranges-empty.hpp ./gecode/iter/ranges-inter.hpp ./gecode/iter/ranges-list.hpp \
./gecode/iter/ranges-map.hpp ./gecode/iter/ranges-minmax.hpp ./gecode/iter/ranges-minus.hpp \
./gecode/iter/ranges-negative.hpp ./gecode/iter/ranges-offset.hpp ./gecode/iter/ranges-operations.hpp \
./gecode/iter/ranges-positive.hpp ./gecode/iter/ranges-rangelist.hpp ./gecode/iter/ranges-scale.hpp \
./gecode/iter/ranges-singleton-append.hpp ./gecode/iter/ranges-singleton.hpp ./gecode/iter/ranges-size.hpp \
./gecode/iter/ranges-union.hpp ./gecode/iter/ranges-values.hpp ./gecode/iter/values-array.hpp \
./gecode/iter/values-bitset.hpp ./gecode/iter/values-bitsetoffset.hpp ./gecode/iter/values-inter.hpp \
./gecode/iter/values-list.hpp ./gecode/iter/values-map.hpp ./gecode/iter/values-minus.hpp \
./gecode/iter/values-negative.hpp ./gecode/iter/values-offset.hpp ./gecode/iter/values-positive.hpp \
./gecode/iter/values-ranges.hpp ./gecode/iter/values-singleton.hpp ./gecode/iter/values-union.hpp \
./gecode/iter/values-unique.hpp ./gecode/kernel.hh ./gecode/kernel/archive.hpp \
./gecode/kernel/branch/action.hpp ./gecode/kernel/branch/afc.hpp ./gecode/kernel/branch/chb.hpp \
./gecode/kernel/branch/filter.hpp ./gecode/kernel/branch/merit.hpp ./gecode/kernel/branch/print.hpp \
./gecode/kernel/branch/tiebreak.hpp ./gecode/kernel/branch/traits.hpp ./gecode/kernel/branch/val-commit.hpp \
./gecode/kernel/branch/val-sel-commit.hpp ./gecode/kernel/branch/val-sel.hpp ./gecode/kernel/branch/val.hpp \
./gecode/kernel/branch/var.hpp ./gecode/kernel/branch/view-sel.hpp ./gecode/kernel/branch/view-val.hpp \
./gecode/kernel/branch/view.hpp ./gecode/kernel/core.hpp ./gecode/kernel/data/array.hpp \
./gecode/kernel/data/rnd.hpp ./gecode/kernel/data/shared-array.hpp ./gecode/kernel/data/shared-data.hpp \
./gecode/kernel/exception.hpp ./gecode/kernel/gpi.hpp ./gecode/kernel/macros.hpp \
./gecode/kernel/memory/allocators.hpp ./gecode/kernel/memory/config.hpp ./gecode/kernel/memory/manager.hpp \
./gecode/kernel/memory/region.hpp ./gecode/kernel/modevent.hpp ./gecode/kernel/propagator/advisor.hpp \
./gecode/kernel/propagator/pattern.hpp ./gecode/kernel/propagator/subscribed.hpp ./gecode/kernel/propagator/wait.hpp \
./gecode/kernel/range-list.hpp ./gecode/kernel/shared-object.hpp ./gecode/kernel/shared-space-data.hpp \
./gecode/kernel/trace/filter.hpp ./gecode/kernel/trace/general.hpp ./gecode/kernel/trace/print.hpp \
./gecode/kernel/trace/recorder.hpp ./gecode/kernel/trace/tracer.hpp ./gecode/kernel/trace/traits.hpp \
./gecode/kernel/var-imp.hpp ./gecode/kernel/var-type.hpp ./gecode/kernel/var.hpp \
./gecode/kernel/view.hpp ./gecode/search.hh ./gecode/search/bab.hpp \
./gecode/search/base.hpp ./gecode/search/build.hpp ./gecode/search/cutoff.hpp \
./gecode/search/dfs.hpp ./gecode/search/engine.hpp ./gecode/search/exception.hpp \
./gecode/search/lds.hpp ./gecode/search/options.hpp ./gecode/search/pbs.hpp \
./gecode/search/rbs.hpp ./gecode/search/sebs.hpp ./gecode/search/seq/dead.hh \
./gecode/search/statistics.hpp ./gecode/search/stop.hpp ./gecode/search/support.hh \
./gecode/search/trace-recorder.hpp ./gecode/search/tracer.hpp ./gecode/search/traits.hpp \
./gecode/support.hh ./gecode/support/allocator.hpp ./gecode/support/auto-link.hpp \
./gecode/support/bitset-base.hpp ./gecode/support/bitset-offset.hpp ./gecode/support/bitset.hpp \
./gecode/support/block-allocator.hpp ./gecode/support/cast.hpp gecode/support/config.hpp \
./gecode/support/dynamic-array.hpp ./gecode/support/dynamic-queue.hpp ./gecode/support/dynamic-stack.hpp \
./gecode/support/exception.hpp ./gecode/support/failpoint.hpp ./gecode/support/hash.hpp \
./gecode/support/heap.hpp ./gecode/support/hw-rnd.hpp ./gecode/support/int-type.hpp \
./gecode/support/macros.hpp ./gecode/support/marked-pointer.hpp ./gecode/support/random.hpp \
./gecode/support/ref-count.hpp ./gecode/support/run-jobs.hpp ./gecode/support/sort.hpp \
./gecode/support/static-stack.hpp ./gecode/support/thread.hpp ./gecode/support/thread/thread.hpp \
./gecode/support/timer.hpp
test/int/min-distance$(OBJSUFFIX) test/int/min-distance$(SBJSUFFIX): \
./gecode/int.hh ./gecode/int/array-traits.hpp ./gecode/int/array.hpp \
./gecode/int/branch.hpp ./gecode/int/branch/action.hpp ./gecode/int/branch/afc.hpp \
./gecode/int/branch/assign.hpp ./gecode/int/branch/chb.hpp ./gecode/int/branch/traits.hpp \
./gecode/int/branch/val.hpp ./gecode/int/branch/var.hpp ./gecode/int/channel.hpp \
./gecode/int/div.hh ./gecode/int/div.hpp ./gecode/int/exception.hpp \
./gecode/int/extensional.hpp ./gecode/int/extensional/dfa.hpp ./gecode/int/extensional/tuple-set.hpp \
./gecode/int/int-set-1.hpp ./gecode/int/int-set-2.hpp ./gecode/int/ipl.hpp \
./gecode/int/irt.hpp ./gecode/int/limits.hpp ./gecode/int/min-distance.hpp \
./gecode/int/propagator.hpp ./gecode/int/reify.hpp ./gecode/int/trace.hpp \
./gecode/int/trace/bool-delta.hpp ./gecode/int/trace/bool-trace-view.hpp ./gecode/int/trace/int-delta.hpp \
./gecode/int/trace/int-trace-view.hpp ./gecode/int/trace/traits.hpp ./gecode/int/var-imp.hpp \
./gecode/int/var-imp/bool.hpp ./gecode/int/var-imp/delta.hpp ./gecode/int/var-imp/int.hpp \
./gecode/int/var/bool.hpp ./gecode/int/var/int.hpp ./gecode/int/var/print.hpp \
./gecode/int/view.hpp ./gecode/int/view/bool-test.hpp ./gecode/int/view/bool.hpp \
./gecode/int/view/cached.hpp ./gecode/int/view/constint.hpp ./gecode/int/view/int.hpp \
./gecode/int/view/iter.hpp ./gecode/int/view/minus.hpp ./gecode/int/view/neg-bool.hpp \
./gecode/int/view/offset.hpp ./gecode/int/view/print.hpp ./gecode/int/view/rel-test.hpp \
./gecode/int/view/scale.hpp ./gecode/int/view/zero.hpp ./gecode/iter.hh \
./gecode/iter/ranges-add.hpp ./gecode/iter/ranges-append.hpp ./gecode/iter/ranges-array.hpp \
./gecode/iter/ranges-cache.hpp ./gecode/iter/ranges-compl.hpp ./gecode/iter/ranges-diff.hpp \
./gecode/iter/ranges-empty.hpp ./gecode/iter/ranges-inter.hpp ./gecode/iter/ranges-list.hpp \
./gecode/iter/ranges-map.hpp ./gecode/iter/ranges-minmax.hpp ./gecode/iter/ranges-minus.hpp \
./gecode/iter/ranges-negative.hpp ./gecode/iter/ranges-offset.hpp ./gecode/iter/ranges-operations.hpp \
./gecode/iter/ranges-positive.hpp ./gecode/iter/ranges-rangelist.hpp ./gecode/iter/ranges-scale.hpp \
./gecode/iter/ranges-singleton-append.hpp ./gecode/iter/ranges-singleton.hpp ./gecode/iter/ranges-size.hpp \
./gecode/iter/ranges-union.hpp ./gecode/iter/ranges-values.hpp ./gecode/iter/values-array.hpp \
./gecode/iter/values-bitset.hpp ./gecode/iter/values-bitsetoffset.hpp ./gecode/iter/values-inter.hpp \
./gecode/iter/values-list.hpp ./gecode/iter/values-map.hpp ./gecode/iter/values-minus.hpp \
./gecode/iter/values-negative.hpp ./gecode/iter/values-offset.hpp ./gecode/iter/values-positive.hpp \
./gecode/iter/values-ranges.hpp ./gecode/iter/values-singleton.hpp ./gecode/iter/values-union.hpp \
./gecode/iter/values-unique.hpp ./gecode/kernel.hh ./gecode/kernel/archive.hpp \
./gecode/kernel/branch/action.hpp ./gecode/kernel/branch/afc.hpp ./gecode/kernel/branch/chb.hpp \
./gecode/kernel/branch/filter.hpp ./gecode/kernel/branch/merit.hpp ./gecode/kernel/branch/print.hpp \
./gecode/kernel/branch/tiebreak.hpp ./gecode/kernel/branch/traits.hpp ./gecode/kernel/branch/val-commit.hpp \
./gecode/kernel/branch/val-sel-commit.hpp ./gecode/kernel/branch/val-sel.hpp ./gecode/kernel/branch/val.hpp \
./gecode/kernel/branch/var.hpp ./gecode/kernel/branch/view-sel.hpp ./gecode/kernel/branch/view-val.hpp \
./gecode/kernel/branch/view.hpp ./gecode/kernel/core.hpp ./gecode/kernel/data/array.hpp \
./gecode/kernel/data/rnd.hpp ./gecode/kernel/data/shared-array.hpp ./gecode/kernel/data/shared-data.hpp \
./gecode/kernel/exception.hpp ./gecode/kernel/gpi.hpp ./gecode/kernel/macros.hpp \
./gecode/kernel/memory/allocators.hpp ./gecode/kernel/memory/config.hpp ./gecode/kernel/memory/manager.hpp \
./gecode/kernel/memory/region.hpp ./gecode/kernel/modevent.hpp ./gecode/kernel/propagator/advisor.hpp \
./gecode/kernel/propagator/pattern.hpp ./gecode/kernel/propagator/subscribed.hpp ./gecode/kernel/propagator/wait.hpp \
./gecode/kernel/range-list.hpp ./gecode/kernel/shared-object.hpp ./gecode/kernel/shared-space-data.hpp \
./gecode/kernel/trace/filter.hpp ./gecode/kernel/trace/general.hpp ./gecode/kernel/trace/print.hpp \
./gecode/kernel/trace/recorder.hpp ./gecode/kernel/trace/tracer.hpp ./gecode/kernel/trace/traits.hpp \
./gecode/kernel/var-imp.hpp ./gecode/kernel/var-type.hpp ./gecode/kernel/var.hpp \
./gecode/kernel/view.hpp ./gecode/search.hh ./gecode/search/bab.hpp \
./gecode/search/base.hpp ./gecode/search/build.hpp ./gecode/search/cutoff.hpp \
./gecode/search/dfs.hpp ./gecode/search/engine.hpp ./gecode/search/exception.hpp \
./gecode/search/lds.hpp ./gecode/search/options.hpp ./gecode/search/pbs.hpp \
./gecode/search/rbs.hpp ./gecode/search/sebs.hpp ./gecode/search/seq/dead.hh \
./gecode/search/statistics.hpp ./gecode/search/stop.hpp ./gecode/search/support.hh \
./gecode/search/trace-recorder.hpp ./gecode/search/tracer.hpp ./gecode/search/traits.hpp \
./gecode/support.hh ./gecode/support/allocator.hpp ./gecode/support/auto-link.hpp \
./gecode/support/bitset-base.hpp ./gecode/support/bitset-offset.hpp ./gecode/support/bitset.hpp \
./gecode/support/block-allocator.hpp ./gecode/support/cast.hpp gecode/support/config.hpp \
./gecode/support/dynamic-array.hpp ./gecode/support/dynamic-queue.hpp ./gecode/support/dynamic-stack.hpp \
./gecode/support/exception.hpp ./gecode/support/failpoint.hpp ./gecode/support/hash.hpp \
./gecode/support/heap.hpp ./gecode/support/hw-rnd.hpp ./gecode/support/int-type.hpp \
./gecode/support/macros.hpp ./gecode/support/marked-pointer.hpp ./gecode/support/random.hpp \
./gecode/support/ref-count.hpp ./gecode/support/run-jobs.hpp ./gecode/support/sort.hpp \
./gecode/support/static-stack.hpp ./gecode/support/thread.hpp ./gecode/support/thread/thread.hpp \
./gecode/support/timer.hpp ./test/int.hh ./test/int.hpp \
./test/test.hh ./test/test.hpp
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ INTSRC0 = \
order.cpp order/propagate.cpp \
unary.cpp cumulative.cpp cumulatives.cpp \
circuit.cpp no-overlap.cpp nvalues.cpp \
member.cpp branch/action.cpp branch/chb.cpp \
member.cpp min-distance.cpp branch/action.cpp branch/chb.cpp \
arithmetic/mult.cpp \
branch/view-sel.cpp branch/val-sel-commit.cpp \
branch/view-values.cpp \
Expand Down Expand Up @@ -397,7 +397,7 @@ INTHDR0 = \
view/offset.hpp view/rel-test.hpp view/scale.hpp view/iter.hpp \
arithmetic.hh array.hpp array-traits.hpp bool.hh branch.hh \
distinct.hh dom.hh \
element.hh exception.hpp gcc.hh linear.hh \
element.hh min-distance.hpp exception.hpp gcc.hh linear.hh \
reify.hpp propagator.hpp extensional.hh rel.hh \
sorted.hh var-imp.hpp view.hpp ipl.hpp irt.hpp \
channel.hh channel.hpp channel/dom.hpp channel/val.hpp \
Expand Down Expand Up @@ -1118,7 +1118,7 @@ INTTESTSRC00 = \
rel linear gcc sorted unshare exec sequence \
mm-arithmetic mm-bool mm-lin mm-count mm-rel \
bin-packing order unary cumulative cumulatives circuit \
no-overlap precede nvalues member
no-overlap precede nvalues member min-distance
INTTESTSRC0 = test/int.cpp $(INTTESTSRC00:%=test/int/%.cpp)
INTTESTOBJ = $(INTTESTSRC0:%.cpp=%$(OBJSUFFIX))

Expand Down
13 changes: 13 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ Date: unreleased
[DESCRIPTION]
This is the development changelog for the next Gecode release.

[ENTRY]
Module: int
What: new
Rank: major
[DESCRIPTION]
Add exact minimum-distance constraints over indexed sites, with decomposed
and single-propagator forward-bound propagation, optional conflict-matching
upper bounds, and inclusive requirements for selected-position pairs.
Distances can use a shared matrix or a shared callable evaluated on demand.
The propagation algorithms follow:
M. Z. Lagerkvist, Propagation Algorithms for the Minimum-Distance Constraint
over Selected Points, ModRef 2026.

[RELEASE]
Version: 6.4.0
Date: 2026-07-15
Expand Down
2 changes: 2 additions & 0 deletions cmake/GecodeSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ set(GECODE_INT_SOURCES
gecode/int/linear/bool-post.cpp
gecode/int/linear/int-post.cpp
gecode/int/member.cpp
gecode/int/min-distance.cpp
gecode/int/no-overlap.cpp
gecode/int/nvalues.cpp
gecode/int/order.cpp
Expand Down Expand Up @@ -394,6 +395,7 @@ set(GECODE_TEST_SOURCES
test/int/gcc.cpp
test/int/linear.cpp
test/int/member.cpp
test/int/min-distance.cpp
test/int/mm-arithmetic.cpp
test/int/mm-bool.cpp
test/int/mm-count.cpp
Expand Down
116 changes: 116 additions & 0 deletions gecode/int.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2871,6 +2871,122 @@ namespace Gecode {

#include <gecode/int/extensional.hpp>

namespace Gecode {


/**
* \defgroup TaskModelIntMinDistance Minimum distance constraints
* \ingroup TaskModelInt
*/
//@{
/** \brief Shared distances between indexed sites
*
* Distances are nonnegative, symmetric, and zero on the diagonal.
* No triangle inequality is required. Site indices range from zero to
* size()-1. Matrix entries or a callable are shared across propagators,
* clones, and search threads.
*/
class IntDistance : public SharedHandle {
protected:
/// Shared matrix or callable
class Data : public SharedHandle::Object {
public:
const int n; ///< Number of sites
const IntSharedArray matrix; ///< Row-major matrix, empty for a callable
const std::function<int(int,int)> function; ///< Computed distance
Data(int n, const IntArgs& matrix);
Data(int n, std::function<int(int,int)> function);
virtual ~Data(void);
};
public:
/** \brief Copy and validate an \a n by \a n row-major distance matrix
*
* Throws Int::OutOfLimits for invalid sizes or distances,
* Int::ArgumentSizeMismatch for a wrong number of entries, and
* Int::IllegalOperation for asymmetry or a nonzero diagonal.
*/
GECODE_INT_EXPORT IntDistance(int n, const IntArgs& matrix);
/** \brief Compute distances on demand for \a n sites
*
* The callable must return a stable, symmetric, nonnegative distance
* within Int::Limits, and zero for equal indices. It must own or share
* its captured data, be safe for concurrent calls, and not depend on a
* Space. Construction does not evaluate it or materialize a matrix.
* Results are checked for range and a zero diagonal when evaluated;
* symmetry is the caller's responsibility.
* Throws Int::OutOfLimits for an invalid site count and InvalidFunction
* for an empty callable.
*/
GECODE_INT_EXPORT IntDistance(int n, std::function<int(int,int)> function);
/// Number of sites
int size(void) const;
/// Distance between valid indices \a a and \a b
int operator ()(int a, int b) const;
};

/// Organization of forward-bound minimum-distance propagation
enum class MinDistancePropKind {
MDP_DECOMPOSED, ///< One propagator per selected-position pair
MDP_SINGLE ///< One propagator with advisors and cached pair maxima
};
/// One propagator per selected-position pair
static constexpr MinDistancePropKind MDP_DECOMPOSED =
MinDistancePropKind::MDP_DECOMPOSED;
/// One propagator with advisors and cached pair maxima
static constexpr MinDistancePropKind MDP_SINGLE =
MinDistancePropKind::MDP_SINGLE;

/** \brief Post \f$z=\min_{i<j}d(x_i,x_j)\f$
*
* The default organization is MDP_SINGLE.
* Uses forward pruning from assigned endpoints and pairwise upper bounds
* on \a z. Both organizations implement the same filtering. MDP_DECOMPOSED
* retains separate actors and failure counts; MDP_SINGLE retains one
* actor, linear advisor state, and a quadratic array of pair witnesses.
* This is incomplete propagation, not full bounds or domain consistency.
*
* The forward-bound and conflict-matching algorithms follow
* M. Z. Lagerkvist, Propagation Algorithms for the Minimum-Distance
* Constraint over Selected Points, ModRef 2026.
*
* A separate greedy conflict-matching upper bound is enabled by default.
* IPL_BASIC disables it; IPL_ADVANCED and IPL_BASIC_ADVANCED enable it
* together with forward propagation. The matching certificate is weakly
* monotonic and may miss pruning. It uses integer thresholds and O(d.size())
* temporary storage, without constructing a graph or distance-level array.
*
* Domains in \a x are restricted to valid site indices; repeated sites
* and repeated variables are permitted. Post distinctness separately when
* needed. Throws Int::TooFewArguments if fewer than two positions are
* given, and Int::IllegalOperation for an unknown organization.
*/
GECODE_INT_EXPORT void
minimum_distance(Home home, const IntVarArgs& x, IntVar z,
const IntDistance& d, IntPropLevel ipl=IPL_DEF,
MinDistancePropKind kind=MDP_SINGLE);
/** \brief Post the minimum-distance relation with pair requirements
*
* In addition, requires \f$d(x_i,x_j)\geq r_{ij}\f$. The \a r matrix is
* row-major, symmetric, nonnegative, zero on its diagonal, and has
* x.size() squared entries. Requirements are inclusive. Positions are
* labelled: ordering them is only a valid symmetry break if requirements
* are invariant under the corresponding permutations.
*
* Has the same propagation and argument requirements as the other
* overload. Throws Int::ArgumentSizeMismatch for a wrong matrix size,
* Int::OutOfLimits for invalid requirements, and Int::IllegalOperation
* for asymmetry or a nonzero diagonal.
*/
GECODE_INT_EXPORT void
minimum_distance(Home home, const IntVarArgs& x, IntVar z,
const IntDistance& d, const IntArgs& r,
IntPropLevel ipl=IPL_DEF, MinDistancePropKind kind=MDP_SINGLE);
//@}

}

#include <gecode/int/min-distance.hpp>

namespace Gecode {

/**
Expand Down
Loading
Loading