23 #include <tulip/tuliphash.h>
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;
43 using AbstractSizeProperty::operator=;
45 Size getMax(
const Graph *sg =
nullptr);
46 Size getMin(
const Graph *sg =
nullptr);
47 void scale(
const tlp::Vector<float, 3> &,
const Graph *sg =
nullptr);
52 static const std::string propertyTypename;
54 return propertyTypename;
56 DEFINE_GET_CPP_CLASS_NAME;
59 void setNodeValue(
const node n,
60 tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
61 void setAllNodeValue(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
62 void setValueToGraphNodes(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v,
63 const Graph *graph)
override;
71 tlp_hash_map<unsigned int, Size> max, min;
72 tlp_hash_map<unsigned int, bool> minMaxOk;
73 void computeMinMax(
const Graph *sg =
nullptr);
81 :
public AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType> {
84 : AbstractVectorProperty<SizeVectorType, SizeType>(g, n) {}
85 using AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType>::operator=;
89 static const std::string propertyTypename;
91 return propertyTypename;
93 DEFINE_GET_CPP_CLASS_NAME;
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.
A graph property that maps a tlp::Size 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...
int compare(const node n1, const node n2) const override
Compares the value this property holds for the two given nodes.
A graph property that maps a std::vector<tlp::Size> 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...
Interface for Tulip iterators. Allows basic iteration operations only.
The node struct represents a node in a Graph object.