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,
59 tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
60 void setAllNodeValue(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
61 void setValueToGraphNodes(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v,
62 const Graph *graph)
override;
64 int compare(
const node n1,
const node n2)
const override;
70 std::unordered_map<unsigned int, Size> max, min;
71 std::unordered_map<unsigned int, bool> minMaxOk;
72 void computeMinMax(
const Graph *sg =
nullptr);
80 :
public AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType> {
83 : AbstractVectorProperty<SizeVectorType, SizeType>(g, n) {}
87 static const std::string propertyTypename;
89 return propertyTypename;
91 DEFINE_GET_CPP_CLASS_NAME;