/* -*- C++ -*- * * src/lemon/concept/undir_graph_component.h - Part of LEMON, a generic * C++ optimization library * * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi * Kutatocsoport (Egervary Combinatorial Optimization Research Group, * EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ ///\ingroup concept ///\file ///\brief Undirected graphs and components of. #ifndef LEMON_CONCEPT_UNDIR_GRAPH_H #define LEMON_CONCEPT_UNDIR_GRAPH_H #include namespace lemon { namespace concept { /// \todo to be done class BaseIterableUndirGraph; template struct BaseIterableUndirGraphConcept { typedef typename Graph::UndirEdge UndirEdge; typedef typename Graph::Edge Edge; typedef typename Graph::Node Node; void constraints() { checkConcept(); checkConcept, UndirEdge >(); /// \bug this should be base_and_derived: UndirEdge ue = e; ue = e; Node n; n = graph.target(ue); n = graph.source(ue); graph.first(ue); graph.next(ue); } const Graph &graph; Edge e; }; template struct IterableUndirGraphConcept { void constraints() { /// \todo we don't need the iterable component should base iterable // checkConcept< BaseIterableUndirGraph, Graph > (); checkConcept< IterableGraphComponent, Graph > (); typedef typename Graph::UndirEdge UndirEdge; typedef typename Graph::UndirEdgeIt UndirEdgeIt; typedef typename Graph::UndirIncEdgeIt UndirIncEdgeIt; checkConcept< GraphIterator, UndirEdgeIt >(); checkConcept< GraphIncIterator, UndirIncEdgeIt >(); } }; } } #endif