Graphle 1.0.0
A C++20 header-only graph library
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange > Class Template Reference

#include <edge_from_vertex.hpp>

Inheritance diagram for graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >:

Public Types

using vertex_type = typename rng::range_value_t< R >
 
using edge_type = std::pair< vertex_type, vertex_type >
 

Public Member Functions

constexpr edge_from_vertex_view (R base_range, vertex_type bind_vertex)
 
constexpr auto begin (void) const
 
constexpr auto end (void) const
 
constexpr auto size (void) const
 

Detailed Description

template<rng::input_range R, typename ProjectBound, typename ProjectRange>
requires (rng::view<R> && is_vertex<rng::range_value_t<R>>)
class graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >

Definition at line 13 of file edge_from_vertex.hpp.

Member Typedef Documentation

◆ edge_type

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
using graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::edge_type = std::pair<vertex_type, vertex_type>

Definition at line 16 of file edge_from_vertex.hpp.

◆ vertex_type

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
using graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::vertex_type = typename rng::range_value_t<R>

Definition at line 15 of file edge_from_vertex.hpp.

Constructor & Destructor Documentation

◆ edge_from_vertex_view()

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
constexpr graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::edge_from_vertex_view ( R  base_range,
vertex_type  bind_vertex 
)
inlineconstexpr
Warning
The constness of bind_vertex should match that of the range. This means that e.g. code like the following will not work:
std::unordered_set<Vertex> vertices; // Note: set so we always get a const version of the value!
std::vector<Vertex> edges_for_vertex; // Note: vector so we always get a mutable version of the value!
auto view = edges_for_vertex
| views::transform(util::addressof) // Vertex*
| views::edge_from(&*vertices.begin()); // const Vertex*
constexpr auto edge_from
constexpr addressof_t addressof
Definition: functional.hpp:61

Definition at line 29 of file edge_from_vertex.hpp.

Member Function Documentation

◆ begin()

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
constexpr auto graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::begin ( void  ) const
inlineconstexpr

Definition at line 34 of file edge_from_vertex.hpp.

◆ end()

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
constexpr auto graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::end ( void  ) const
inlineconstexpr

Definition at line 35 of file edge_from_vertex.hpp.

◆ size()

template<rng::input_range R, typename ProjectBound , typename ProjectRange >
constexpr auto graphle::detail::edge_from_vertex_view< R, ProjectBound, ProjectRange >::size ( void  ) const
inlineconstexpr

Definition at line 37 of file edge_from_vertex.hpp.


The documentation for this class was generated from the following file: