Changeset 1194:699c7eac2c6d in lemon for lemon/concepts/graph_components.h
 Timestamp:
 01/11/12 22:21:07 (8 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/concepts/graph_components.h
r1193 r1194 1207 1207 /// 1208 1208 /// This iterator goes through each red node. 1209 typedef GraphItemIt<BpGraph, RedNode> Red It;1209 typedef GraphItemIt<BpGraph, RedNode> RedNodeIt; 1210 1210 1211 1211 /// \brief This iterator goes through each blue node. 1212 1212 /// 1213 1213 /// This iterator goes through each blue node. 1214 typedef GraphItemIt<BpGraph, BlueNode> Blue It;1214 typedef GraphItemIt<BpGraph, BlueNode> BlueNodeIt; 1215 1215 1216 1216 /// @} … … 1229 1229 1230 1230 checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::RedNode>, 1231 typename _BpGraph::Red It>();1231 typename _BpGraph::RedNodeIt>(); 1232 1232 checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::BlueNode>, 1233 typename _BpGraph::Blue It>();1233 typename _BpGraph::BlueNodeIt>(); 1234 1234 } 1235 1235 … … 1716 1716 /// bipartite graphs. It extends \ref MappableGraphComponent with 1717 1717 /// the standard graph map class for red and blue nodes (\c 1718 /// RedMap and BlueMap). This concept is part of the BpGraph concept. 1718 /// RedNodeMap and BlueNodeMap). This concept is part of the 1719 /// BpGraph concept. 1719 1720 template <typename BAS = BaseBpGraphComponent> 1720 1721 class MappableBpGraphComponent : public MappableGraphComponent<BAS> { … … 1731 1732 /// It conforms to the ReferenceMap concept. 1732 1733 template <typename V> 1733 class Red Map : public GraphMap<MappableBpGraphComponent, Node, V> {1734 class RedNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> { 1734 1735 typedef GraphMap<MappableBpGraphComponent, Node, V> Parent; 1735 1736 … … 1738 1739 /// 1739 1740 /// Construct a new map for the graph. 1740 explicit Red Map(const MappableBpGraphComponent& graph)1741 explicit RedNodeMap(const MappableBpGraphComponent& graph) 1741 1742 : Parent(graph) {} 1742 1743 … … 1744 1745 /// 1745 1746 /// Construct a new map for the graph and initalize the values. 1746 Red Map(const MappableBpGraphComponent& graph, const V& value)1747 RedNodeMap(const MappableBpGraphComponent& graph, const V& value) 1747 1748 : Parent(graph, value) {} 1748 1749 … … 1751 1752 /// 1752 1753 /// Copy Constructor. 1753 Red Map(const RedMap& nm) : Parent(nm) {}1754 RedNodeMap(const RedNodeMap& nm) : Parent(nm) {} 1754 1755 1755 1756 /// \brief Assignment operator. … … 1757 1758 /// Assignment operator. 1758 1759 template <typename CMap> 1759 Red Map& operator=(const CMap&) {1760 RedNodeMap& operator=(const CMap&) { 1760 1761 checkConcept<ReadMap<Node, V>, CMap>(); 1761 1762 return *this; … … 1769 1770 /// It conforms to the ReferenceMap concept. 1770 1771 template <typename V> 1771 class Blue Map : public GraphMap<MappableBpGraphComponent, Node, V> {1772 class BlueNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> { 1772 1773 typedef GraphMap<MappableBpGraphComponent, Node, V> Parent; 1773 1774 … … 1776 1777 /// 1777 1778 /// Construct a new map for the graph. 1778 explicit Blue Map(const MappableBpGraphComponent& graph)1779 explicit BlueNodeMap(const MappableBpGraphComponent& graph) 1779 1780 : Parent(graph) {} 1780 1781 … … 1782 1783 /// 1783 1784 /// Construct a new map for the graph and initalize the values. 1784 Blue Map(const MappableBpGraphComponent& graph, const V& value)1785 BlueNodeMap(const MappableBpGraphComponent& graph, const V& value) 1785 1786 : Parent(graph, value) {} 1786 1787 … … 1789 1790 /// 1790 1791 /// Copy Constructor. 1791 Blue Map(const BlueMap& nm) : Parent(nm) {}1792 BlueNodeMap(const BlueNodeMap& nm) : Parent(nm) {} 1792 1793 1793 1794 /// \brief Assignment operator. … … 1795 1796 /// Assignment operator. 1796 1797 template <typename CMap> 1797 Blue Map& operator=(const CMap&) {1798 BlueNodeMap& operator=(const CMap&) { 1798 1799 checkConcept<ReadMap<Node, V>, CMap>(); 1799 1800 return *this; … … 1816 1817 1817 1818 { // int map test 1818 typedef typename _BpGraph::template RedMap<int> IntRedMap; 1819 typedef typename _BpGraph::template RedNodeMap<int> 1820 IntRedNodeMap; 1819 1821 checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, int>, 1820 IntRed Map >();1822 IntRedNodeMap >(); 1821 1823 } { // bool map test 1822 typedef typename _BpGraph::template RedMap<bool> BoolRedMap; 1824 typedef typename _BpGraph::template RedNodeMap<bool> 1825 BoolRedNodeMap; 1823 1826 checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, bool>, 1824 BoolRed Map >();1827 BoolRedNodeMap >(); 1825 1828 } { // Dummy map test 1826 typedef typename _BpGraph::template RedMap<Dummy> DummyRedMap; 1829 typedef typename _BpGraph::template RedNodeMap<Dummy> 1830 DummyRedNodeMap; 1827 1831 checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, Dummy>, 1828 DummyRed Map >();1832 DummyRedNodeMap >(); 1829 1833 } 1830 1834 1831 1835 { // int map test 1832 typedef typename _BpGraph::template BlueMap<int> IntBlueMap; 1836 typedef typename _BpGraph::template BlueNodeMap<int> 1837 IntBlueNodeMap; 1833 1838 checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, int>, 1834 IntBlue Map >();1839 IntBlueNodeMap >(); 1835 1840 } { // bool map test 1836 typedef typename _BpGraph::template BlueMap<bool> BoolBlueMap; 1841 typedef typename _BpGraph::template BlueNodeMap<bool> 1842 BoolBlueNodeMap; 1837 1843 checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, bool>, 1838 BoolBlue Map >();1844 BoolBlueNodeMap >(); 1839 1845 } { // Dummy map test 1840 typedef typename _BpGraph::template BlueMap<Dummy> DummyBlueMap; 1846 typedef typename _BpGraph::template BlueNodeMap<Dummy> 1847 DummyBlueNodeMap; 1841 1848 checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, Dummy>, 1842 DummyBlue Map >();1849 DummyBlueNodeMap >(); 1843 1850 } 1844 1851 }
Note: See TracChangeset
for help on using the changeset viewer.