66 template <
class coordType>
76 explicit EdgeLabel(
edge e,
int usedLabels = numberUsedLabels) : m_usedLabels(usedLabels), m_edge(e)
78 for(
int i = 0; i < m_numberLabelTypes; i++)
90 EdgeLabel(
edge e, coordType w[], coordType h[],
int usedLabels = numberUsedLabels) : m_usedLabels(usedLabels), m_edge(e)
92 for(
int i = 0; i < m_numberLabelTypes; i++)
101 EdgeLabel(
edge e, coordType w, coordType h,
int usedLabels) : m_usedLabels(usedLabels), m_edge(e)
103 for (
int i = 0; i < m_numberLabelTypes; i++)
104 if (m_usedLabels & (1 << i)) {
115 for(
int i = 0; i < m_numberLabelTypes; i++)
117 m_xPos[i] = rhs.
m_xPos[i];
118 m_yPos[i] = rhs.
m_yPos[i];
134 for(i = 0; i < m_numberLabelTypes; i++)
136 m_xPos[i] = rhs.
m_xPos[i];
137 m_yPos[i] = rhs.
m_yPos[i];
155 for (
int i = 0; i < m_numberLabelTypes; i++)
157 m_xPos[i] = rhs.
m_xPos[i];
158 m_yPos[i] = rhs.
m_yPos[i];
168 void setX(
LabelType elt, coordType x) { m_xPos[
static_cast<int>(elt)] = x; }
169 void setY(
LabelType elt, coordType y) { m_yPos[
static_cast<int>(elt)] = y; }
176 coordType
getX(
LabelType elt)
const {
return m_xPos[
static_cast<int>(elt)]; }
177 coordType
getY(
LabelType elt)
const {
return m_yPos[
static_cast<int>(elt)]; }
183 return ( m_usedLabels & (1 << static_cast<int>(elt)) ) > 0;
194 coordType m_xPos[m_numberLabelTypes];
195 coordType m_yPos[m_numberLabelTypes];
198 coordType m_xSize[m_numberLabelTypes];
199 coordType m_ySize[m_numberLabelTypes];
214 template <
class coordType>
237 m_distDefault = 0.002;
238 m_minFeatDist = 0.003;
260 return m_labels[e].getWidth(elt);
263 return m_labels[e].getHeight(elt);
EdgeArray< EdgeLabel< coordType > > m_labels
GraphAttributes & graph()
void setX(LabelType elt, coordType x)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
void setLabel(const edge &e, const EdgeLabel< coordType > &el)
int randomNumber(int low, int high)
Returns random integer between low and high (including).
bool usedLabel(LabelType elt) const
Dynamic arrays indexed with edges.
coordType getWidth(LabelType elt) const
EdgeLabel(edge e, coordType w[], coordType h[], int usedLabels=numberUsedLabels)
coordType m_ySize[m_numberLabelTypes]
coordType m_xSize[m_numberLabelTypes]
void addLabel(const edge &e, const EdgeLabel< coordType > &el)
Declaration of class PlanRepUML.
the number of available labels at an edge
EdgeLabel< coordType > & getLabel(edge e)
void setY(LabelType elt, coordType y)
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
coordType getX(LabelType elt) const
coordType & distDefault()
Declaration of class GridLayout.
Stores additional attributes of a graph (like layout information).
Planarized representation (of a connected component) of a UMLGraph; allows special handling of hierar...
coordType getWidth(edge e, LabelType elt)
Class for the representation of edges.
EdgeLabel & operator=(const EdgeLabel &rhs)
EdgeLabel(edge e, coordType w, coordType h, int usedLabels)
const Graph & constGraph() const
Returns a reference to the associated graph.
EdgeLabel & operator|=(const EdgeLabel &rhs)
coordType getY(LabelType elt) const
const Graph & original() const
Returns a reference to the original graph.
Declaration of class GridLayoutMapped which extends GridLayout by a grid mapping mechanism.
void setHeight(LabelType elt, coordType h)
coordType & minFeatDist()
ELabelInterface(PlanRepUML &pru)
void setWidth(LabelType elt, coordType w)
coordType m_yPos[m_numberLabelTypes]
coordType getHeight(LabelType elt) const
The namespace for all OGDF objects.
coordType getHeight(edge e, LabelType elt)
void addType(LabelType elt)
EdgeLabel(const EdgeLabel &rhs)
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
ELabelInterface(GraphAttributes ¨)
EdgeLabel(edge e, int usedLabels=numberUsedLabels)
coordType m_xPos[m_numberLabelTypes]