filter_graph_vp_test.cpp
来自「C++的一个好库。。。现在很流行」· C++ 代码 · 共 28 行
CPP
28 行
//=======================================================================
// Copyright 2002 Indiana University.
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <boost/graph/filtered_graph.hpp>
#include <boost/graph/adjacency_list.hpp>
using namespace boost;
// Check to make you can apply a vertex filter with the
// make_filtered_graph function, to fix bug #480175.
struct NotMuchOfAFilter
{
template<class Vertex> bool operator()(Vertex key)
const { return true; }
};
int main()
{
adjacency_list<> graph;
make_filtered_graph(graph, keep_all(), NotMuchOfAFilter());
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?