main page
modules
namespaces
classes
files
Gecode home
Generated on Sat May 25 2013 18:00:33 for Gecode by
doxygen
1.8.3.1
gecode
float
branch.hh
Go to the documentation of this file.
1
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
/*
3
* Main authors:
4
* Christian Schulte <schulte@gecode.org>
5
* Vincent Barichard <Vincent.Barichard@univ-angers.fr>
6
*
7
* Copyright:
8
* Christian Schulte, 2012
9
* Vincent Barichard, 2012
10
*
11
* Last modified:
12
* $Date: 2013-02-19 13:26:08 +0100 (Tue, 19 Feb 2013) $ by $Author: schulte $
13
* $Revision: 13313 $
14
*
15
* This file is part of Gecode, the generic constraint
16
* development environment:
17
* http://www.gecode.org
18
*
19
* Permission is hereby granted, free of charge, to any person obtaining
20
* a copy of this software and associated documentation files (the
21
* "Software"), to deal in the Software without restriction, including
22
* without limitation the rights to use, copy, modify, merge, publish,
23
* distribute, sublicense, and/or sell copies of the Software, and to
24
* permit persons to whom the Software is furnished to do so, subject to
25
* the following conditions:
26
*
27
* The above copyright notice and this permission notice shall be
28
* included in all copies or substantial portions of the Software.
29
*
30
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37
*
38
*/
39
40
#ifndef __GECODE_FLOAT_BRANCH_HH__
41
#define __GECODE_FLOAT_BRANCH_HH__
42
43
#include <
gecode/float.hh
>
44
50
namespace
Gecode {
namespace
Float {
namespace
Branch {
51
70
class
MeritMin
:
public
MeritBase
<FloatView,double> {
71
public
:
73
MeritMin
(
Space
& home,
const
VarBranch
& vb);
75
MeritMin
(
Space
& home,
bool
shared
,
MeritMin
& m);
77
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
78
};
79
86
class
MeritMax
:
public
MeritBase
<FloatView,double> {
87
public
:
89
MeritMax
(
Space
& home,
const
VarBranch
& vb);
91
MeritMax
(
Space
& home,
bool
shared
,
MeritMax
& m);
93
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
94
};
95
102
class
MeritSize
:
public
MeritBase
<FloatView,double> {
103
public
:
105
MeritSize
(
Space
& home,
const
VarBranch
& vb);
107
MeritSize
(
Space
& home,
bool
shared
,
MeritSize
& m);
109
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
110
};
111
118
class
MeritDegreeSize
:
public
MeritBase
<FloatView,double> {
119
public
:
121
MeritDegreeSize
(
Space
& home,
const
VarBranch
& vb);
123
MeritDegreeSize
(
Space
& home,
bool
shared
,
MeritDegreeSize
& m);
125
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
126
};
127
134
class
MeritAFCSize
:
public
MeritBase
<FloatView,double> {
135
protected
:
137
AFC
afc
;
138
public
:
140
MeritAFCSize
(
Space
& home,
const
VarBranch
& vb);
142
MeritAFCSize
(
Space
& home,
bool
shared
,
MeritAFCSize
& m);
144
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
146
bool
notice
(
void
)
const
;
148
void
dispose
(
Space
& home);
149
};
150
157
class
MeritActivitySize
:
public
MeritBase
<FloatView,double> {
158
protected
:
160
Activity
activity
;
161
public
:
163
MeritActivitySize
(
Space
& home,
const
VarBranch
& vb);
165
MeritActivitySize
(
Space
& home,
bool
shared
,
MeritActivitySize
& m);
167
double
operator ()
(
const
Space
& home,
FloatView
x
,
int
i
);
169
bool
notice
(
void
)
const
;
171
void
dispose
(
Space
& home);
172
};
173
174
}}}
175
176
#include <
gecode/float/branch/merit.hpp
>
177
178
namespace
Gecode {
namespace
Float {
namespace
Branch {
179
181
GECODE_FLOAT_EXPORT
182
ViewSel<FloatView>*
viewsel
(Space& home,
const
FloatVarBranch& fvb);
183
184
}}}
185
186
namespace
Gecode {
namespace
Float {
namespace
Branch {
187
206
class
ValSelMed
:
public
ValSel
<FloatView,FloatNum> {
207
public
:
209
ValSelMed
(
Space
& home,
const
ValBranch
& vb);
211
ValSelMed
(
Space
& home,
bool
shared
,
ValSelMed
& vs);
213
FloatNum
val
(
const
Space
& home,
FloatView
x
,
int
i
);
214
};
215
222
class
ValSelRnd
223
:
public
ValSel
<FloatView,std::pair<FloatNum,bool> > {
224
protected
:
226
Rnd
r
;
227
public
:
229
ValSelRnd
(
Space
& home,
const
ValBranch
& vb);
231
ValSelRnd
(
Space
& home,
bool
shared
,
ValSelRnd
& vs);
233
Val
val
(
const
Space
& home,
FloatView
x
,
int
i
);
235
bool
notice
(
void
)
const
;
237
void
dispose
(
Space
& home);
238
};
239
240
}}}
241
242
#include <
gecode/float/branch/val-sel.hpp
>
243
244
namespace
Gecode {
namespace
Float {
namespace
Branch {
245
264
class
ValCommitLq
:
public
ValCommit
<FloatView,FloatNum> {
265
public
:
267
ValCommitLq
(
Space
& home,
const
ValBranch
& vb);
269
ValCommitLq
(
Space
& home,
bool
shared
,
ValCommitLq
& vc);
271
ModEvent
commit
(
Space
& home,
unsigned
int
a
,
FloatView
x
,
int
i
,
272
FloatNum
n
);
273
};
274
281
class
ValCommitGq
:
public
ValCommit
<FloatView,FloatNum> {
282
public
:
284
ValCommitGq
(
Space
& home,
const
ValBranch
& vb);
286
ValCommitGq
(
Space
& home,
bool
shared
,
ValCommitGq
& vc);
288
ModEvent
commit
(
Space
& home,
unsigned
int
a
,
FloatView
x
,
int
i
,
289
FloatNum
n
);
290
};
291
298
class
ValCommitLqGq
299
:
public
ValCommit
<FloatView,std::pair<FloatNum,bool> > {
300
public
:
302
ValCommitLqGq
(
Space
& home,
const
ValBranch
& vb);
304
ValCommitLqGq
(
Space
& home,
bool
shared
,
ValCommitLqGq
& vc);
306
ModEvent
commit
(
Space
& home,
unsigned
int
a
,
FloatView
x
,
int
i
,
Val
n
);
307
};
308
309
}}}
310
311
#include <
gecode/float/branch/val-commit.hpp
>
312
313
namespace
Gecode {
namespace
Float {
namespace
Branch {
314
316
GECODE_FLOAT_EXPORT
317
ValSelCommitBase<FloatView,FloatNum>*
318
valselcommit
(Space& home,
const
FloatValBranch& svb);
319
321
GECODE_FLOAT_EXPORT
322
ValSelCommitBase<FloatView,FloatNum>*
323
valselcommit
(Space& home,
const
FloatAssign& ia);
324
325
}}}
326
327
#endif
328
329
// STATISTICS: float-branch