|
dyng
DynamicGraphLayout
|
19 #include "identifiers.h"
20 #include "container.h"
40 template<
typename ConnectedNode>
55 edge_id id()
const {
return m_id; }
58 bool is_new()
const {
return m_newly_added; }
61 void is_new(
bool value) { m_newly_added = value; }
64 bool is_old()
const {
return m_to_be_deleted; }
67 void is_old(
bool value) { m_to_be_deleted = value; }
76 float alpha()
const {
return m_alpha; }
79 void alpha(
float value) { m_alpha = value; }
82 ConnectedNode&
node_one() {
return m_container->at(m_one); }
85 const ConnectedNode&
node_one()
const {
return m_container->at(m_one); }
88 ConnectedNode&
node_two() {
return m_container->at(m_two); }
91 const ConnectedNode&
node_two()
const {
return m_container->at(m_two); }
112 bool m_newly_added =
false;
113 bool m_to_be_deleted =
false;
void alpha(float value)
Sets the current alpha value.
Definition: edge.h:79
void is_new(bool value)
Sets if the node is new in its current state.
Definition: edge.h:61
Type used as an identifier for edges.
Definition: identifiers.h:87
ConnectedNode & node_one()
Returns a reference to one connected node.
Definition: edge.h:82
node_id one_id() const
Returns the id of one connected node.
Definition: edge.h:50
void set_ptr(detail::container< ConnectedNode, node_id > *cont)
Sets the pointer to the object detail::container.
Definition: edge.h:103
Contains a vector of graph entities and a map to them.
Definition: container.h:34
basic_edge(edge_id id, node_id one, node_id two)
Sets the id of the edge and ids of two connected nodes.
Definition: edge.h:44
bool is_new() const
Returns if the edge is new in its current state.
Definition: edge.h:58
const ConnectedNode & node_one() const
Returns a const reference to one connected node.
Definition: edge.h:85
void is_old(bool value)
Sets if the node is going to be deleted in the next state.
Definition: edge.h:67
float alpha() const
Returns current alpha value.
Definition: edge.h:76
node_id two_id() const
Returns the id of the other connected node.
Definition: edge.h:53
ConnectedNode & node_two()
Returns a reference to the other connected node.
Definition: edge.h:88
const ConnectedNode & node_two() const
Returns a const reference to the other connected node.
Definition: edge.h:91
bool is_old() const
Returns if the edge is going to be deleted in the next state.
Definition: edge.h:64
edge(edge_id id, node_id one, node_id two)
Sets the id of the edge and ids of two connected nodes.
Definition: edge.h:122
Type used as an identifier for nodes.
Definition: identifiers.h:77