23#include <unordered_map>
25#include <tulip/PropertyTypes.h>
26#include <tulip/AbstractProperty.h>
27#include <tulip/PropertyAlgorithm.h>
33typedef 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;
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;
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.
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.
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
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.