Skip to content

num::structures::path_graph

Defined in header <structures/graph/generators.hpp>

template <typename Weight = double, std::integral Index = num::idx>
graph<Weight, Index> path_graph(std::type_identity_t<Index> n,
                                Weight weight = Weight{1});

Construct the path graph \(P_n\).