Open
Graph Drawing
Framework
v.2012.07
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
Attraction.h
Go to the documentation of this file.
1
/*
2
* $Revision: 2523 $
3
*
4
* last checkin:
5
* $Author: gutwenger $
6
* $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7
***************************************************************/
8
44
#ifdef _MSC_VER
45
#pragma once
46
#endif
47
48
#ifndef OGDF_ATTRACTION_H
49
#define OGDF_ATTRACTION_H
50
51
52
#include <
ogdf/internal/energybased/NodePairEnergy.h
>
53
54
namespace
ogdf {
55
56
58
66
class
Attraction
:
public
NodePairEnergy
{
67
public
:
68
//Initializes data structures to speed up later computations
69
Attraction
(
GraphAttributes
&AG);
70
~Attraction
() {}
72
void
setPreferredEdgelength
(
double
l) {
m_preferredEdgeLength
= l;}
74
void
reinitializeEdgeLength
(
double
multi);
75
#ifdef OGDF_DEBUG
76
void
printInternalData()
const
;
77
#endif
78
private
:
80
static
const
double
MULTIPLIER
;
82
double
m_preferredEdgeLength
;
84
double
computeCoordEnergy
(
node
,
node
,
const
DPoint
&,
const
DPoint
&)
const
;
85
};
86
87
}
// namespace ogdf
88
89
#endif
ogdf
internal
energybased
Attraction.h
© 1999-2012 by
TU Dortmund
,
University of Jena
,
University of Cologne
,
University of Sydney
,
oreas GmbH