Template Class NodeView

Template Parameter Order

  1. typename nodeview_t

Class Documentation

template<typename nodeview_t>
class xn::NodeView

A NodeView class to act as G.nodes for a XNetwork Graph Set operations act on the nodes without considering data. Iteration is over nodes. Node data can be looked up like a dict. Use NodeDataView to iterate over node data or to specify a data attribute for lookup. NodeDataView is created by calling the NodeView.

Parameters

graph : XNetwork graph-like class

Examples

true 0 1 2 {“color”: “blue”} true (0, “aqua”); (1, “aqua”); (2, “blue”); (8, “red”); true true (0, “aqua”); (1, “aqua”); (2, “blue”); (8, “red”); false

Public Functions

inline explicit NodeView(nodeview_t &nodes)
inline auto size()
inline auto begin()
inline auto end()
inline auto operator[](const Node &n) const -> const auto&
inline auto operator[](const Node &n) -> auto&
inline auto contains(const Node &n) -> bool