26 #ifndef DOXYGEN_SHOULD_SKIP_THIS 35 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
36 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
37 __StructuralConstraintSetStatic() {}
40 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
41 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
42 __StructuralConstraintSetStatic(
43 const __StructuralConstraintSetStatic< CONSTRAINT1,
44 OTHER_CONSTRAINTS... >& from) :
46 __StructuralConstraintSetStatic< OTHER_CONSTRAINTS... >(from) {}
49 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
50 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
51 ~__StructuralConstraintSetStatic() {}
54 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
55 INLINE __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
56 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
58 const __StructuralConstraintSetStatic< CONSTRAINT1,
59 OTHER_CONSTRAINTS... >& from) {
61 next_constraints::operator=(from);
62 first_constraint::operator=(from);
69 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
71 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
72 setGraph(
const DiGraph& graph) {
73 next_constraints::setGraph(graph);
74 first_constraint::setGraphAlone(graph);
78 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
80 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
81 modifyGraph(
const ArcAddition& change) {
82 next_constraints::modifyGraph(change);
83 first_constraint::modifyGraphAlone(change);
87 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
89 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
90 modifyGraph(
const ArcDeletion& change) {
91 next_constraints::modifyGraph(change);
92 first_constraint::modifyGraphAlone(change);
96 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
98 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
99 modifyGraph(
const ArcReversal& change) {
100 next_constraints::modifyGraph(change);
101 first_constraint::modifyGraphAlone(change);
105 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
107 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
108 modifyGraph(
const GraphChange& change) {
109 next_constraints::modifyGraph(change);
110 first_constraint::modifyGraphAlone(change);
114 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
116 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
117 isAlwaysInvalid(
const GraphChange& change)
const {
118 return next_constraints::isAlwaysInvalid(change)
119 || first_constraint::isAlwaysInvalidAlone(change);
123 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
125 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
127 return next_constraints::checkArcAddition(x, y)
128 && first_constraint::checkArcAdditionAlone(x, y);
132 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
134 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
136 return next_constraints::checkArcDeletion(x, y)
137 && first_constraint::checkArcDeletionAlone(x, y);
141 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
143 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
145 return next_constraints::checkArcReversal(x, y)
146 && first_constraint::checkArcReversalAlone(x, y);
150 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
152 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
153 checkModification(
const ArcAddition& change)
const {
154 return next_constraints::checkModification(change)
155 && first_constraint::checkModificationAlone(change);
159 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
161 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
162 checkModification(
const ArcDeletion& change)
const {
163 return next_constraints::checkModification(change)
164 && first_constraint::checkModificationAlone(change);
168 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
170 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
171 checkModification(
const ArcReversal& change)
const {
172 return next_constraints::checkModification(change)
173 && first_constraint::checkModificationAlone(change);
177 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
179 __StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
180 checkModification(
const GraphChange& change)
const {
181 return next_constraints::checkModification(change)
182 && first_constraint::checkModificationAlone(change);
188 template <
typename CONSTRAINT >
189 INLINE __StructuralConstraintSetStatic<
190 CONSTRAINT >::__StructuralConstraintSetStatic() {}
193 template <
typename CONSTRAINT >
194 INLINE __StructuralConstraintSetStatic< CONSTRAINT >::
195 __StructuralConstraintSetStatic(
196 const __StructuralConstraintSetStatic< CONSTRAINT >& from) :
200 template <
typename CONSTRAINT >
201 INLINE __StructuralConstraintSetStatic<
202 CONSTRAINT >::~__StructuralConstraintSetStatic() {}
205 template <
typename CONSTRAINT >
206 INLINE __StructuralConstraintSetStatic< CONSTRAINT >&
207 __StructuralConstraintSetStatic< CONSTRAINT >::
208 operator=(
const __StructuralConstraintSetStatic< CONSTRAINT >& from) {
209 if (
this != &from) { CONSTRAINT::operator=(from); }
215 template <
typename CONSTRAINT >
216 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
217 const DiGraph& graph) {
218 first_constraint::setGraphAlone(graph);
222 template <
typename CONSTRAINT >
223 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
224 const ArcAddition& change) {
225 first_constraint::modifyGraphAlone(change);
229 template <
typename CONSTRAINT >
230 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
231 const ArcDeletion& change) {
232 first_constraint::modifyGraphAlone(change);
236 template <
typename CONSTRAINT >
237 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
238 const ArcReversal& change) {
239 first_constraint::modifyGraphAlone(change);
243 template <
typename CONSTRAINT >
244 INLINE
void __StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
245 const GraphChange& change) {
246 first_constraint::modifyGraphAlone(change);
250 template <
typename CONSTRAINT >
251 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::isAlwaysInvalid(
252 const GraphChange& change)
const {
253 return first_constraint::isAlwaysInvalidAlone(change);
257 template <
typename CONSTRAINT >
258 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(
260 return first_constraint::checkArcAdditionAlone(x, y);
264 template <
typename CONSTRAINT >
265 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(
267 return first_constraint::checkArcDeletionAlone(x, y);
271 template <
typename CONSTRAINT >
272 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(
274 return first_constraint::checkArcReversalAlone(x, y);
278 template <
typename CONSTRAINT >
279 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
280 const ArcAddition& change)
const {
281 return first_constraint::checkModificationAlone(change);
285 template <
typename CONSTRAINT >
286 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
287 const ArcDeletion& change)
const {
288 return first_constraint::checkModificationAlone(change);
292 template <
typename CONSTRAINT >
293 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
294 const ArcReversal& change)
const {
295 return first_constraint::checkModificationAlone(change);
299 template <
typename CONSTRAINT >
300 INLINE
bool __StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
301 const GraphChange& change)
const {
302 return first_constraint::checkModificationAlone(change);
308 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
309 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
310 StructuralConstraintSetStatic() {
311 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
315 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
316 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
317 StructuralConstraintSetStatic(
318 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
321 GUM_CONS_CPY(StructuralConstraintSetStatic);
325 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
326 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
327 ~StructuralConstraintSetStatic() {
328 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
332 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
333 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
334 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
336 const StructuralConstraintSetStatic< CONSTRAINT1,
337 OTHER_CONSTRAINTS... >& from) {
338 if (
this != &from) { constraints::operator=(from); }
344 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
346 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
347 setGraph(
const DiGraph& graph) {
348 constraints::setGraph(graph);
352 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
354 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
356 return constraints::checkArcAddition(x, y);
360 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
362 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
364 return constraints::checkArcDeletion(x, y);
368 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
370 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
372 return constraints::checkArcReversal(x, y);
376 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
378 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
379 checkModification(
const ArcAddition& change)
const {
380 return constraints::checkModification(change);
384 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
386 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
387 checkModification(
const ArcDeletion& change)
const {
388 return constraints::checkModification(change);
392 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
394 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
395 checkModification(
const ArcReversal& change)
const {
396 return constraints::checkModification(change);
400 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
402 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
403 checkModification(
const GraphChange& change)
const {
404 return constraints::checkModification(change);
408 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
410 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
411 modifyGraph(
const ArcAddition& change) {
412 if (checkModification(change)) {
413 constraints::modifyGraph(change);
416 "the constraint set does not allow this arc addition between " 417 << change.node1() <<
" and " << change.node2());
422 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
424 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
425 modifyGraph(
const ArcDeletion& change) {
426 if (checkModification(change)) {
427 constraints::modifyGraph(change);
430 "the constraint set does not allow this arc deletion between " 431 << change.node1() <<
" and " << change.node2());
436 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
438 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
439 modifyGraph(
const ArcReversal& change) {
440 if (checkModification(change)) {
441 constraints::modifyGraph(change);
444 "the constraint set does not allow this arc reversal between " 445 << change.node1() <<
" and " << change.node2());
450 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
452 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
453 modifyGraph(
const GraphChange& change) {
454 switch (change.type()) {
456 modifyGraph(reinterpret_cast< const ArcAddition& >(change));
460 modifyGraph(reinterpret_cast< const ArcDeletion& >(change));
464 modifyGraph(reinterpret_cast< const ArcReversal& >(change));
469 "edge modifications are not " 470 "currently supported by constraint sets");
475 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
477 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
478 isAlwaysInvalid(
const GraphChange& change)
const {
479 return constraints::isAlwaysInvalid(change);
485 template <
typename CONSTRAINT >
486 INLINE StructuralConstraintSetStatic<
487 CONSTRAINT >::StructuralConstraintSetStatic() {
488 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
492 template <
typename CONSTRAINT >
494 StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic(
495 const StructuralConstraintSetStatic< CONSTRAINT >& from) :
497 GUM_CONS_CPY(StructuralConstraintSetStatic);
501 template <
typename CONSTRAINT >
502 INLINE StructuralConstraintSetStatic<
503 CONSTRAINT >::~StructuralConstraintSetStatic() {
504 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
508 template <
typename CONSTRAINT >
509 INLINE StructuralConstraintSetStatic< CONSTRAINT >&
510 StructuralConstraintSetStatic< CONSTRAINT >::
511 operator=(
const StructuralConstraintSetStatic< CONSTRAINT >& from) {
512 if (
this != &from) { constraints::operator=(from); }
518 template <
typename CONSTRAINT >
519 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
520 const DiGraph& graph) {
521 constraints::setGraph(graph);
525 template <
typename CONSTRAINT >
526 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(
528 return constraints::checkArcAddition(x, y);
532 template <
typename CONSTRAINT >
533 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(
535 return constraints::checkArcDeletion(x, y);
539 template <
typename CONSTRAINT >
540 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(
542 return constraints::checkArcReversal(x, y);
546 template <
typename CONSTRAINT >
547 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
548 const ArcAddition& change)
const {
549 return constraints::checkModification(change);
553 template <
typename CONSTRAINT >
554 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
555 const ArcDeletion& change)
const {
556 return constraints::checkModification(change);
560 template <
typename CONSTRAINT >
561 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
562 const ArcReversal& change)
const {
563 return constraints::checkModification(change);
567 template <
typename CONSTRAINT >
568 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkModification(
569 const GraphChange& change)
const {
570 return constraints::checkModification(change);
574 template <
typename CONSTRAINT >
575 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
576 const ArcAddition& change) {
577 if (checkModification(change)) {
578 constraints::modifyGraph(change);
581 "the constraint set does not allow this arc addition between " 582 << change.node1() <<
" and " << change.node2());
587 template <
typename CONSTRAINT >
588 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
589 const ArcDeletion& change) {
590 if (checkModification(change)) {
591 constraints::modifyGraph(change);
594 "the constraint set does not allow this arc deletion between " 595 << change.node1() <<
" and " << change.node2());
600 template <
typename CONSTRAINT >
601 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
602 const ArcReversal& change) {
603 if (checkModification(change)) {
604 constraints::modifyGraph(change);
607 "the constraint set does not allow this arc reversal between " 608 << change.node1() <<
" and " << change.node2());
613 template <
typename CONSTRAINT >
614 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
615 const GraphChange& change) {
616 switch (change.type()) {
618 modifyGraph(reinterpret_cast< const ArcAddition& >(change));
622 modifyGraph(reinterpret_cast< const ArcDeletion& >(change));
626 modifyGraph(reinterpret_cast< const ArcReversal& >(change));
631 "edge modifications are not " 632 "currently supported by constraint sets");
637 template <
typename CONSTRAINT >
638 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::isAlwaysInvalid(
639 const GraphChange& change)
const {
640 return constraints::isAlwaysInvalid(change);
gum is the global namespace for all aGrUM entities
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)