20 #ifndef TULIP_METRIC_H
21 #define TULIP_METRIC_H
23 #include <tulip/tuliphash.h>
24 #include <tulip/PropertyTypes.h>
25 #include <tulip/AbstractProperty.h>
26 #include <tulip/PropertyAlgorithm.h>
27 #include <tulip/minmaxproperty.h>
31 class PropertyContext;
33 typedef MinMaxProperty<tlp::DoubleType, tlp::DoubleType> DoubleMinMaxProperty;
42 void uniformQuantification(
unsigned int);
43 void nodesUniformQuantification(
unsigned int);
44 void edgesUniformQuantification(
unsigned int);
49 static const std::string propertyTypename;
51 return propertyTypename;
55 virtual void setNodeValue(
const node n,
const double &v);
56 virtual void setEdgeValue(
const edge e,
const double &v);
57 virtual void setAllNodeValue(
const double &v);
58 virtual void setAllEdgeValue(
const double &v);
60 enum PredefinedMetaValueCalculator {NO_CALC = 0, AVG_CALC = 1, SUM_CALC = 2,
61 MAX_CALC = 3, MIN_CALC = 4
65 virtual void setMetaValueCalculator(PropertyInterface::MetaValueCalculator* calc);
66 void setMetaValueCalculator(PredefinedMetaValueCalculator nodeCalc = AVG_CALC,
67 PredefinedMetaValueCalculator edgeCalc = AVG_CALC);
71 void treatEvent(
const Event&);
80 class TLP_SCOPE
DoubleVectorProperty:
public AbstractVectorProperty<tlp::DoubleVectorType, tlp::DoubleType> {
85 static const std::string propertyTypename;
87 return propertyTypename;