4 #include "graph_filter.h"
5 #include "linkler_diff.h"
15 template<
typename GraphType>
88 if(linkler_diff_ == NULL)
90 return this->enabled_;
94 template<
typename P1,
typename P2>
100 case ADDED:
return "ADDED";
101 case REMOVED:
return "REMOVED";
102 case UNCHANGED:
return "UNCHANGED";
117 template<
typename T>
bool check(T e) {
119 if (linkler_diff_ == NULL) {
128 if (!linkler_diff_->
added(e) && !this->inverted_) {
130 }
else if(linkler_diff_->
added(e) && this->inverted_) {
135 if (!linkler_diff_->
removed(e) && !this->inverted_) {
137 }
else if(linkler_diff_->
removed(e) && this->inverted_) {
143 if((linkler_diff_->
added(e) || linkler_diff_->
removed(e)) && !this->inverted_) {
145 }
else if(!linkler_diff_->
added(e) && !linkler_diff_->
removed(e) && this->inverted_) {
virtual GraphFilter< GraphType > * clone()
Definition: diff_filter.h:73
Definition: diff_filter.h:16
DiffFilter(std::string filter_name, filter_type ft)
Definition: diff_filter.h:47
virtual bool operator()(E_type e)
Returns true if the give edgen matches the filter.
Definition: diff_filter.h:78
void set_filter_type(filter_type ft)
Definition: diff_filter.h:66
Forward declarations for functors.
Definition: defines.h:32
filter_type
Definition: diff_filter.h:24
DiffFilter(std::string filter_name, LinklerDiff *ld, filter_type ft)
Definition: diff_filter.h:33
bool added(SWU *swu)
Definition: linkler_diff.cc:250
bool removed(SWU *swu)
Definition: linkler_diff.cc:270
Definition: linkler_diff.h:14
Definition: graph_filter.h:15
void set_LinklerDiff(LinklerDiff *ld)
Definition: diff_filter.h:58
virtual bool enabled() const
Overload the enabled method by graph filter to check for the linkler_diff_ being set or not...
Definition: diff_filter.h:87