MCPcopy Create free account
hub / github.com/Gecode/gecode / MinusView

Class MinusView

gecode/float/view.hpp:154–237  ·  view source on GitHub ↗

* \brief Minus float view * * A minus float view \f$m\f$ for an float view \f$x\f$ provides * operations such that \f$m\f$ behaves as \f$-x\f$. * \ingroup TaskActorFloatView */

Source from the content-addressed store, hash-verified

152 * \ingroup TaskActorFloatView
153 */
154 class MinusView : public DerivedView<FloatView> {
155 protected:
156 using DerivedView<FloatView>::x;
157 public:
158 /// \name Constructors and initialization
159 //@{
160 /// Default constructor
161 MinusView(void);
162 /// Initialize with float view \a y
163 explicit MinusView(const FloatView& y);
164 //@}
165
166 /// \name Value access
167 //@{
168 /// Return domain
169 FloatVal domain(void) const;
170 /// Return minimum of domain
171 FloatNum min(void) const;
172 /// Return maximum of domain
173 FloatNum max(void) const;
174 /// Return median of domain (closest representation)
175 FloatNum med(void) const;
176 /**
177 * \brief Return assigned value
178 *
179 * Throws an exception of type Float::ValOfUnassignedVar if variable
180 * is not yet assigned.
181 *
182 */
183 FloatVal val(void) const;
184
185 /// Return size of domain (distance between maximum and minimum)
186 FloatNum size(void) const;
187 //@}
188
189 /// \name Domain tests
190 //@{
191 /// Test whether 0 is contained in domain
192 bool zero_in(void) const;
193 /// Test whether \a n is contained in domain
194 bool in(FloatNum n) const;
195 /// Test whether \a n is contained in domain
196 bool in(const FloatVal& n) const;
197 //@}
198
199 /// \name Domain update by value
200 //@{
201 /// Restrict domain values to be less or equal than \a n
202 ModEvent lq(Space& home, int n);
203 /// Restrict domain values to be less or equal than \a n
204 ModEvent lq(Space& home, FloatNum n);
205 /// Restrict domain values to be less or equal than \a n
206 ModEvent lq(Space& home, FloatVal n);
207
208 /// Restrict domain values to be greater or equal than \a n
209 ModEvent gq(Space& home, int n);
210 /// Restrict domain values to be greater or equal than \a n
211 ModEvent gq(Space& home, FloatNum n);

Callers 5

minFunction · 0.70
propagateMethod · 0.50
postMethod · 0.50
postMethod · 0.50
propagateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected