Properties

#include<hysj/graphs/properties.hpp>

Properties map from element ids to other stuff.

In namespace graphs:

auto put(auto &p, auto i, auto &&v)
Hook to put value v to property of id i.

auto get(auto &p, auto i)
Hook to get property of i.

Traits

template<class P, class I>
using traits::get_t
Let
P p
I i
Computes the return type of get(p, i).

auto fill(auto &p, auto &&v)
Hook to write value v to all ids.

template<typename P, typename I>
concept concepts::property
Let
P p
I i
traits::get_t<P, I> v
Requires

graphs::get(p, i) graphs::put(p, i, v)


template<typename P, typename G, element_tag T>
concept concepts::element_property

Requires

concepts::property<P, traits::element_id<P, T>>


template<typename P, typename G, element_tag T, typename V>
concept concepts::element_property_of

Requires

concepts::element_property<P, G, T> std::convertible_to<traits::get_t<P, traits::element_id<G, T>>, V>


Builtin

In namespace builtin:

Vector Properties

#include<hysj/graphs/builtin/vector_properties.hpp>

Implementation of a property based on std::vector.

template<element_tag T, typename V>
auto make_vector_property(constant_t<T> e, const graphs::concepts::elements<T> auto &g, V v)
Make a vector property for the elements of type T for the graph g, initializing the values with v.

Shorthands

unspecified vprop = bind(make_vector_property, vertex_tag)
unspecified eprop = bind(make_vector_property, edge_tag)

Constant Property

#include<hysj/graphs/builtin/constant_properties.hpp>

Implementation of property with a constant value for any element.

template<typename T>
struct constant_property
T value
Constant value.
Implements concepts::element_property_of for any element, graph and any U convertible from T.

Static Property

#include<hysj/graphs/builtin/static_properties.hpp>

Implementation of property with a static value for any element.

template<auto T>
struct static_property
Implements concepts::element_property_of for any element, graph and any U convertible from T.