Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graph title #48

Closed
richelbilderbeek opened this issue Jan 19, 2018 · 1 comment
Closed

Add graph title #48

richelbilderbeek opened this issue Jan 19, 2018 · 1 comment

Comments

@richelbilderbeek
Copy link
Owner

Awesome article at http://blog.hostilefork.com/boost-graph-templates-not-crazy/

struct City {
   std::string name;
   unsigned population;
};

struct Road {
   std::string name;
   float miles;
};

struct MapWithInfo {
    boost::adjacency_list<
        vecS, vecS, bidirectionalS, City, Road
    > citiesAndRoads;

    std::string title;
    int year;
}

struct MapProperties {
    std::string title;
    int year;
}

boost::adjacency_list<
    vecS, vecS, bidirectionalS, City, Road, MapProperties
> citiesAndRoadsMap;

(boost::get(graph_properties, citiesAndRoadsMap))[citiesAndRoadsMap].year 
@richelbilderbeek
Copy link
Owner Author

Close this Issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant