Tulip  6.0.0
Large graphs analysis and drawing
tlp::NumericProperty Class Referenceabstract

#include <NumericProperty.h>

+ Inheritance diagram for tlp::NumericProperty:
+ Collaboration diagram for tlp::NumericProperty:

Public Member Functions

virtual NumericPropertycopyProperty (Graph *graph)=0
 
virtual void edgesUniformQuantification (unsigned int)=0
 
virtual double getEdgeDoubleDefaultValue () const =0
 
virtual double getEdgeDoubleMax (const Graph *graph=nullptr)=0
 
virtual double getEdgeDoubleMin (const Graph *graph=nullptr)=0
 
virtual double getEdgeDoubleValue (const edge e) const =0
 
virtual double getNodeDoubleDefaultValue () const =0
 
virtual double getNodeDoubleMax (const Graph *graph=nullptr)=0
 
virtual double getNodeDoubleMin (const Graph *graph=nullptr)=0
 
virtual double getNodeDoubleValue (const node n) const =0
 
virtual Iterator< edge > * getSortedEdges (const Graph *sg=nullptr, bool ascendingOrder=true)
 
virtual Iterator< edge > * getSortedEdgesByExtremitiesValues (const Graph *sg=nullptr, bool ascendingOrder=true)
 
virtual Iterator< edge > * getSortedEdgesBySourceValue (const Graph *sg=nullptr, bool ascendingOrder=true)
 
virtual Iterator< edge > * getSortedEdgesByTargetValue (const Graph *sg=nullptr, bool ascendingOrder=true)
 
virtual Iterator< node > * getSortedNodes (const Graph *sg=nullptr, bool ascendingOrder=true)
 
virtual void nodesUniformQuantification (unsigned int)=0
 
void uniformQuantification (unsigned int k)
 
- Public Member Functions inherited from tlp::PropertyInterface
virtual PropertyInterfaceclonePrototype (Graph *graph, const std::string &name) const =0
 
virtual int compare (const edge e1, const edge e2) const =0
 
virtual int compare (const node n1, const node n2) const =0
 
virtual void computeMetaValue (edge metaEdge, tlp::Iterator< edge > *it, Graph *metaGraph)=0
 
virtual void computeMetaValue (node metaNode, Graph *subgraph, Graph *metaGraph)=0
 
virtual bool copy (const edge destination, const edge source, PropertyInterface *property, bool ifNotDefault=false)=0
 
virtual bool copy (const node destination, const node source, PropertyInterface *property, bool ifNotDefault=false)=0
 
virtual void copy (PropertyInterface *source)=0
 
virtual unsigned int edgeValueSize () const =0
 
virtual void erase (const edge)=0
 
virtual void erase (const node)=0
 
virtual const std::string & getCppClassName () const =0
 
virtual DataMem * getEdgeDataMemValue (const edge e) const =0
 
virtual DataMem * getEdgeDefaultDataMemValue () const =0
 
virtual std::string getEdgeDefaultStringValue () const =0
 
virtual std::string getEdgeStringValue (const edge e) const =0
 
tlp::GraphgetGraph () const
 
MetaValueCalculatorgetMetaValueCalculator ()
 
const std::string & getName () const
 
virtual DataMem * getNodeDataMemValue (const node n) const =0
 
virtual DataMem * getNodeDefaultDataMemValue () const =0
 
virtual std::string getNodeDefaultStringValue () const =0
 
virtual std::string getNodeStringValue (const node n) const =0
 
virtual DataMem * getNonDefaultDataMemValue (const edge e) const =0
 
virtual DataMem * getNonDefaultDataMemValue (const node n) const =0
 
virtual tlp::Iterator< edge > * getNonDefaultValuatedEdges (const Graph *=nullptr) const =0
 
virtual tlp::Iterator< node > * getNonDefaultValuatedNodes (const Graph *=nullptr) const =0
 
virtual const std::string & getTypename () const =0
 
virtual bool hasNonDefaultValuatedEdges (const Graph *=nullptr) const =0
 
virtual bool hasNonDefaultValuatedNodes (const Graph *=nullptr) const =0
 
virtual unsigned int nodeValueSize () const =0
 
virtual unsigned int numberOfNonDefaultValuatedEdges (const Graph *=nullptr) const =0
 
virtual unsigned int numberOfNonDefaultValuatedNodes (const Graph *=nullptr) const =0
 
constexpr edgeStringValueRef operator[] (edge e)
 
std::string operator[] (edge e) const
 
constexpr nodeStringValueRef operator[] (node n)
 
virtual bool readEdgeDefaultValue (std::istream &)=0
 
virtual bool readEdgeValue (std::istream &, edge)=0
 
virtual bool readNodeDefaultValue (std::istream &)=0
 
virtual bool readNodeValue (std::istream &, node)=0
 
bool rename (const std::string &newName)
 
virtual void setAllEdgeDataMemValue (const DataMem *v)=0
 
virtual bool setAllEdgeStringValue (const std::string &value)=0
 
virtual void setAllNodeDataMemValue (const DataMem *value)=0
 
virtual bool setAllNodeStringValue (const std::string &value)=0
 
virtual void setEdgeDataMemValue (const edge e, const DataMem *v)=0
 
virtual bool setEdgeDefaultStringValue (const std::string &value)=0
 
virtual bool setEdgeStringValue (const edge e, const std::string &value)=0
 
virtual void setMetaValueCalculator (MetaValueCalculator *calculator)
 
virtual void setNodeDataMemValue (const node n, const DataMem *value)=0
 
virtual bool setNodeDefaultStringValue (const std::string &value)=0
 
virtual bool setNodeStringValue (const node n, const std::string &value)=0
 
virtual bool setStringValueToGraphEdges (const std::string &value, const Graph *graph)=0
 
virtual bool setStringValueToGraphNodes (const std::string &value, const Graph *graph)=0
 
virtual void writeEdgeDefaultValue (std::ostream &) const =0
 
virtual void writeEdgeValue (std::ostream &, edge) const =0
 
virtual void writeNodeDefaultValue (std::ostream &) const =0
 
virtual void writeNodeValue (std::ostream &, node) const =0
 
- Public Member Functions inherited from tlp::Observable
void addListener (Observable &listener) const
 
void addListener (Observable *const listener) const
 
void addObserver (Observable &observer) const
 
void addObserver (Observable *const observer) const
 
unsigned int countListeners () const
 
unsigned int countObservers () const
 
unsigned int getReceived () const
 
unsigned int getSent () const
 
void removeListener (Observable &listener) const
 
void removeListener (Observable *const listener) const
 
void removeObserver (Observable &observer) const
 
void removeObserver (Observable *const observer) const
 

Additional Inherited Members

- Static Public Member Functions inherited from tlp::Observable
static void disableEventNotification ()
 
static void enableEventNotification ()
 
static tlp::node getNode (const tlp::Observable *obs)
 
static ObservablegetObject (tlp::node n)
 
static const tlp::VectorGraph & getObservableGraph ()
 
static unsigned int getScheduled (tlp::node n)
 
static void holdObservers ()
 
static bool isAlive (tlp::node n)
 
static unsigned int observersHoldCounter ()
 
static void unholdObservers ()
 
- Protected Member Functions inherited from tlp::PropertyInterface
void notifyAfterSetAllEdgeValue ()
 
void notifyAfterSetAllNodeValue ()
 
void notifyAfterSetEdgeValue (const edge e)
 
void notifyAfterSetNodeValue (const node n)
 
void notifyBeforeSetAllEdgeValue ()
 
void notifyBeforeSetAllNodeValue ()
 
void notifyBeforeSetEdgeValue (const edge e)
 
void notifyBeforeSetNodeValue (const node n)
 
void notifyDestroy ()
 
void notifyRename (const std::string &newName)
 
- Protected Member Functions inherited from tlp::Observable
 Observable (const Observable &)
 
bool hasOnlookers () const
 
void observableDeleted ()
 
Observableoperator= (const Observable &)
 
void sendEvent (const Event &message)
 
virtual void treatEvent (const Event &message)
 
virtual void treatEvents (const std::vector< Event > &events)
 
- Protected Attributes inherited from tlp::PropertyInterface
Graphgraph
 
MetaValueCalculatormetaValueCalculator
 
std::string name
 

Detailed Description

Interface all numerical properties. Property values are always returned as double.

Definition at line 31 of file NumericProperty.h.

Member Function Documentation

◆ copyProperty()

virtual NumericProperty* tlp::NumericProperty::copyProperty ( Graph graph)
pure virtual

Creates a property of the same type (e.g. tlp::DoubleProperty) The new property will be a copy of this property's values for all the elements of the graph.

Parameters
graphThe Graph in which to create the new property.
Returns
The newly created property.

◆ edgesUniformQuantification()

virtual void tlp::NumericProperty::edgesUniformQuantification ( unsigned int  )
pure virtual

computes a uniform quantification for the edges associated values

◆ getEdgeDoubleDefaultValue()

virtual double tlp::NumericProperty::getEdgeDoubleDefaultValue ( ) const
pure virtual

Gets the default edge value of the property.

Returns
The default value of edges.

◆ getEdgeDoubleMax()

virtual double tlp::NumericProperty::getEdgeDoubleMax ( const Graph graph = nullptr)
pure virtual

Gets the maximum value on the edges.

Parameters
graphThe graph on which to compute.
Returns
The maximal value on this graph for this property.

◆ getEdgeDoubleMin()

virtual double tlp::NumericProperty::getEdgeDoubleMin ( const Graph graph = nullptr)
pure virtual

Gets the minimum value on the edges.

Parameters
graphThe graph on which to compute.
Returns
The minimal value on this graph for this property.

◆ getEdgeDoubleValue()

virtual double tlp::NumericProperty::getEdgeDoubleValue ( const edge  e) const
pure virtual

Returns the value associated with the edge e in this property.

Parameters
eThe edge for which we want to get the value of the property.

◆ getNodeDoubleDefaultValue()

virtual double tlp::NumericProperty::getNodeDoubleDefaultValue ( ) const
pure virtual

Gets the default node value of the property.

Returns
The default value of nodes.

◆ getNodeDoubleMax()

virtual double tlp::NumericProperty::getNodeDoubleMax ( const Graph graph = nullptr)
pure virtual

Gets the maximum value on the nodes.

Parameters
graphThe graph on which to compute.
Returns
The maximal value on this graph for this property.

◆ getNodeDoubleMin()

virtual double tlp::NumericProperty::getNodeDoubleMin ( const Graph graph = nullptr)
pure virtual

Gets the minimum value on the nodes.

Parameters
graphThe graph on which to compute.
Returns
The minimal value on this graph for this property.

◆ getNodeDoubleValue()

virtual double tlp::NumericProperty::getNodeDoubleValue ( const node  n) const
pure virtual

Returns the value associated with the node n in this property.

Parameters
nThe node for which we want to get the value of the property.

◆ getSortedEdges()

virtual Iterator<edge>* tlp::NumericProperty::getSortedEdges ( const Graph sg = nullptr,
bool  ascendingOrder = true 
)
virtual

Gets an iterator sorting edges according to their values in that numeric property.

Since
Tulip 4.8
Parameters
sgIf provided, returns an iterator on the subset of edges defined by that subgraph.
ascendingOrderdefines the sort ordering (ascending or descending).
Returns
An iterator over graph edges.

◆ getSortedEdgesByExtremitiesValues()

virtual Iterator<edge>* tlp::NumericProperty::getSortedEdgesByExtremitiesValues ( const Graph sg = nullptr,
bool  ascendingOrder = true 
)
virtual

Gets an iterator sorting edges according to the values of their extremities in that numeric property. Vectors of two numbers (first element being the source node value, second one the target node value) are compared in that case.

Since
Tulip 4.8
Parameters
sgIf provided, returns an iterator on the subset of edges defined by that subgraph.
ascendingOrderdefines the sort ordering (ascending or descending).
Returns
An iterator over graph edges.

◆ getSortedEdgesBySourceValue()

virtual Iterator<edge>* tlp::NumericProperty::getSortedEdgesBySourceValue ( const Graph sg = nullptr,
bool  ascendingOrder = true 
)
virtual

Gets an iterator sorting edges according to the values of their source nodes in that numeric property.

Since
Tulip 4.8
Parameters
sgIf provided, returns an iterator on the subset of edges defined by that subgraph.
ascendingOrderdefines the sort ordering (ascending or descending).
Returns
An iterator over graph edges.

◆ getSortedEdgesByTargetValue()

virtual Iterator<edge>* tlp::NumericProperty::getSortedEdgesByTargetValue ( const Graph sg = nullptr,
bool  ascendingOrder = true 
)
virtual

Gets an iterator sorting edges according to the values of their target nodes in that numeric property.

Since
Tulip 4.8
Parameters
sgIf provided, returns an iterator on the subset of edges defined by that subgraph.
ascendingOrderdefines the sort ordering (ascending or descending).
Returns
An iterator over graph edges.

◆ getSortedNodes()

virtual Iterator<node>* tlp::NumericProperty::getSortedNodes ( const Graph sg = nullptr,
bool  ascendingOrder = true 
)
virtual

Gets an iterator sorting nodes according to their values in that numeric property.

Since
Tulip 4.8
Parameters
sgIf provided, returns an iterator on the subset of nodes defined by that subgraph.
Returns
An iterator over graph nodes.

◆ nodesUniformQuantification()

virtual void tlp::NumericProperty::nodesUniformQuantification ( unsigned int  )
pure virtual

computes a uniform quantification for the nodes associated values

◆ uniformQuantification()

void tlp::NumericProperty::uniformQuantification ( unsigned int  k)
inline

computes a uniform quantification for the nodes/edges associated values

Definition at line 101 of file NumericProperty.h.