23 #include <tulip/PropertyTypes.h> 24 #include <tulip/AbstractProperty.h> 25 #include <tulip/minmaxproperty.h> 26 #include <tulip/NumericProperty.h> 31 class PropertyContext;
33 typedef MinMaxProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty>
34 IntegerMinMaxProperty;
46 static const std::string propertyTypename;
47 const std::string &getTypename()
const override {
48 return propertyTypename;
50 void setNodeValue(
const node n, tlp::StoredType<int>::ReturnedConstValue v)
override;
51 void setEdgeValue(
const edge e, tlp::StoredType<int>::ReturnedConstValue v)
override;
52 void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
54 void setValueToGraphNodes(tlp::StoredType<int>::ReturnedConstValue v,
55 const Graph *graph)
override;
56 void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
57 void setValueToGraphEdges(tlp::StoredType<int>::ReturnedConstValue v,
58 const Graph *graph)
override;
60 int compare(
const node n1,
const node n2)
const override;
61 int compare(
const edge e1,
const edge e2)
const override;
64 double getNodeDoubleValue(
const node n)
const override {
65 return getNodeValue(n);
67 double getNodeDoubleDefaultValue()
const override {
68 return getNodeDefaultValue();
70 double getNodeDoubleMin(
const Graph *g =
nullptr)
override {
73 double getNodeDoubleMax(
const Graph *g =
nullptr)
override {
76 double getEdgeDoubleValue(
const edge e)
const override {
77 return getEdgeValue(e);
79 double getEdgeDoubleDefaultValue()
const override {
80 return getEdgeDefaultValue();
82 double getEdgeDoubleMin(
const Graph *g =
nullptr)
override {
85 double getEdgeDoubleMax(
const Graph *g =
nullptr)
override {
89 void nodesUniformQuantification(
unsigned int)
override;
91 void edgesUniformQuantification(
unsigned int)
override;
106 void treatEvent(
const Event &)
override;
114 :
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
117 : AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
120 static const std::string propertyTypename;
121 const std::string &getTypename()
const override {
122 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.