Tulip
4.4.0
Better Visualization Through Research
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Groups
Pages
NumericProperty.h
1
/*
2
*
3
* This file is part of Tulip (www.tulip-software.org)
4
*
5
* Authors: David Auber and the Tulip development Team
6
* from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
7
*
8
* Tulip is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation, either version 3
11
* of the License, or (at your option) any later version.
12
*
13
* Tulip is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
* See the GNU General Public License for more details.
17
*
18
*/
19
20
#ifndef NUMERICPROPERTY_H
21
#define NUMERICPROPERTY_H
22
23
#include <tulip/PropertyInterface.h>
24
25
namespace
tlp {
26
27
/**
28
* @brief Interface all numerical properties.
29
* Property values are always returned as double
30
**/
31
class
NumericProperty
:
public
PropertyInterface
{
32
public
:
33
/**
34
* @brief Returns the value associated with the node n in this property.
35
* @param n The node for which we want to get the value of the property.
36
**/
37
virtual
double
getNodeDoubleValue
(
const
node
n)
const
=0;
38
39
/**
40
* @brief Gets the default node value of the property.
41
* @return The default value of nodes.
42
*/
43
virtual
double
getNodeDoubleDefaultValue
()
const
=0;
44
45
/**
46
* @brief Gets the minimum value on the nodes.
47
* @param graph The graph on which to compute.
48
* @return The minimal value on this graph for this property.
49
**/
50
virtual
double
getNodeDoubleMin
(
Graph
* graph = NULL)=0;
51
52
/**
53
* @brief Gets the maximum value on the nodes.
54
* @param graph The graph on which to compute.
55
* @return The maximal value on this graph for this property.
56
**/
57
virtual
double
getNodeDoubleMax
(
Graph
* graph = NULL)=0;
58
59
/**
60
* @brief Returns the value associated with the edge e in this property.
61
* @param e The edge for which we want to get the value of the property.
62
**/
63
virtual
double
getEdgeDoubleValue
(
const
edge
e)
const
=0;
64
65
/**
66
* @brief Gets the default edge value of the property.
67
* @return The default value of edges.
68
*/
69
virtual
double
getEdgeDoubleDefaultValue
()
const
=0;
70
71
/**
72
* @brief Gets the minimum value on the edges.
73
* @param graph The graph on which to compute.
74
* @return The minimal value on this graph for this property.
75
**/
76
virtual
double
getEdgeDoubleMin
(
Graph
* graph = NULL)=0;
77
78
/**
79
* @brief Gets the maximum value on the edges.
80
* @param graph The graph on which to compute.
81
* @return The maximal value on this graph for this property.
82
**/
83
virtual
double
getEdgeDoubleMax
(
Graph
* graph = NULL)=0;
84
85
/**
86
* @brief computes a uniform quantification for the nodes
87
* associated values
88
*/
89
virtual
void
nodesUniformQuantification
(
unsigned
int
)=0;
90
91
/**
92
* @brief computes a uniform quantification for the edges
93
* associated values
94
*/
95
virtual
void
edgesUniformQuantification
(
unsigned
int
)=0;
96
97
/**
98
* @brief computes a uniform quantification for the nodes/edges
99
* associated values
100
*/
101
void
uniformQuantification
(
unsigned
int
k) {
102
nodesUniformQuantification
(k);
103
edgesUniformQuantification
(k);
104
}
105
106
/**
107
* @brief Creates a property of the same type (e.g. tlp::DoubleProperty)
108
* The new property will not a copy of this property's values for all
109
* the elements of the graph
110
* @param graph The Graph in which to create the new property.
111
* @return The newly created property.
112
*/
113
virtual
NumericProperty
*
copyProperty
(
Graph
*graph) = 0;
114
};
115
116
}
117
118
#endif //NUMERICPROPERTY_H
library
tulip-core
include
tulip
NumericProperty.h
Generated on Tue Nov 19 2013 23:02:13 for Tulip by
1.8.2