29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 38 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
39 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
40 __StructuralConstraintSetStatic() {}
43 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
44 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
45 __StructuralConstraintSetStatic(
46 const __StructuralConstraintSetStatic< CONSTRAINT1,
47 OTHER_CONSTRAINTS... >& from) :
49 __StructuralConstraintSetStatic< OTHER_CONSTRAINTS... >(from) {}
52 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
53 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
54 ~__StructuralConstraintSetStatic() {}
57 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
58 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
59 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
61 const __StructuralConstraintSetStatic< CONSTRAINT1,
62 OTHER_CONSTRAINTS... >& from) {
64 next_constraints::operator=(from);
65 first_constraint::operator=(from);
72 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
74 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
75 setGraph(
const DiGraph& graph) {
76 next_constraints::setGraph(graph);
77 first_constraint::setGraphAlone(graph);
81 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
83 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
84 modifyGraph(
const ArcAddition& change) {
85 next_constraints::modifyGraph(change);
86 first_constraint::modifyGraphAlone(change);
90 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
92 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
93 modifyGraph(
const ArcDeletion& change) {
94 next_constraints::modifyGraph(change);
95 first_constraint::modifyGraphAlone(change);
99 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
101 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
102 modifyGraph(
const ArcReversal& change) {
103 next_constraints::modifyGraph(change);
104 first_constraint::modifyGraphAlone(change);
108 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
110 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
111 modifyGraph(
const GraphChange& change) {
112 next_constraints::modifyGraph(change);
113 first_constraint::modifyGraphAlone(change);
117 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
119 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
120 isAlwaysInvalid(
const GraphChange& change)
const {
121 return next_constraints::isAlwaysInvalid(change)
122 || first_constraint::isAlwaysInvalidAlone(change);
126 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
128 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
130 return next_constraints::checkArcAddition(x, y)
131 && first_constraint::checkArcAdditionAlone(x, y);
135 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
137 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
139 return next_constraints::checkArcDeletion(x, y)
140 && first_constraint::checkArcDeletionAlone(x, y);
144 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
146 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
148 return next_constraints::checkArcReversal(x, y)
149 && first_constraint::checkArcReversalAlone(x, y);
153 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
155 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
156 checkModification(
const ArcAddition& change)
const {
157 return next_constraints::checkModification(change)
158 && first_constraint::checkModificationAlone(change);
162 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
164 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
165 checkModification(
const ArcDeletion& change)
const {
166 return next_constraints::checkModification(change)
167 && first_constraint::checkModificationAlone(change);
171 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
173 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
174 checkModification(
const ArcReversal& change)
const {
175 return next_constraints::checkModification(change)
176 && first_constraint::checkModificationAlone(change);
180 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
182 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
183 checkModification(
const GraphChange& change)
const {
184 return next_constraints::checkModification(change)
185 && first_constraint::checkModificationAlone(change);
191 template <
typename CONSTRAINT >
192 INLINE __StructuralConstraintSetStatic<
193 CONSTRAINT >::__StructuralConstraintSetStatic() {}
196 template <
typename CONSTRAINT >
197 INLINE __StructuralConstraintSetStatic< CONSTRAINT >::
198 __StructuralConstraintSetStatic(
199 const __StructuralConstraintSetStatic< CONSTRAINT >& from) :
203 template <
typename CONSTRAINT >
204 INLINE __StructuralConstraintSetStatic<
205 CONSTRAINT >::~__StructuralConstraintSetStatic() {}
208 template <
typename CONSTRAINT >
209 INLINE __StructuralConstraintSetStatic< CONSTRAINT >&
210 __StructuralConstraintSetStatic< CONSTRAINT >::
211 operator=(
const __StructuralConstraintSetStatic< CONSTRAINT >& from) {
212 if (
this != &from) { CONSTRAINT::operator=(from); }
218 template <
typename CONSTRAINT >
219 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
220 const DiGraph& graph) {
221 first_constraint::setGraphAlone(graph);
225 template <
typename CONSTRAINT >
226 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
227 const ArcAddition& change) {
228 first_constraint::modifyGraphAlone(change);
232 template <
typename CONSTRAINT >
233 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
234 const ArcDeletion& change) {
235 first_constraint::modifyGraphAlone(change);
239 template <
typename CONSTRAINT >
240 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
241 const ArcReversal& change) {
242 first_constraint::modifyGraphAlone(change);
246 template <
typename CONSTRAINT >
247 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
248 const GraphChange& change) {
249 first_constraint::modifyGraphAlone(change);
253 template <
typename CONSTRAINT >
254 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::isAlwaysInvalid(
255 const GraphChange& change)
const {
256 return first_constraint::isAlwaysInvalidAlone(change);
260 template <
typename CONSTRAINT >
261 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(
263 return first_constraint::checkArcAdditionAlone(x, y);
267 template <
typename CONSTRAINT >
268 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(
270 return first_constraint::checkArcDeletionAlone(x, y);
274 template <
typename CONSTRAINT >
275 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(
277 return first_constraint::checkArcReversalAlone(x, y);
281 template <
typename CONSTRAINT >
282 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
283 const ArcAddition& change)
const {
284 return first_constraint::checkModificationAlone(change);
288 template <
typename CONSTRAINT >
289 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
290 const ArcDeletion& change)
const {
291 return first_constraint::checkModificationAlone(change);
295 template <
typename CONSTRAINT >
296 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
297 const ArcReversal& change)
const {
298 return first_constraint::checkModificationAlone(change);
302 template <
typename CONSTRAINT >
303 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
304 const GraphChange& change)
const {
305 return first_constraint::checkModificationAlone(change);
311 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
312 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
313 StructuralConstraintSetStatic() {
314 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
318 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
319 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
320 StructuralConstraintSetStatic(
321 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
324 GUM_CONS_CPY(StructuralConstraintSetStatic);
328 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
329 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
330 ~StructuralConstraintSetStatic() {
331 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
335 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
336 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
337 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
339 const StructuralConstraintSetStatic< CONSTRAINT1,
340 OTHER_CONSTRAINTS... >& from) {
341 if (
this != &from) { constraints::operator=(from); }
347 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
349 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
350 setGraph(
const DiGraph& graph) {
351 constraints::setGraph(graph);
355 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
357 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
359 return constraints::checkArcAddition(x, y);
363 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
365 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
367 return constraints::checkArcDeletion(x, y);
371 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
373 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
375 return constraints::checkArcReversal(x, y);
379 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
381 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
382 checkModification(
const ArcAddition& change)
const {
383 return constraints::checkModification(change);
387 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
389 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
390 checkModification(
const ArcDeletion& change)
const {
391 return constraints::checkModification(change);
395 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
397 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
398 checkModification(
const ArcReversal& change)
const {
399 return constraints::checkModification(change);
403 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
405 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
406 checkModification(
const GraphChange& change)
const {
407 return constraints::checkModification(change);
411 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
413 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
414 modifyGraph(
const ArcAddition& change) {
415 if (checkModification(change)) {
416 constraints::modifyGraph(change);
419 "the constraint set does not allow this arc addition between " 420 << change.node1() <<
" and " << change.node2());
425 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
427 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
428 modifyGraph(
const ArcDeletion& change) {
429 if (checkModification(change)) {
430 constraints::modifyGraph(change);
433 "the constraint set does not allow this arc deletion between " 434 << change.node1() <<
" and " << change.node2());
439 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
441 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
442 modifyGraph(
const ArcReversal& change) {
443 if (checkModification(change)) {
444 constraints::modifyGraph(change);
447 "the constraint set does not allow this arc reversal between " 448 << change.node1() <<
" and " << change.node2());
453 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
455 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
456 modifyGraph(
const GraphChange& change) {
457 switch (change.type()) {
459 modifyGraph(reinterpret_cast< const ArcAddition& >(change));
463 modifyGraph(reinterpret_cast< const ArcDeletion& >(change));
467 modifyGraph(reinterpret_cast< const ArcReversal& >(change));
472 "edge modifications are not " 473 "currently supported by constraint sets");
478 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
480 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
481 isAlwaysInvalid(
const GraphChange& change)
const {
482 return constraints::isAlwaysInvalid(change);
488 template <
typename CONSTRAINT >
489 INLINE StructuralConstraintSetStatic<
490 CONSTRAINT >::StructuralConstraintSetStatic() {
491 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
495 template <
typename CONSTRAINT >
497 StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic(
498 const StructuralConstraintSetStatic< CONSTRAINT >& from) :
500 GUM_CONS_CPY(StructuralConstraintSetStatic);
504 template <
typename CONSTRAINT >
505 INLINE StructuralConstraintSetStatic<
506 CONSTRAINT >::~StructuralConstraintSetStatic() {
507 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
511 template <
typename CONSTRAINT >
512 INLINE StructuralConstraintSetStatic< CONSTRAINT >&
513 StructuralConstraintSetStatic< CONSTRAINT >::
514 operator=(
const StructuralConstraintSetStatic< CONSTRAINT >& from) {
515 if (
this != &from) { constraints::operator=(from); }
521 template <
typename CONSTRAINT >
522 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
523 const DiGraph& graph) {
524 constraints::setGraph(graph);
528 template <
typename CONSTRAINT >
529 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(
531 return constraints::checkArcAddition(x, y);
535 template <
typename CONSTRAINT >
536 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(
538 return constraints::checkArcDeletion(x, y);
542 template <
typename CONSTRAINT >
543 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(
545 return constraints::checkArcReversal(x, y);
549 template <
typename CONSTRAINT >
550 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
551 const ArcAddition& change)
const {
552 return constraints::checkModification(change);
556 template <
typename CONSTRAINT >
557 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
558 const ArcDeletion& change)
const {
559 return constraints::checkModification(change);
563 template <
typename CONSTRAINT >
564 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
565 const ArcReversal& change)
const {
566 return constraints::checkModification(change);
570 template <
typename CONSTRAINT >
571 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
572 const GraphChange& change)
const {
573 return constraints::checkModification(change);
577 template <
typename CONSTRAINT >
578 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
579 const ArcAddition& change) {
580 if (checkModification(change)) {
581 constraints::modifyGraph(change);
584 "the constraint set does not allow this arc addition between " 585 << change.node1() <<
" and " << change.node2());
590 template <
typename CONSTRAINT >
591 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
592 const ArcDeletion& change) {
593 if (checkModification(change)) {
594 constraints::modifyGraph(change);
597 "the constraint set does not allow this arc deletion between " 598 << change.node1() <<
" and " << change.node2());
603 template <
typename CONSTRAINT >
604 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
605 const ArcReversal& change) {
606 if (checkModification(change)) {
607 constraints::modifyGraph(change);
610 "the constraint set does not allow this arc reversal between " 611 << change.node1() <<
" and " << change.node2());
616 template <
typename CONSTRAINT >
617 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
618 const GraphChange& change) {
619 switch (change.type()) {
621 modifyGraph(reinterpret_cast< const ArcAddition& >(change));
625 modifyGraph(reinterpret_cast< const ArcDeletion& >(change));
629 modifyGraph(reinterpret_cast< const ArcReversal& >(change));
634 "edge modifications are not " 635 "currently supported by constraint sets");
640 template <
typename CONSTRAINT >
641 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::isAlwaysInvalid(
642 const GraphChange& change)
const {
643 return constraints::isAlwaysInvalid(change);
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)