Boost logo

Boost Users :

From: Dmitry Bufistov (dmitry_at_[hidden])
Date: 2006-02-06 08:04:18


Hi,
A huge disappointment again came to me today. I used
boost::adjacency<boost::directedS> class for representation of simple
Petri net. I was trying to define the following function
//////////////////////////////////////////
bool if_enabled(transition_descriptor_t tr, graph_t net) {
                assert((net[tr].m_node_type == TRANSITION) &&
"if_enabled called with non transition node");

                BGL_FORALL_INEDGES_T(tr, ed, net, graph_t)
                {
                    if (net[boost::source(ed, net)].m_tokens_number <
net[ed].m_weight) return false;
                }
                return true;
            }

//////////////////////////////////////////////////////////
But I failed because of lack of boost::in_edges() function
specialization for type that I've chosen.
Am I doing something wrong?
Any ideas how to implement my function in resonable way would be greatly
appreciated.
Note: all works fine with "adjacency_list<vecS, vecS, bidirecrionalS>"

Many thanks in advance,
--dima


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net