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,
53 tlp::StoredType<int>::ReturnedConstValue v);
54 virtual void setEdgeValue(
const edge e,
55 tlp::StoredType<int>::ReturnedConstValue v);
56 virtual void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v);
58 virtual void setValueToGraphNodes(tlp::StoredType<int>::ReturnedConstValue v,
const Graph *graph);
59 virtual void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v);
60 virtual void setValueToGraphEdges(tlp::StoredType<int>::ReturnedConstValue v,
const Graph *graph);
62 int compare(
const node n1,
const node n2)
const;
63 int compare(
const edge e1,
const edge e2)
const;
66 virtual double getNodeDoubleValue(
const node n)
const {
67 return (
double) getNodeValue(n);
69 virtual double getNodeDoubleDefaultValue()
const {
70 return (
double) getNodeDefaultValue();
72 virtual double getNodeDoubleMin(
const Graph* g = NULL) {
73 return (
double) getNodeMin(g);
75 virtual double getNodeDoubleMax(
const Graph* g = NULL) {
76 return (
double) getNodeMax(g);
78 virtual double getEdgeDoubleValue(
const edge e)
const {
79 return (
double) getEdgeValue(e);
81 virtual double getEdgeDoubleDefaultValue()
const {
82 return (
double) getEdgeDefaultValue();
84 virtual double getEdgeDoubleMin(
const Graph* g = NULL) {
85 return (
double) getEdgeMin(g);
87 virtual double getEdgeDoubleMax(
const Graph* g = NULL) {
88 return (
double) getEdgeMax(g);
91 void nodesUniformQuantification(
unsigned int);
93 void edgesUniformQuantification(
unsigned int);
102 _DEPRECATED
virtual void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v,
const Graph *graph);
103 _DEPRECATED
virtual void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v,
const Graph *graph);
110 void treatEvent(
const Event&);
119 IntegerVectorProperty(
Graph *g,
const std::string& n =
""):AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
122 static const std::string propertyTypename;
123 const std::string& getTypename()
const {
124 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.