23 #include <tulip/tuliphash.h> 24 #include <tulip/PropertyTypes.h> 25 #include <tulip/AbstractProperty.h> 26 #include <tulip/PropertyAlgorithm.h> 27 #include <tulip/Observable.h> 28 #include <tulip/minmaxproperty.h> 29 #include <tulip/NumericProperty.h> 34 class PropertyContext;
36 typedef MinMaxProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> IntegerMinMaxProperty;
48 static const std::string propertyTypename;
49 const std::string& getTypename()
const {
50 return propertyTypename;
52 virtual void setNodeValue(
const node n,
const int &v);
53 virtual void setEdgeValue(
const edge e,
const int &v);
54 virtual void setAllNodeValue(
const int &v,
const Graph *graph = NULL);
55 virtual void setAllEdgeValue(
const int &v,
const Graph *graph = NULL);
57 int compare(
const node n1,
const node n2)
const;
58 int compare(
const edge e1,
const edge e2)
const;
61 virtual double getNodeDoubleValue(
const node n)
const {
62 return (
double) getNodeValue(n);
64 virtual double getNodeDoubleDefaultValue()
const {
65 return (
double) getNodeDefaultValue();
67 virtual double getNodeDoubleMin(
const Graph* g = NULL) {
68 return (
double) getNodeMin(g);
70 virtual double getNodeDoubleMax(
const Graph* g = NULL) {
71 return (
double) getNodeMax(g);
73 virtual double getEdgeDoubleValue(
const edge e)
const {
74 return (
double) getEdgeValue(e);
76 virtual double getEdgeDoubleDefaultValue()
const {
77 return (
double) getEdgeDefaultValue();
79 virtual double getEdgeDoubleMin(
const Graph* g = NULL) {
80 return (
double) getEdgeMin(g);
82 virtual double getEdgeDoubleMax(
const Graph* g = NULL) {
83 return (
double) getEdgeMax(g);
86 void nodesUniformQuantification(
unsigned int);
88 void edgesUniformQuantification(
unsigned int);
102 void treatEvent(
const Event&);
111 IntegerVectorProperty(
Graph *g,
const std::string& n =
""):AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
114 static const std::string propertyTypename;
115 const std::string& getTypename()
const {
116 return propertyTypename;
This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edg...
PropertyInterface describes the interface of a graph property.
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.
A graph property that maps a std::vector<int> value to graph elements.
Event is the base class for all events used in the Observation mechanism.
Interface all numerical properties. Property values are always returned as double.
A graph property that maps an integer value to graph elements.