Skip to content

Commit

Permalink
Add index_adjacency_list
Browse files Browse the repository at this point in the history
Add view overloads with vertex_id only
  • Loading branch information
pratzl committed Nov 7, 2023
1 parent f88062b commit 76dd06d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
7 changes: 4 additions & 3 deletions tex/container_interface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ \section{Concepts}
\tcode{vertex_range<G>} & \tcode{vertices(g)} returns a sized, forward\_range; \tcode{vertex_id(g,ui)} exists\\
\tcode{targeted_edge<G>} & \tcode{target_id(g,uv)} and \tcode{target(g,uv)} exist\\
\tcode{sourced_edge<G>} & \tcode{source_id(g,uv)} and \tcode{source(g,uv)} exist\\
\tcode{adjacency_list<G>} & \tcode{vertex_range<G>} and \tcode{targeted_edge<G,edge<G>>} and \tcode{edges(g,_)} functions return a forward\_range\\
\tcode{sourced_adjacency_list<G>} & \tcode{adjacency_list<G>} and \tcode{sourced_edge<G, edge_t<G>>} and \tcode{edge_id(g,uv)} exists \\
\tcode{index_adjacency_list<G>} & \tcode{vertex_range<G>} and \tcode{targeted_edge<G,edge<G>>} and \tcode{edges(g,uid)} functions return a forward\_range\\
\tcode{adjacency_list<G>} & Extends \tcode{index_adjacency_list<G>} by adding \tcode{edges(g,u)} that returns a forward\_range\\
\tcode{sourced_adjacency_list<G>} & \tcode{adjacency_list<G>} and \tcode{sourced_edge<G, edge_t<G>>} and \tcode{edge_id(g,uv)} exists \\
\hline
\tcode{copyable_vertex<T,VId,VV>} & \tcode{convertible_to<T, copyable_vertex_t<VId, VV>>} \\
\tcode{copyable_edge<T,Vid,EV>} & \tcode{convertible_to<T, copyable_edge_t<VId, EV>>} \\
Expand Down Expand Up @@ -145,7 +146,7 @@ \section{Functions}
\hline
\tcode{graph_value(g)} & \tcode{graph_value_t<G>} & constant & n/a, optional \\
\hdashline
\tcode{partition_count(g)} & \tcode{vertex_id_t<G>} & constant & \tcode{1}. Minimum value is 1. \\
\tcode{partition_count(g)} & \tcode{vertex_id_t<G>} & constant & Minimum value is 1. \\
\hline
\tcode{vertices(g)} & \tcode{vetex_range_t<G>} & constant & n/a \\
\tcode{num_vertices(g)} & \tcode{integral} & constant & \tcode{size(vertices(g))} \\
Expand Down
18 changes: 14 additions & 4 deletions tex/views.tex
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ \section{vertexlist Views}
\tcode{for(auto\&\& [uid,u,val] : vertexlist(g,first,last,vvf))} & \tcode{vertex_view<VId,V,VV>} \\
\tcode{for(auto\&\& [uid,u] : vertexlist(g,vr))} & \tcode{vertex_view<VId,V,void>} \\
\tcode{for(auto\&\& [uid,u,val] : vertexlist(g,vr,vvf))} & \tcode{vertex_view<VId,V,VV>} \\
\hdashline
\tcode{for(auto\&\& [uid] : basic_vertexlist(g))} & \tcode{vertex_view<VId,V,void>} \\
\tcode{for(auto\&\& [uid] : basic_vertexlist(g,first,last))} & \tcode{vertex_view<VId,V,void>} \\
\tcode{for(auto\&\& [uid] : basic_vertexlist(g,vr))} & \tcode{vertex_view<VId,V,void>} \\
\hline
\end{tabular}}
\caption{\tcode{vertexlist} View Functions}
Expand All @@ -243,8 +247,10 @@ \section{incidence Views}
\hline
\textbf{Example} & \textbf{Return} \\
\hline
\tcode{for(auto\&\& [vid,uv] : incidence(g,u))} & \tcode{edge_view<VId,false,E,void>} \\
\tcode{for(auto\&\& [vid,uv,val] : incidence(g,u,evf))} & \tcode{edge_view<VId,false,E,EV>} \\
\tcode{for(auto\&\& [vid,uv] : incidence(g,uid))} & \tcode{edge_view<VId,false,E,void>} \\
\tcode{for(auto\&\& [vid,uv,val] : incidence(g,uid,evf))} & \tcode{edge_view<VId,false,E,EV>} \\
\hdashline
\tcode{for(auto\&\& [vid] : basic_incidence(g,uid))} & \tcode{edge_view<VId,false,void,void>} \\
\hline
\end{tabular}}
\caption{\tcode{incidence} View Functions}
Expand All @@ -265,8 +271,10 @@ \section{neighbors Views}
\hline
\textbf{Example} & \textbf{Return} \\
\hline
\tcode{for(auto\&\& [vid,v] : neighbors(g,u))} & \tcode{neighbor_view<VId,false,V,void>} \\
\tcode{for(auto\&\& [vid,v,val] : neighbors(g,u,vvf))} & \tcode{neighbor_view<VId,false,V,VV>} \\
\tcode{for(auto\&\& [vid,v] : neighbors(g,uid))} & \tcode{neighbor_view<VId,false,V,void>} \\
\tcode{for(auto\&\& [vid,v,val] : neighbors(g,uid,vvf))} & \tcode{neighbor_view<VId,false,V,VV>} \\
\hdashline
\tcode{for(auto\&\& [vid] : basic_neighbors(g,uid))} & \tcode{neighbor_view<VId,false,void,void>} \\
\hline
\end{tabular}}
\caption{\tcode{neighbors} View Functions}
Expand All @@ -287,6 +295,8 @@ \section{edgelist Views}
\hline
\tcode{for(auto\&\& [uid,vid,uv] : edgelist(g))} & \tcode{edge_view<VId,true,E,void>} \\
\tcode{for(auto\&\& [uid,vid,uv,val] : edgelist(g,evf))} & \tcode{edge_view<VId,true,E,EV>} \\
\hdashline
\tcode{for(auto\&\& [uid,vid] : basic_edgelist(g))} & \tcode{edge_view<VId,true,void,void>} \\
\hline
\end{tabular}}
\caption{\tcode{edgelist} View Functions}
Expand Down

0 comments on commit 76dd06d

Please sign in to comment.