23 #include <unordered_map> 25 #include <tulip/PropertyTypes.h> 26 #include <tulip/AbstractProperty.h> 27 #include <tulip/PropertyAlgorithm.h> 31 class PropertyContext;
33 typedef AbstractProperty<tlp::SizeType, tlp::SizeType> AbstractSizeProperty;
44 Size getMax(
const Graph *sg =
nullptr);
45 Size getMin(
const Graph *sg =
nullptr);
46 void scale(
const tlp::Vector<float, 3> &,
const Graph *sg =
nullptr);
51 static const std::string propertyTypename;
52 const std::string &getTypename()
const override {
53 return propertyTypename;
57 void setNodeValue(
const node n, tlp::StoredType<Size>::ReturnedConstValue v)
override;
58 void setAllNodeValue(tlp::StoredType<Size>::ReturnedConstValue v)
override;
59 void setValueToGraphNodes(tlp::StoredType<Size>::ReturnedConstValue v,
60 const Graph *graph)
override;
62 int compare(
const node n1,
const node n2)
const override;
68 std::unordered_map<unsigned int, Size> max, min;
69 std::unordered_map<unsigned int, bool> minMaxOk;
70 void computeMinMax(
const Graph *sg =
nullptr);
78 :
public AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType> {
81 : AbstractVectorProperty<SizeVectorType, SizeType>(g, n) {}
85 static const std::string propertyTypename;
86 const std::string &getTypename()
const override {
87 return propertyTypename;
Interface for Tulip iterators. Allows basic iteration operations only.
PropertyInterface describes the interface of a graph property.
The node struct represents a node in a Graph object.
A graph property that maps a tlp::Size value to graph elements.
A graph property that maps a std::vector<tlp::Size> value to graph elements.