|
Evoplex
0.2.1
|
Abstract base class for graph plugins. More...
#include <abstractgraph.h>
Public Member Functions | |
| const QString & | id () const |
| Gets the graph id. | |
| GraphType | type () const |
| Gets the graph type. | |
| bool | isDirected () const |
| Returns true if the graph is directed. | |
| bool | isUndirected () const |
| Returns true if the graph is undirected. | |
| const Edges & | edges () const |
| Gets the edges. | |
| const Edge & | edge (int edgeId) const |
Returns the Edge corresponding to edgeId. More... | |
| const Edge & | edge (int originId, int neighbourId) const |
Returns the Edge that connects originId to neighbourId. More... | |
| const Nodes & | nodes () const |
| Gets the nodes. | |
| Node | node (int nodeId) const |
Gets the Node corresponding to nodeId. More... | |
| Node | randNode () const |
| Gets a random Node in the graph. More... | |
| int | numNodes () const |
| Gets the number of nodes in the graph. | |
| int | numEdges () const |
| Gets the number of edges in the graph. | |
| Node | addNode (Attributes attr) |
Creates a Node with attrs and adds it into the graph. More... | |
| Node | addNode (Attributes attr, float x, float y) |
Creates a Node with attrs and adds it into the graph. More... | |
| Edge | addEdge (int originId, int neighbourId, Attributes *attrs=new Attributes()) |
| Creates and adds an Edge into the graph. More... | |
| Edge | addEdge (const Node &origin, const Node &neighbour, Attributes *attrs=new Attributes()) |
| Creates and adds an Edge into the graph. More... | |
| void | removeAllEdges () |
| Removes all edges of the graph. | |
| void | removeAllEdges (const Node &node) |
Removes all edges of the node. More... | |
| void | removeNode (const Node &node) |
Removes the node from the graph. More... | |
| Nodes::iterator | removeNode (Nodes::iterator it) |
| Removes a node from the graph. More... | |
| void | removeEdge (const Edge &edge) |
Removes the edge from the graph. More... | |
| Edges::iterator | removeEdge (Edges::iterator it) |
| Removes an edge from the graph. More... | |
Public Member Functions inherited from evoplex::AbstractGraphInterface | |
| virtual | ~AbstractGraphInterface ()=default |
| Provide a default destructor to keep compilers happy. | |
| virtual bool | reset ()=0 |
| Resets the graph object to the original state. More... | |
| virtual bool | init () |
| Initializes the plugin. More... | |
Public Member Functions inherited from evoplex::AbstractPlugin | |
| virtual bool | init () |
| Initializes the plugin. More... | |
| PRG * | prg () const |
| pseudo-random generator pointer. More... | |
| PRG * | rand () const |
| prg() alias More... | |
| const Attributes * | attrs () const |
| Gets the plugin's attributes. | |
| const QString & | attrName (int attrId) const |
Gets the attribute's name for attrId. More... | |
| const Value & | attr (int attrId) const |
Gets the attribute's value for attrId. More... | |
| Value | attr (const QString &name, Value defaultValue=Value()) const |
Gets the value of the attribute name. More... | |
| bool | attrExists (const char *name) const |
Checks if the plugin's attribute name exists. More... | |
| bool | attrExists (const QString &name) const |
Checks if the plugin's attribute name exists. More... | |
Protected Member Functions | |
| AbstractGraph () | |
| constructor | |
Protected Member Functions inherited from evoplex::AbstractPlugin | |
| AbstractPlugin ()=default | |
| constructor | |
| ~AbstractPlugin ()=default | |
| destructor | |
Protected Attributes | |
| AttrsGeneratorPtr | m_edgeAttrsGen |
| Edges | m_edges |
| Nodes | m_nodes |
Protected Attributes inherited from evoplex::AbstractPlugin | |
| Trial * | m_trial |
Friends | |
| class | Trial |
Abstract base class for graph plugins.
1.8.14