Skip to content

Commit

Permalink
Merge pull request #370 from jcdong98/fix
Browse files Browse the repository at this point in the history
Fix labeled_graph typo in name adjacenct_vertices.
  • Loading branch information
jeremy-murphy authored Apr 17, 2024
2 parents 6caa0ba + 81ead6e commit a3fffa9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/boost/graph/labeled_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ inline typename LABELED_GRAPH::degree_size_type degree(
template < LABELED_GRAPH_PARAMS >
inline std::pair< typename LABELED_GRAPH::adjacency_iterator,
typename LABELED_GRAPH::adjacency_iterator >
adjacenct_vertices(
adjacent_vertices(
typename LABELED_GRAPH::vertex_descriptor v, LABELED_GRAPH const& g)
{
return adjacent_vertices(v, g.graph());
Expand Down
30 changes: 27 additions & 3 deletions test/labeled_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
// Boost Software License, Version 1.0 (See accompanying file
// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

#include <iostream>
#include <string>
#include <set>

#include <boost/assert.hpp>
#include <boost/concept/assert.hpp>
#include <boost/range.hpp>

#include <boost/graph/graph_concepts.hpp>
#include <boost/graph/undirected_graph.hpp>
#include <boost/graph/directed_graph.hpp>
#include <boost/graph/labeled_graph.hpp>

#include "typestr.hpp"

using std::cout;
using std::string;
using namespace boost;

void test_concepts();
void test_norm();
void test_temp();
void test_bacon();
Expand All @@ -29,13 +29,37 @@ void test_multiple_associative_container();

int main()
{
test_concepts();
test_norm();
test_temp();
test_bacon();
test_remove_labeled_vertex();
test_multiple_associative_container();
}

//////////////////////////////////////
// Graph Concepts
//////////////////////////////////////

void test_concepts()
{
// The labeled mutable graph hides the add_ and remove_ vertex functions
// from the mutable graph concept, so VertexMutableGraphConcept will not be
// tested here.
{
typedef labeled_graph< directed_graph<>, unsigned > Graph;
BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< Graph >));
BOOST_CONCEPT_ASSERT((EdgeMutableGraphConcept< Graph >));
}
{
typedef labeled_graph< undirected_graph<>, unsigned > Graph;
BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< Graph >));
BOOST_CONCEPT_ASSERT((EdgeMutableGraphConcept< Graph >));
}
}

//////////////////////////////////////
// Utility Functions and Types
//////////////////////////////////////
Expand Down

0 comments on commit a3fffa9

Please sign in to comment.