Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/graph.hpp

    re138de rd4103c8  
    2727class molecule;
    2828
    29 class Graph;
    3029class SubGraph;
    3130class Node;
     
    3433/********************************************** definitions *********************************/
    3534
    36 #define NodeMap pair < int, class Node* >
    37 #define EdgeMap multimap < class Node*, class Edge* >
     35typedef std::pair < int, class Node* > NodeMap;
     36typedef std::multimap < class Node*, class Edge* > EdgeMap;
    3837
    39 #define KeyStack deque<int>
    40 #define KeySet set<int>
    41 #define NumberValuePair pair<int, double>
    42 #define Graph map <KeySet, NumberValuePair, KeyCompare >
    43 #define GraphPair pair <KeySet, NumberValuePair >
    44 #define KeySetTestPair pair<KeySet::iterator, bool>
    45 #define GraphTestPair pair<Graph::iterator, bool>
     38typedef std::deque<int> KeyStack;
     39typedef std::set<int> KeySet;
     40typedef std::pair<int, double> NumberValuePair;
    4641
    47 
    48 /******************************** Some small functions and/or structures **********************************/
    49 
     42// needed for definition of Graph and GraphTestPair
    5043struct KeyCompare
    5144{
    5245  bool operator() (const KeySet SubgraphA, const KeySet SubgraphB) const;
    5346};
     47
     48typedef std::map <KeySet, NumberValuePair, KeyCompare > Graph;
     49typedef std::pair <KeySet, NumberValuePair > GraphPair;
     50typedef std::pair<KeySet::iterator, bool> KeySetTestPair;
     51typedef std::pair<Graph::iterator, bool> GraphTestPair;
     52
     53
     54/******************************** Some small functions and/or structures **********************************/
    5455
    5556//bool operator < (KeySet SubgraphA, KeySet SubgraphB);   //note: this declaration is important, otherwise normal < is used (producing wrong order)
Note: See TracChangeset for help on using the changeset viewer.