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;
53 return propertyTypename;
55 DEFINE_GET_CPP_CLASS_NAME;
58 void setNodeValue(
const node n, tlp::StoredType<Size>::ReturnedConstValue v)
override;
59 void setAllNodeValue(tlp::StoredType<Size>::ReturnedConstValue v)
override;
60 void setValueToGraphNodes(tlp::StoredType<Size>::ReturnedConstValue v,
61 const Graph *graph)
override;
63 int compare(
const node n1,
const node n2)
const override;
69 std::unordered_map<unsigned int, Size> max, min;
70 std::unordered_map<unsigned int, bool> minMaxOk;
71 void computeMinMax(
const Graph *sg =
nullptr);
79 :
public AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType> {
82 : AbstractVectorProperty<SizeVectorType, SizeType>(g, n) {}
86 static const std::string propertyTypename;
88 return propertyTypename;
90 DEFINE_GET_CPP_CLASS_NAME;