Skip to content

make directed/undirected a compile-time decision #2

@rincedd

Description

@rincedd

I wonder if the possibility of mixed graphs, i.e. containing both directed and undirected edges at the same time, is so useful. Of course, this might be the case in some real-world networks, but for simulation purposes undirected edges in a directed graph can always be represented as two directed edges?

So, distinguishing between directed and undirected graphs instead of edges at compile time seems like a good idea. This would involve making the ElementFactory a template on the directedness, so that there would be different factories for directed and undirected elements. Then of course nodes would be different for directed and undirected graphs, as they store their adjacent edges differently. Could this be moved to some edge storage policy?

For compatibility with boost::graph, this would also improve things a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions