51#ifndef DOXYGEN_SHOULD_SKIP_THIS
60 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
61 _StructuralConstraintSetStatic_< CONSTRAINT1,
62 OTHER_CONSTRAINTS... >::_StructuralConstraintSetStatic_()
66 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
67 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::
68 _StructuralConstraintSetStatic_(
69 const _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) :
70 CONSTRAINT1(from), _StructuralConstraintSetStatic_< OTHER_CONSTRAINTS... >(from) {}
73 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
74 _StructuralConstraintSetStatic_< CONSTRAINT1,
75 OTHER_CONSTRAINTS... >::~_StructuralConstraintSetStatic_()
79 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
80 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >&
81 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::operator=(
82 const _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) {
84 next_constraints::operator=(from);
85 first_constraint::operator=(from);
92 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
93 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::setGraph(
94 const DiGraph& graph) {
95 next_constraints::setGraph(graph);
96 first_constraint::setGraphAlone(graph);
100 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
101 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
102 const ArcAddition& change) {
103 next_constraints::modifyGraph(change);
104 first_constraint::modifyGraphAlone(change);
108 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
109 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
110 const ArcDeletion& change) {
111 next_constraints::modifyGraph(change);
112 first_constraint::modifyGraphAlone(change);
116 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
117 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
118 const ArcReversal& change) {
119 next_constraints::modifyGraph(change);
120 first_constraint::modifyGraphAlone(change);
124 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
125 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
126 const ArcTriangleDeletion1& change) {
127 next_constraints::modifyGraph(change);
128 first_constraint::modifyGraphAlone(change);
132 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
133 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
134 const ArcTriangleDeletion2& change) {
135 next_constraints::modifyGraph(change);
136 first_constraint::modifyGraphAlone(change);
140 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
141 void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
142 const GraphChange& change) {
143 next_constraints::modifyGraph(change);
144 first_constraint::modifyGraphAlone(change);
148 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
149 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::isAlwaysInvalid(
150 const GraphChange& change)
const {
151 return next_constraints::isAlwaysInvalid(change)
152 || first_constraint::isAlwaysInvalidAlone(change);
156 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
157 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcAddition(
160 return next_constraints::checkArcAddition(x, y)
161 && first_constraint::checkArcAdditionAlone(x, y);
165 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
166 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcDeletion(
169 return next_constraints::checkArcDeletion(x, y)
170 && first_constraint::checkArcDeletionAlone(x, y);
174 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
175 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcReversal(
178 return next_constraints::checkArcReversal(x, y)
179 && first_constraint::checkArcReversalAlone(x, y);
183 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
184 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::
185 checkArcTriangleDeletion1(NodeId node1, NodeId node2, NodeId node3)
const {
186 return next_constraints::checkArcTriangleDeletion1(node1, node2, node3)
187 && first_constraint::checkArcTriangleDeletion1Alone(node1, node2, node3);
191 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
192 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::
193 checkArcTriangleDeletion2(NodeId node1, NodeId node2, NodeId node3)
const {
194 return next_constraints::checkArcTriangleDeletion2(node1, node2, node3)
195 && first_constraint::checkArcTriangleDeletion2Alone(node1, node2, node3);
199 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
200 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
201 const ArcAddition& change)
const {
202 return next_constraints::checkModification(change)
203 && first_constraint::checkModificationAlone(change);
207 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
208 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
209 const ArcDeletion& change)
const {
210 return next_constraints::checkModification(change)
211 && first_constraint::checkModificationAlone(change);
215 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
216 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
217 const ArcReversal& change)
const {
218 return next_constraints::checkModification(change)
219 && first_constraint::checkModificationAlone(change);
223 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
224 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
225 const ArcTriangleDeletion1& change)
const {
226 return next_constraints::checkModification(change)
227 && first_constraint::checkModificationAlone(change);
231 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
232 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
233 const ArcTriangleDeletion2& change)
const {
234 return next_constraints::checkModification(change)
235 && first_constraint::checkModificationAlone(change);
239 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
240 bool _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
241 const GraphChange& change)
const {
242 return next_constraints::checkModification(change)
243 && first_constraint::checkModificationAlone(change);
249 template <
typename CONSTRAINT >
250 _StructuralConstraintSetStatic_< CONSTRAINT >::_StructuralConstraintSetStatic_() =
default;
253 template <
typename CONSTRAINT >
254 _StructuralConstraintSetStatic_< CONSTRAINT >::_StructuralConstraintSetStatic_(
255 const _StructuralConstraintSetStatic_< CONSTRAINT >& from) : CONSTRAINT(from) {}
258 template <
typename CONSTRAINT >
259 _StructuralConstraintSetStatic_< CONSTRAINT >::~_StructuralConstraintSetStatic_() =
default;
262 template <
typename CONSTRAINT >
263 _StructuralConstraintSetStatic_< CONSTRAINT >&
264 _StructuralConstraintSetStatic_< CONSTRAINT >::operator=(
265 const _StructuralConstraintSetStatic_< CONSTRAINT >& from) {
266 if (
this != &from) { CONSTRAINT::operator=(from); }
272 template <
typename CONSTRAINT >
273 void _StructuralConstraintSetStatic_< CONSTRAINT >::setGraph(
const DiGraph& graph) {
274 first_constraint::setGraphAlone(graph);
278 template <
typename CONSTRAINT >
279 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcAddition& change) {
280 first_constraint::modifyGraphAlone(change);
284 template <
typename CONSTRAINT >
285 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcDeletion& change) {
286 first_constraint::modifyGraphAlone(change);
290 template <
typename CONSTRAINT >
291 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcReversal& change) {
292 first_constraint::modifyGraphAlone(change);
296 template <
typename CONSTRAINT >
297 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
298 const ArcTriangleDeletion1& change) {
299 first_constraint::modifyGraphAlone(change);
303 template <
typename CONSTRAINT >
304 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
305 const ArcTriangleDeletion2& change) {
306 first_constraint::modifyGraphAlone(change);
310 template <
typename CONSTRAINT >
311 void _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const GraphChange& change) {
312 first_constraint::modifyGraphAlone(change);
316 template <
typename CONSTRAINT >
317 bool _StructuralConstraintSetStatic_< CONSTRAINT >::isAlwaysInvalid(
318 const GraphChange& change)
const {
319 return first_constraint::isAlwaysInvalidAlone(change);
323 template <
typename CONSTRAINT >
324 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcAddition(NodeId x, NodeId y)
const {
325 return first_constraint::checkArcAdditionAlone(x, y);
329 template <
typename CONSTRAINT >
330 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcDeletion(NodeId x, NodeId y)
const {
331 return first_constraint::checkArcDeletionAlone(x, y);
335 template <
typename CONSTRAINT >
336 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcReversal(NodeId x, NodeId y)
const {
337 return first_constraint::checkArcReversalAlone(x, y);
341 template <
typename CONSTRAINT >
342 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcTriangleDeletion1(
345 NodeId node3)
const {
346 return first_constraint::checkArcTriangleDeletion1Alone(node1, node2, node3);
350 template <
typename CONSTRAINT >
351 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcTriangleDeletion2(
354 NodeId node3)
const {
355 return first_constraint::checkArcTriangleDeletion2Alone(node1, node2, node3);
359 template <
typename CONSTRAINT >
360 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
361 const ArcAddition& change)
const {
362 return first_constraint::checkModificationAlone(change);
366 template <
typename CONSTRAINT >
367 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
368 const ArcDeletion& change)
const {
369 return first_constraint::checkModificationAlone(change);
373 template <
typename CONSTRAINT >
374 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
375 const ArcReversal& change)
const {
376 return first_constraint::checkModificationAlone(change);
380 template <
typename CONSTRAINT >
381 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
382 const ArcTriangleDeletion1& change)
const {
383 return first_constraint::checkModificationAlone(change);
387 template <
typename CONSTRAINT >
388 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
389 const ArcTriangleDeletion2& change)
const {
390 return first_constraint::checkModificationAlone(change);
394 template <
typename CONSTRAINT >
395 bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
396 const GraphChange& change)
const {
397 return first_constraint::checkModificationAlone(change);
403 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
404 StructuralConstraintSetStatic< CONSTRAINT1,
405 OTHER_CONSTRAINTS... >::StructuralConstraintSetStatic() {
406 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
410 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
411 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
412 StructuralConstraintSetStatic(
413 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) :
415 GUM_CONS_CPY(StructuralConstraintSetStatic);
419 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
420 StructuralConstraintSetStatic< CONSTRAINT1,
421 OTHER_CONSTRAINTS... >::~StructuralConstraintSetStatic() {
422 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
426 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
427 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
428 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::operator=(
429 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) {
430 if (
this != &from) { constraints::operator=(from); }
436 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
437 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::setGraph(
438 const DiGraph& graph) {
439 constraints::setGraph(graph);
443 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
444 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcAddition(
447 return constraints::checkArcAddition(x, y);
451 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
452 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcDeletion(
455 return constraints::checkArcDeletion(x, y);
459 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
460 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcReversal(
463 return constraints::checkArcReversal(x, y);
467 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
468 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
469 checkArcTriangleDeletion1(NodeId node1, NodeId node2, NodeId node3)
const {
470 return constraints::checkArcTriangleDeletion1(node1, node2, node3);
474 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
475 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
476 checkArcTriangleDeletion2(NodeId node1, NodeId node2, NodeId node3)
const {
477 return constraints::checkArcTriangleDeletion2(node1, node2, node3);
481 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
482 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
483 const ArcAddition& change)
const {
484 return constraints::checkModification(change);
488 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
489 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
490 const ArcDeletion& change)
const {
491 return constraints::checkModification(change);
495 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
496 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
497 const ArcReversal& change)
const {
498 return constraints::checkModification(change);
502 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
503 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
504 const ArcTriangleDeletion1& change)
const {
505 return constraints::checkModification(change);
509 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
510 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
511 const ArcTriangleDeletion2& change)
const {
512 return constraints::checkModification(change);
516 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
517 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
518 const GraphChange& change)
const {
519 return constraints::checkModification(change);
523 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
524 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
525 const ArcAddition& change) {
526 if (checkModification(change)) {
527 constraints::modifyGraph(change);
530 "the constraint set does not allow an arc addition between "
531 << change.node1() <<
" and " << change.node2());
536 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
537 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
538 const ArcDeletion& change) {
539 if (checkModification(change)) {
540 constraints::modifyGraph(change);
543 "the constraint set does not allow an arc deletion between "
544 << change.node1() <<
" and " << change.node2());
549 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
550 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
551 const ArcReversal& change) {
552 if (checkModification(change)) {
553 constraints::modifyGraph(change);
556 "the constraint set does not allow an arc reversal between "
557 << change.node1() <<
" and " << change.node2());
562 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
563 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
564 const ArcTriangleDeletion1& change) {
565 if (checkModification(change)) {
566 constraints::modifyGraph(change);
569 "the constraint set does not allow the deletion of arc triangle1 "
570 << change.node1() <<
" -> " << change.node2() <<
" -> " << change.node3());
575 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
576 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
577 const ArcTriangleDeletion2& change) {
578 if (checkModification(change)) {
579 constraints::modifyGraph(change);
582 "the constraint set does not allow the deletion of arc triangle2 "
583 << change.node1() <<
" -> " << change.node2() <<
" -> " << change.node3());
588 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
589 void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
590 const GraphChange& change) {
591 switch (change.type()) {
592 case GraphChangeType::ARC_ADDITION :
593 modifyGraph(
reinterpret_cast< const ArcAddition&
>(change));
596 case GraphChangeType::ARC_DELETION :
597 modifyGraph(
reinterpret_cast< const ArcDeletion&
>(change));
600 case GraphChangeType::ARC_REVERSAL :
601 modifyGraph(
reinterpret_cast< const ArcReversal&
>(change));
604 case GraphChangeType::ARC_TRIANGLE_DELETION1 :
605 modifyGraph(
reinterpret_cast< const ArcTriangleDeletion1&
>(change));
608 case GraphChangeType::ARC_TRIANGLE_DELETION2 :
609 modifyGraph(
reinterpret_cast< const ArcTriangleDeletion2&
>(change));
614 "Graph change operation " << change.typeAsString()
615 <<
" is not currently supported by constraint sets");
620 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
621 bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::isAlwaysInvalid(
622 const GraphChange& change)
const {
623 return constraints::isAlwaysInvalid(change);
629 template <
typename CONSTRAINT >
630 StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic() {
631 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
635 template <
typename CONSTRAINT >
636 StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic(
637 const StructuralConstraintSetStatic< CONSTRAINT >& from) : constraints(from) {
638 GUM_CONS_CPY(StructuralConstraintSetStatic);
642 template <
typename CONSTRAINT >
643 StructuralConstraintSetStatic< CONSTRAINT >::~StructuralConstraintSetStatic() {
644 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
648 template <
typename CONSTRAINT >
649 StructuralConstraintSetStatic< CONSTRAINT >&
650 StructuralConstraintSetStatic< CONSTRAINT >::operator=(
651 const StructuralConstraintSetStatic< CONSTRAINT >& from) {
652 if (
this != &from) { constraints::operator=(from); }
658 template <
typename CONSTRAINT >
659 void StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
const DiGraph& graph) {
660 constraints::setGraph(graph);
664 template <
typename CONSTRAINT >
665 bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(NodeId x, NodeId y)
const {
666 return constraints::checkArcAddition(x, y);
670 template <
typename CONSTRAINT >
671 bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(NodeId x, NodeId y)
const {
672 return constraints::checkArcDeletion(x, y);
676 template <
typename CONSTRAINT >
677 bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(NodeId x, NodeId y)
const {
678 return constraints::checkArcReversal(x, y);
682 template <
typename CONSTRAINT >
684 StructuralConstraintSetStatic< CONSTRAINT >::checkArcTriangleDeletion1(NodeId node1,
686 NodeId node3)
const {
687 return constraints::checkArcTriangleDeletion1(node1, node2, node3);
691 template <
typename CONSTRAINT >
693 StructuralConstraintSetStatic< CONSTRAINT >::checkArcTriangleDeletion2(NodeId node1,
695 NodeId node3)
const {
696 return constraints::checkArcTriangleDeletion2(node1, node2, node3);
700 template <
typename CONSTRAINT >
701 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
702 const ArcAddition& change)
const {
703 return constraints::checkModification(change);
707 template <
typename CONSTRAINT >
708 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
709 const ArcDeletion& change)
const {
710 return constraints::checkModification(change);
714 template <
typename CONSTRAINT >
715 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
716 const ArcReversal& change)
const {
717 return constraints::checkModification(change);
721 template <
typename CONSTRAINT >
722 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
723 const ArcTriangleDeletion1& change)
const {
724 return constraints::checkModification(change);
728 template <
typename CONSTRAINT >
729 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
730 const ArcTriangleDeletion2& change)
const {
731 return constraints::checkModification(change);
735 template <
typename CONSTRAINT >
736 bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
737 const GraphChange& change)
const {
738 return constraints::checkModification(change);
742 template <
typename CONSTRAINT >
743 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
const ArcAddition& change) {
744 if (checkModification(change)) {
745 constraints::modifyGraph(change);
748 "the constraint set does not allow this arc addition between "
749 << change.node1() <<
" and " << change.node2());
754 template <
typename CONSTRAINT >
755 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
const ArcDeletion& change) {
756 if (checkModification(change)) {
757 constraints::modifyGraph(change);
760 "the constraint set does not allow this arc deletion between "
761 << change.node1() <<
" and " << change.node2());
766 template <
typename CONSTRAINT >
767 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
const ArcReversal& change) {
768 if (checkModification(change)) {
769 constraints::modifyGraph(change);
772 "the constraint set does not allow this arc reversal between "
773 << change.node1() <<
" and " << change.node2());
778 template <
typename CONSTRAINT >
779 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
780 const ArcTriangleDeletion1& change) {
781 if (checkModification(change)) {
782 constraints::modifyGraph(change);
785 "the constraint set does not allow the deletion of arc triangle1 "
786 << change.node1() <<
" -> " << change.node2() <<
" -> " << change.node3());
791 template <
typename CONSTRAINT >
792 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
793 const ArcTriangleDeletion2& change) {
794 if (checkModification(change)) {
795 constraints::modifyGraph(change);
798 "the constraint set does not allow the deletion of arc triangle2 "
799 << change.node1() <<
" -> " << change.node2() <<
" -> " << change.node3());
804 template <
typename CONSTRAINT >
805 void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
const GraphChange& change) {
806 switch (change.type()) {
807 case GraphChangeType::ARC_ADDITION :
808 modifyGraph(
reinterpret_cast< const ArcAddition&
>(change));
811 case GraphChangeType::ARC_DELETION :
812 modifyGraph(
reinterpret_cast< const ArcDeletion&
>(change));
815 case GraphChangeType::ARC_REVERSAL :
816 modifyGraph(
reinterpret_cast< const ArcReversal&
>(change));
819 case GraphChangeType::ARC_TRIANGLE_DELETION1 :
820 modifyGraph(
reinterpret_cast< const ArcTriangleDeletion1&
>(change));
823 case GraphChangeType::ARC_TRIANGLE_DELETION2 :
824 modifyGraph(
reinterpret_cast< const ArcTriangleDeletion2&
>(change));
829 "Graph change operation " << change.typeAsString()
830 <<
" is not currently supported by constraint sets");
835 template <
typename CONSTRAINT >
836 bool StructuralConstraintSetStatic< CONSTRAINT >::isAlwaysInvalid(
837 const GraphChange& change)
const {
838 return constraints::isAlwaysInvalid(change);
Exception : operation not allowed.
#define GUM_ERROR(type, msg)
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
the "meta-programming" class for storing several structural constraints