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;
44 using IntegerMinMaxProperty::operator=;
46 static const std::string propertyTypename;
48 return propertyTypename;
50 DEFINE_GET_CPP_CLASS_NAME;
51 void setNodeValue(
const node n, tlp::StoredType<int>::ReturnedConstValue v)
override;
52 void setEdgeValue(
const edge e, tlp::StoredType<int>::ReturnedConstValue v)
override;
53 void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
55 void setValueToGraphNodes(tlp::StoredType<int>::ReturnedConstValue v,
56 const Graph *graph)
override;
57 void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
58 void setValueToGraphEdges(tlp::StoredType<int>::ReturnedConstValue v,
59 const Graph *graph)
override;
65 double getNodeDoubleValue(
const node n)
const override {
66 return getNodeValue(n);
68 double getNodeDoubleDefaultValue()
const override {
69 return getNodeDefaultValue();
71 double getNodeDoubleMin(
const Graph *g =
nullptr)
override {
74 double getNodeDoubleMax(
const Graph *g =
nullptr)
override {
77 double getEdgeDoubleValue(
const edge e)
const override {
78 return getEdgeValue(e);
80 double getEdgeDoubleDefaultValue()
const override {
81 return getEdgeDefaultValue();
83 double getEdgeDoubleMin(
const Graph *g =
nullptr)
override {
86 double getEdgeDoubleMax(
const Graph *g =
nullptr)
override {
90 void nodesUniformQuantification(
unsigned int)
override;
92 void edgesUniformQuantification(
unsigned int)
override;
94 NumericProperty *copyProperty(Graph *g)
override {
95 IntegerProperty *newProp =
new IntegerProperty(g);
103 AbstractProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> &)
override;
107 void treatEvent(
const Event &)
override;
115 :
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
117 using AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType>::operator=;
119 : AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
122 static const std::string propertyTypename;
124 return propertyTypename;
126 DEFINE_GET_CPP_CLASS_NAME;
A graph property that maps an integer value to graph elements.
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
int compare(const node n1, const node n2) const override
Compares the value this property holds for the two given nodes.
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
int compare(const edge e1, const edge e2) const override
Compares the value this property holds for the two given edges.
A graph property that maps a std::vector<int> value to graph elements.
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
Abstracts the computation of minimal and maximal values on node and edge values of properties.
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.