49#ifndef DOXYGEN_SHOULD_SKIP_THIS
58 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
60 _StructuralConstraintSetStatic_< CONSTRAINT1,
61 OTHER_CONSTRAINTS... >::_StructuralConstraintSetStatic_() {
65 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
66 INLINE _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::
67 _StructuralConstraintSetStatic_(
68 const _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) :
69 CONSTRAINT1(from), _StructuralConstraintSetStatic_< OTHER_CONSTRAINTS... >(from) {}
72 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
73 INLINE _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::
74 ~_StructuralConstraintSetStatic_() {}
77 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
78 INLINE _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >&
79 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::operator=(
80 const _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) {
82 next_constraints::operator=(from);
83 first_constraint::operator=(from);
90 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
91 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::setGraph(
92 const DiGraph& graph) {
93 next_constraints::setGraph(graph);
94 first_constraint::setGraphAlone(graph);
98 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
99 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
100 const ArcAddition& change) {
101 next_constraints::modifyGraph(change);
102 first_constraint::modifyGraphAlone(change);
106 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
107 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
108 const ArcDeletion& change) {
109 next_constraints::modifyGraph(change);
110 first_constraint::modifyGraphAlone(change);
114 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
115 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
116 const ArcReversal& change) {
117 next_constraints::modifyGraph(change);
118 first_constraint::modifyGraphAlone(change);
122 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
123 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
124 const GraphChange& change) {
125 next_constraints::modifyGraph(change);
126 first_constraint::modifyGraphAlone(change);
130 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
132 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::isAlwaysInvalid(
133 const GraphChange& change)
const {
134 return next_constraints::isAlwaysInvalid(change)
135 || first_constraint::isAlwaysInvalidAlone(change);
139 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
141 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcAddition(
144 return next_constraints::checkArcAddition(x, y)
145 && first_constraint::checkArcAdditionAlone(x, y);
149 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
151 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcDeletion(
154 return next_constraints::checkArcDeletion(x, y)
155 && first_constraint::checkArcDeletionAlone(x, y);
159 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
161 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcReversal(
164 return next_constraints::checkArcReversal(x, y)
165 && first_constraint::checkArcReversalAlone(x, y);
169 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
171 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
172 const ArcAddition& change)
const {
173 return next_constraints::checkModification(change)
174 && first_constraint::checkModificationAlone(change);
178 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
180 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
181 const ArcDeletion& change)
const {
182 return next_constraints::checkModification(change)
183 && first_constraint::checkModificationAlone(change);
187 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
189 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
190 const ArcReversal& change)
const {
191 return next_constraints::checkModification(change)
192 && first_constraint::checkModificationAlone(change);
196 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
198 _StructuralConstraintSetStatic_< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
199 const GraphChange& change)
const {
200 return next_constraints::checkModification(change)
201 && first_constraint::checkModificationAlone(change);
207 template <
typename CONSTRAINT >
208 INLINE _StructuralConstraintSetStatic_< CONSTRAINT >::_StructuralConstraintSetStatic_() {}
211 template <
typename CONSTRAINT >
212 INLINE _StructuralConstraintSetStatic_< CONSTRAINT >::_StructuralConstraintSetStatic_(
213 const _StructuralConstraintSetStatic_< CONSTRAINT >& from) : CONSTRAINT(from) {}
216 template <
typename CONSTRAINT >
217 INLINE _StructuralConstraintSetStatic_< CONSTRAINT >::~_StructuralConstraintSetStatic_() {}
220 template <
typename CONSTRAINT >
221 INLINE _StructuralConstraintSetStatic_< CONSTRAINT >&
222 _StructuralConstraintSetStatic_< CONSTRAINT >::operator=(
223 const _StructuralConstraintSetStatic_< CONSTRAINT >& from) {
224 if (
this != &from) { CONSTRAINT::operator=(from); }
230 template <
typename CONSTRAINT >
231 INLINE
void _StructuralConstraintSetStatic_< CONSTRAINT >::setGraph(
const DiGraph& graph) {
232 first_constraint::setGraphAlone(graph);
236 template <
typename CONSTRAINT >
238 _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcAddition& change) {
239 first_constraint::modifyGraphAlone(change);
243 template <
typename CONSTRAINT >
245 _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcDeletion& change) {
246 first_constraint::modifyGraphAlone(change);
250 template <
typename CONSTRAINT >
252 _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const ArcReversal& change) {
253 first_constraint::modifyGraphAlone(change);
257 template <
typename CONSTRAINT >
259 _StructuralConstraintSetStatic_< CONSTRAINT >::modifyGraph(
const GraphChange& change) {
260 first_constraint::modifyGraphAlone(change);
264 template <
typename CONSTRAINT >
265 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::isAlwaysInvalid(
266 const GraphChange& change)
const {
267 return first_constraint::isAlwaysInvalidAlone(change);
271 template <
typename CONSTRAINT >
272 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcAddition(NodeId x,
274 return first_constraint::checkArcAdditionAlone(x, y);
278 template <
typename CONSTRAINT >
279 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcDeletion(NodeId x,
281 return first_constraint::checkArcDeletionAlone(x, y);
285 template <
typename CONSTRAINT >
286 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkArcReversal(NodeId x,
288 return first_constraint::checkArcReversalAlone(x, y);
292 template <
typename CONSTRAINT >
293 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
294 const ArcAddition& change)
const {
295 return first_constraint::checkModificationAlone(change);
299 template <
typename CONSTRAINT >
300 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
301 const ArcDeletion& change)
const {
302 return first_constraint::checkModificationAlone(change);
306 template <
typename CONSTRAINT >
307 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
308 const ArcReversal& change)
const {
309 return first_constraint::checkModificationAlone(change);
313 template <
typename CONSTRAINT >
314 INLINE
bool _StructuralConstraintSetStatic_< CONSTRAINT >::checkModification(
315 const GraphChange& change)
const {
316 return first_constraint::checkModificationAlone(change);
322 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
323 INLINE StructuralConstraintSetStatic< CONSTRAINT1,
324 OTHER_CONSTRAINTS... >::StructuralConstraintSetStatic() {
325 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
329 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
330 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::
331 StructuralConstraintSetStatic(
332 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) :
334 GUM_CONS_CPY(StructuralConstraintSetStatic);
338 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
339 INLINE StructuralConstraintSetStatic< CONSTRAINT1,
340 OTHER_CONSTRAINTS... >::~StructuralConstraintSetStatic() {
341 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
345 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
346 INLINE StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >&
347 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::operator=(
348 const StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >& from) {
349 if (
this != &from) { constraints::operator=(from); }
355 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
356 INLINE
void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::setGraph(
357 const DiGraph& graph) {
358 constraints::setGraph(graph);
362 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
364 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcAddition(
367 return constraints::checkArcAddition(x, y);
371 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
373 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcDeletion(
376 return constraints::checkArcDeletion(x, y);
380 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
382 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkArcReversal(
385 return constraints::checkArcReversal(x, y);
389 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
391 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
392 const ArcAddition& change)
const {
393 return constraints::checkModification(change);
397 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
399 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
400 const ArcDeletion& change)
const {
401 return constraints::checkModification(change);
405 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
407 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
408 const ArcReversal& change)
const {
409 return constraints::checkModification(change);
413 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
415 StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::checkModification(
416 const GraphChange& change)
const {
417 return constraints::checkModification(change);
421 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
422 INLINE
void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
423 const ArcAddition& change) {
424 if (checkModification(change)) {
425 constraints::modifyGraph(change);
428 "the constraint set does not allow this arc addition between "
429 << change.node1() <<
" and " << change.node2());
434 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
435 INLINE
void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
436 const ArcDeletion& change) {
437 if (checkModification(change)) {
438 constraints::modifyGraph(change);
441 "the constraint set does not allow this arc deletion between "
442 << change.node1() <<
" and " << change.node2());
447 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
448 INLINE
void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
449 const ArcReversal& change) {
450 if (checkModification(change)) {
451 constraints::modifyGraph(change);
454 "the constraint set does not allow this arc reversal between "
455 << change.node1() <<
" and " << change.node2());
460 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
461 INLINE
void StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::modifyGraph(
462 const GraphChange& change) {
463 switch (change.type()) {
464 case GraphChangeType::ARC_ADDITION :
465 modifyGraph(
reinterpret_cast< const ArcAddition&
>(change));
468 case GraphChangeType::ARC_DELETION :
469 modifyGraph(
reinterpret_cast< const ArcDeletion&
>(change));
472 case GraphChangeType::ARC_REVERSAL :
473 modifyGraph(
reinterpret_cast< const ArcReversal&
>(change));
478 "edge modifications are not "
479 "currently supported by constraint sets");
484 template <
typename CONSTRAINT1,
typename... OTHER_CONSTRAINTS >
485 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT1, OTHER_CONSTRAINTS... >::isAlwaysInvalid(
486 const GraphChange& change)
const {
487 return constraints::isAlwaysInvalid(change);
493 template <
typename CONSTRAINT >
494 INLINE StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic() {
495 GUM_CONSTRUCTOR(StructuralConstraintSetStatic);
499 template <
typename CONSTRAINT >
500 INLINE StructuralConstraintSetStatic< CONSTRAINT >::StructuralConstraintSetStatic(
501 const StructuralConstraintSetStatic< CONSTRAINT >& from) : constraints(from) {
502 GUM_CONS_CPY(StructuralConstraintSetStatic);
506 template <
typename CONSTRAINT >
507 INLINE StructuralConstraintSetStatic< CONSTRAINT >::~StructuralConstraintSetStatic() {
508 GUM_DESTRUCTOR(StructuralConstraintSetStatic);
512 template <
typename CONSTRAINT >
513 INLINE StructuralConstraintSetStatic< CONSTRAINT >&
514 StructuralConstraintSetStatic< CONSTRAINT >::operator=(
515 const StructuralConstraintSetStatic< CONSTRAINT >& from) {
516 if (
this != &from) { constraints::operator=(from); }
522 template <
typename CONSTRAINT >
523 INLINE
void StructuralConstraintSetStatic< CONSTRAINT >::setGraph(
const DiGraph& graph) {
524 constraints::setGraph(graph);
528 template <
typename CONSTRAINT >
529 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcAddition(NodeId x,
531 return constraints::checkArcAddition(x, y);
535 template <
typename CONSTRAINT >
536 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcDeletion(NodeId x,
538 return constraints::checkArcDeletion(x, y);
542 template <
typename CONSTRAINT >
543 INLINE
bool StructuralConstraintSetStatic< CONSTRAINT >::checkArcReversal(NodeId x,
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 >
579 StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
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 >
592 StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
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 >
605 StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
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 >
618 StructuralConstraintSetStatic< CONSTRAINT >::modifyGraph(
const GraphChange& change) {
619 switch (change.type()) {
620 case GraphChangeType::ARC_ADDITION :
621 modifyGraph(
reinterpret_cast< const ArcAddition&
>(change));
624 case GraphChangeType::ARC_DELETION :
625 modifyGraph(
reinterpret_cast< const ArcDeletion&
>(change));
628 case GraphChangeType::ARC_REVERSAL :
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);
Exception : operation not allowed.
#define GUM_ERROR(type, msg)
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities