[BGL] there is no in_edges() function for adjacency_matrix<>

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[BGL] there is no in_edges() function for adjacency_matrix<>

Dmitry Bufistov

>
>
> On Feb 7, 2006, at 7:14 AM, Dmitry Bufistov wrote:
>
>         --- Dmitry Bufistov wrote:
>
>             But what about
>             boost::adjacency_matrix<boost::directedS>?
>
>         No, that too has to be
>         boost::adjacency_matrix<boost::bidirectionalS>.
>
>
> I've attached an updated adjacency_matrix header (also in Boost CVS)
> that implements the Bidirectional Graph requirements for
> adjacency_matrix. It works with adjacency_matrix<directedS>; there is
> no adjacency_matrix<bidirectionalS> because it isn't needed.
>
>     2 Doug,
>     Now I also can't use
>
>     template <typename MutableGraph>
>     bool read_graphviz(std::istream& in, MutableGraph& graph,
>                        dynamic_properties& dp,
>                        std::string const& node_id = "node_id") ;
>     function for the same type. I think because  of following
>     declaractions in  "adjacency_matrix.hpp"
>     [unimplemented add_vertex]
>     Will it be also implemented or how I can read my graph?
>
>
> Adding vertices to an adjacency_matrix is *extremely* expensive,
> requiring reallocation of the entire data structure. That
> functionality may be implemented at some point, but I won't be able to
> do it any time soon.
>
> Doug
>
Doug,
Thank you very  much!
Now my if_enabled() function compiles and works for
boost::adjacency_matrix<>.
I'm gonna define read_net() function for boost::adjacency_matrix<> just
by first read graph to appropriate boost::adjacency_list<>  and then  
construct matrix from list.
Is this approach ok?
Thank you once again,
--dima
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [BGL] there is no in_edges() function for adjacency_matrix<>

Doug Gregor-2

On Feb 7, 2006, at 11:33 AM, Dmitry Bufistov wrote:
> I'm gonna define read_net() function for boost::adjacency_matrix<> just
> by first read graph to appropriate boost::adjacency_list<>  and then
> construct matrix from list.
> Is this approach ok?

Yes, that should work.

        Doug

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users