1 #ifndef DEPENDENCY_DEGREE_FILTER_H_
2 #define DEPENDENCY_DEGREE_FILTER_H_
6 #include "graph_filter.h"
16 template<
typename GraphType>
74 return !(this->inverted_);
86 unsigned int degree = 0;
93 if(min_degree_ < 0 || degree >= static_cast<unsigned int>(min_degree_)) {
94 if(max_degree_ < 0 || degree <= static_cast<unsigned int>(max_degree_)) {
99 if(!include && !this->inverted_)
101 if(include && this->inverted_)
126 template<
typename P1,
typename P2>
156 return dependencies_;
DependencyDegreeFilter(int min_degree, int max_degree, bool dependents=true, bool dependencies=true)
Definition: dependency_degree_filter.h:50
void set_dependents(bool dependents)
Definition: dependency_degree_filter.h:111
Forward declarations for functors.
Definition: defines.h:32
int min_degree()
Definition: dependency_degree_filter.h:134
void set_dependencies(bool dependencies)
Definition: dependency_degree_filter.h:119
SwuDependencySet * dependencies()
Accessor for the set of dependencies.
Definition: swu.cc:143
SwuDependentSet * dependents()
Accessor for the set of dependents.
Definition: swu.cc:147
Definition: graph_filter.h:15
bool dependents()
Definition: dependency_degree_filter.h:148
DependencyDegreeFilter(std::string filter_name, int min_degree, int max_degree, bool dependents=true, bool dependencies=true)
Definition: dependency_degree_filter.h:31
bool dependencies()
Definition: dependency_degree_filter.h:155
Definition: dependency_degree_filter.h:17
virtual GraphFilter< GraphType > * clone()
Definition: dependency_degree_filter.h:64
unsigned int index_type_t
The type of index used for the nodes in the graph.
Definition: grapher.h:52
virtual bool operator()(E_type edge)
Definition: dependency_degree_filter.h:72
int max_degree()
Definition: dependency_degree_filter.h:141