123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- #ifndef RELAXINTEREDGES_H
- #define RELAXINTEREDGES_H
- #include "ClusteredSpringEmbedder.h"
- #include "MembershipInitializer.h"
- #include <HierarchicalLayoutGenerator/HierarchicalLayouter.h>
- #include <Common/LayoutEnum.h>
- #include <Common/GraphType.h>
- #include <ForceBasedLayout/Reingold.h>
- #include <boost/geometry.hpp>
- #include <boost/geometry/geometries/segment.hpp>
- #include <boost/geometry/algorithms/intersection.hpp>
- #include <ForceBasedLayout/Postprocessing.h>
- /**
- * @brief The RelaxInterEdges class
- *
- * The class provides helpers to manage inter-subgraph edge in graph; used in force directed layout to stabilize edges crossing clusters.
- */
- class RelaxInterEdges
- {
- public:
- BoostGraphWrapper m_bGraphWrapper; /*!< Single object for accessing properties */
- /** @name Creators
- * The methods under this section are responsible for constructing
- * an instance of type RelaxInterEdges.
- */
- //@{
- /**
- Constructs new object of type RelaxInterEdges.
- @pre none
- @param none
- @return none
- @throw none
- */
- RelaxInterEdges();
- //@}
- /** @name Modifiers
- * The methods under this section are responsible for modifying
- * an instance of RelaxInterEdges.
- */
- //@{
- /** Calculates and sets displacement of vertices when one vertex is
- * in outermost graph and other is in its immediate subgraph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param vTarget
- Target Vertex Discriptor
- @param iOuterIntersect
- Pointer to outer intersect points.
- @return none
- @throw none
- */
- void interEdgesCaseOne(SubGraph& gMaingraph,VertexDescriptor& vSource,
- VertexDescriptor& vTarget,int* iOuterIntersect);
- /** Calculates and sets displacement of vertices when Source vertex is
- * in outermost graph and other is in its non-immediate subgraph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param vTarget
- Target Vertex Discriptor
- @param gTarget
- pointer to target graph
- @param iOuterIntersect
- Pointer to outer intersect points.
- @return none
- @throw none
- */
- void interEdgesCaseTwoSourceOuter(SubGraph& gMaingraph,
- VertexDescriptor& vSource,VertexDescriptor& vTarget,
- int* iOuterIntersect,SubGraph* gTarget);
- /** Calculates and sets displacement of vertices when Target vertex is
- * in outermost graph and other is in its non-immediate subgraph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param vTarget
- Target Vertex Discriptor
- @param iOuterIntersect
- Pointer to outer intersect points.
- @param gTarget
- pointer to target graph
- @return none
- @throw LayoutException
- */
- void interEdgesCaseTwoSourceInner(SubGraph& gMaingraph,
- VertexDescriptor& vSource,VertexDescriptor& vTarget,
- int* iOuterIntersect,SubGraph* gTarget);
- /** Calculates and sets displacement of vertices when both Source vertex is
- * and other is in some overlapping graph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param vTarget
- Target Vertex Discriptor
- @param gTarget
- Pointer to target graph
- @param iSourceGraphId
- GraphId of source graph.
- @return none
- @throw LayoutException
- */
- void OverLapCaseSourceOuter(SubGraph& gMaingraph, VertexDescriptor& vSource,
- VertexDescriptor& vTarget,SubGraph* gTarget,int iSourceGraphId);
- /** Calculates and sets displacement of vertices when both Source vertex is
- * and other is in some overlapping graph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param gSource
- Pointer Source graph
- @param vTarget
- Target Vertex Discriptor
- @param iTargetGraphId
- GraphId of target graph.
- @return none
- @throw LayoutException
- */
- void OverLapCaseSourceInner(SubGraph& gMaingraph,VertexDescriptor& vSource,
- VertexDescriptor& vTarget,
- SubGraph* gSource,int iTargetGraphId);
- /** Calculates and sets displacement of vertices when both Source vertex is
- * and other is in some overlapping graph.
- @pre
- -# gMaingraph != NULL
- @param gMaingraph
- reference to graph
- @param vSource
- Source Vertex Discriptor
- @param gSource
- Pointer to Source graph
- @param gTarget
- Pointer to Target graph
- @param vTarget
- Target Vertex Discriptor
- @return none
- @throw LayoutException
- */
- void nonOverLapCase(SubGraph& gMaingraph,VertexDescriptor& vSource,
- VertexDescriptor& vTarget,SubGraph* gSource, SubGraph* gTarget);
- //@}
- };
- #endif // RELAXINTEREDGES_H
|