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>
37 IntegerMinMaxProperty;
49 static const std::string propertyTypename;
50 const std::string &getTypename()
const override {
51 return propertyTypename;
53 void setNodeValue(
const node n, tlp::StoredType<int>::ReturnedConstValue v)
override;
54 void setEdgeValue(
const edge e, tlp::StoredType<int>::ReturnedConstValue v)
override;
55 void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
57 void setValueToGraphNodes(tlp::StoredType<int>::ReturnedConstValue v,
58 const Graph *graph)
override;
59 void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
60 void setValueToGraphEdges(tlp::StoredType<int>::ReturnedConstValue v,
61 const Graph *graph)
override;
63 int compare(
const node n1,
const node n2)
const override;
64 int compare(
const edge e1,
const edge e2)
const override;
67 double getNodeDoubleValue(
const node n)
const override {
68 return getNodeValue(n);
70 double getNodeDoubleDefaultValue()
const override {
71 return getNodeDefaultValue();
73 double getNodeDoubleMin(
const Graph *g =
nullptr)
override {
76 double getNodeDoubleMax(
const Graph *g =
nullptr)
override {
79 double getEdgeDoubleValue(
const edge e)
const override {
80 return getEdgeValue(e);
82 double getEdgeDoubleDefaultValue()
const override {
83 return getEdgeDefaultValue();
85 double getEdgeDoubleMin(
const Graph *g =
nullptr)
override {
88 double getEdgeDoubleMax(
const Graph *g =
nullptr)
override {
92 void nodesUniformQuantification(
unsigned int)
override;
94 void edgesUniformQuantification(
unsigned int)
override;
103 _DEPRECATED
void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v,
104 const Graph *graph)
override;
105 _DEPRECATED
void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v,
106 const Graph *graph)
override;
114 void treatEvent(
const Event &)
override;
122 :
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
125 : AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
128 static const std::string propertyTypename;
129 const std::string &getTypename()
const override {
130 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.