/* * GraphEdge.hpp * * Created on: Feb 25, 2011 * Author: heber */ #ifndef GRAPHEDGE_HPP_ #define GRAPHEDGE_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif /** This class represents all features of a bond as used within graph * algorithms. */ class GraphEdge { public: /** Constructor. */ GraphEdge(); /** Destructor. */ virtual ~GraphEdge(); enum EdgeType { Undetermined, TreeEdge, BackEdge }; //!< edge type in a graph after Depth-First-Search analysis. enum Shading { white, lightgray, darkgray, black }; //!< color in Breadth-First-Search analysis bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis() enum EdgeType Type;//!< whether this is a tree or back edge /** Marks vertex as used in DFS. * \param color color to mark bond with * \return bond::Used, false if bond was already marked used */ bool MarkUsed(const enum Shading color); /** Returns whether vertex was used in DFS. * \return bond::Used */ enum Shading IsUsed(); /** Resets used flag in DFS. * \return bond::Used */ void ResetUsed(); /** Returns Shading as a char string. * \param color the Shading * \return string of the flag */ static std::string getColorName(enum Shading color); private: enum Shading Used; //!< marker in depth-first search, DepthFirstSearchAnalysis() }; #endif /* GRAPHEDGE_HPP_ */