XNetwork 1.7.5; VERSION ${PROJECT_VERSION}
Loading...
Searching...
No Matches
Functions
filters.h File Reference
#include <set>
Include dependency graph for filters.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
auto no_filter (const T &)
 A predicate that always returns true (no filtering).
 
template<typename T >
auto hide_nodes (const std::set< T > &nodes)
 Create a filter that hides specified nodes.
 
template<typename T >
auto hide_diedges (const std::set< std::pair< T, T > > &edges)
 Create a filter that hides specified directed edges.
 

Function Documentation

◆ hide_diedges()

template<typename T >
auto hide_diedges ( const std::set< std::pair< T, T > > &  edges)

Create a filter that hides specified directed edges.

This filter factory returns a predicate function that returns false for directed edges in the given set, effectively hiding them from a subgraph.

Template Parameters
TThe type of nodes in the edges
Parameters
edgesThe set of directed edges to hide (as pairs)
Returns
auto A predicate function that accepts two nodes and returns true if not hidden

◆ hide_nodes()

template<typename T >
auto hide_nodes ( const std::set< T > &  nodes)

Create a filter that hides specified nodes.

This filter factory returns a predicate function that returns false for nodes in the given set, effectively hiding them from a subgraph.

Template Parameters
TThe type of nodes to filter
Parameters
nodesThe set of nodes to hide
Returns
auto A predicate function that accepts a node and returns true if not hidden

◆ no_filter()

template<typename T >
auto no_filter ( const T )

A predicate that always returns true (no filtering).

Filter factories to hide || show sets of nodes && edges.

These filters return the function used when creating SubGraph.

Template Parameters
TThe type of the item to filter.
Returns
true Always returns true.