lemon/vf2pp.h
changeset 1409 c89884c1737b
parent 1408 b9fad0f9f8ab
child 1410 d9f79b81ef6c
equal deleted inserted replaced
2:2a949ca5a0d9 3:1b480369cc5f
   350       }
   350       }
   351     }
   351     }
   352 
   352 
   353 
   353 
   354     //we will find pairs for the nodes of g1 in this order
   354     //we will find pairs for the nodes of g1 in this order
   355     void setOrder(){
   355     void initOrder(){
   356       for(typename G2::NodeIt n2(_g2); n2!=INVALID; ++n2)
   356       for(typename G2::NodeIt n2(_g2); n2!=INVALID; ++n2)
   357         ++_labelTmp1[_intLabels2[n2]];
   357         ++_labelTmp1[_intLabels2[n2]];
   358 
   358 
   359       typename G1::template NodeMap<int> dm1(_g1,0);
   359       typename G1::template NodeMap<int> dm1(_g1,0);
   360       for(typename G1::EdgeIt e(_g1); e!=INVALID; ++e) {
   360       for(typename G1::EdgeIt e(_g1); e!=INVALID; ++e) {
   462       }
   462       }
   463       return false;
   463       return false;
   464     }
   464     }
   465 
   465 
   466     //calculate the lookup table for cutting the search tree
   466     //calculate the lookup table for cutting the search tree
   467     void setRNew1tRInOut1t(){
   467     void initRNew1tRInOut1t(){
   468       typename G1::template NodeMap<int> tmp(_g1,0);
   468       typename G1::template NodeMap<int> tmp(_g1,0);
   469       for(unsigned int i=0; i<_order.size(); ++i) {
   469       for(unsigned int i=0; i<_order.size(); ++i) {
   470         tmp[_order[i]]=-1;
   470         tmp[_order[i]]=-1;
   471         for(typename G1::IncEdgeIt e1(_g1,_order[i]); e1!=INVALID; ++e1) {
   471         for(typename G1::IncEdgeIt e1(_g1,_order[i]); e1!=INVALID; ++e1) {
   472           const typename G1::Node currNode=_g1.oppositeNode(_order[i],e1);
   472           const typename G1::Node currNode=_g1.oppositeNode(_order[i],e1);
   535       _rInOutLabels1(_g1), _intLabels1(intLabels1) ,_intLabels2(intLabels2),
   535       _rInOutLabels1(_g1), _intLabels1(intLabels1) ,_intLabels2(intLabels2),
   536       _maxLabel(getMaxLabel()), _labelTmp1(_maxLabel+1),_labelTmp2(_maxLabel+1),
   536       _maxLabel(getMaxLabel()), _labelTmp1(_maxLabel+1),_labelTmp2(_maxLabel+1),
   537       _mapping_type(SUBGRAPH), _deallocMappingAfterUse(0),
   537       _mapping_type(SUBGRAPH), _deallocMappingAfterUse(0),
   538       _deallocLabelsAfterUse(0)
   538       _deallocLabelsAfterUse(0)
   539     {
   539     {
   540       setOrder();
   540       initOrder();
   541       setRNew1tRInOut1t();
   541       initRNew1tRInOut1t();
   542 
   542 
   543       //reset mapping
   543       //reset mapping
   544       for(typename G1::NodeIt n(g1);n!=INVALID;++n)
   544       for(typename G1::NodeIt n(g1);n!=INVALID;++n)
   545         m[n]=INVALID;
   545         m[n]=INVALID;
   546     }
   546     }