Evoplex
0.2.1
|
BaseNode implementation for undirected nodes. More...
#include <node_p.h>
Public Member Functions | |
UNode (const constructor_key &k, int id, const Attributes &attrs, float x, float y) | |
UNode (const constructor_key &k, int id, const Attributes &attrs) | |
NodePtr | clone () const override |
Creates a new std::shared_ptr<BaseNode> with the same data of the current Node. | |
const Edges & | inEdges () const override |
Gets the edges entering the node. | |
const Edges & | outEdges () const override |
Gets the edges leaving the node. | |
int | degree () const override |
Gets the node's degree. | |
int | inDegree () const override |
Gets the node's in-degree, i.e., the number of edges entering the node. | |
int | outDegree () const override |
Gets the node's out-degree, i.e., the number of edges leaving the node. | |
Public Member Functions inherited from evoplex::BaseNode | |
const Attributes & | attrs () const |
Gets all the node's Attributes. | |
const Value & | attr (int id) const |
Gets the value of the attribute at id . More... | |
Value | attr (const QString &name, Value defaultValue=Value()) const |
Gets the value corresponding to name . More... | |
void | setAttr (int id, const Value &value) |
Sets the value at id . More... | |
int | id () const |
Gets the node's id. | |
float | x () const |
Gets the node's x coordinate. | |
float | y () const |
Gets the node's y coordinate. | |
void | setX (float x) |
Sets the node's x coordinate. | |
void | setY (float y) |
Sets the node's y coordinate. | |
void | setCoords (float x, float y) |
Sets the node's coordinates. | |
Node | randNeighbour (PRG *prg) const |
Gets a random neighbour. More... | |
Public Member Functions inherited from evoplex::NodeInterface | |
virtual | ~NodeInterface ()=default |
Destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from evoplex::BaseNode | |
BaseNode (const constructor_key &, int id, const Attributes &attrs, float x, float y) | |
BaseNode (const constructor_key &k, int id, const Attributes &attr) | |
Protected Attributes inherited from evoplex::BaseNode | |
Edges | m_outEdges |