Evoplex
0.2.1
|
Groups all the base fuctions available for any graph plugin. More...
Functions | |
const QString & | evoplex::AbstractGraph::id () const |
Gets the graph id. | |
GraphType | evoplex::AbstractGraph::type () const |
Gets the graph type. | |
bool | evoplex::AbstractGraph::isDirected () const |
Returns true if the graph is directed. | |
bool | evoplex::AbstractGraph::isUndirected () const |
Returns true if the graph is undirected. | |
const Edges & | evoplex::AbstractGraph::edges () const |
Gets the edges. | |
const Edge & | evoplex::AbstractGraph::edge (int edgeId) const |
Returns the Edge corresponding to edgeId . More... | |
const Edge & | evoplex::AbstractGraph::edge (int originId, int neighbourId) const |
Returns the Edge that connects originId to neighbourId . More... | |
const Nodes & | evoplex::AbstractGraph::nodes () const |
Gets the nodes. | |
Node | evoplex::AbstractGraph::node (int nodeId) const |
Gets the Node corresponding to nodeId . More... | |
Node | evoplex::AbstractGraph::randNode () const |
Gets a random Node in the graph. More... | |
int | evoplex::AbstractGraph::numNodes () const |
Gets the number of nodes in the graph. | |
int | evoplex::AbstractGraph::numEdges () const |
Gets the number of edges in the graph. | |
Node | evoplex::AbstractGraph::addNode (Attributes attr) |
Creates a Node with attrs and adds it into the graph. More... | |
Node | evoplex::AbstractGraph::addNode (Attributes attr, float x, float y) |
Creates a Node with attrs and adds it into the graph. More... | |
Edge | evoplex::AbstractGraph::addEdge (int originId, int neighbourId, Attributes *attrs=new Attributes()) |
Creates and adds an Edge into the graph. More... | |
Edge | evoplex::AbstractGraph::addEdge (const Node &origin, const Node &neighbour, Attributes *attrs=new Attributes()) |
Creates and adds an Edge into the graph. More... | |
void | evoplex::AbstractGraph::removeAllEdges () |
Removes all edges of the graph. | |
void | evoplex::AbstractGraph::removeAllEdges (const Node &node) |
Removes all edges of the node . More... | |
void | evoplex::AbstractGraph::removeNode (const Node &node) |
Removes the node from the graph. More... | |
Nodes::iterator | evoplex::AbstractGraph::removeNode (Nodes::iterator it) |
Removes a node from the graph. More... | |
void | evoplex::AbstractGraph::removeEdge (const Edge &edge) |
Removes the edge from the graph. More... | |
Edges::iterator | evoplex::AbstractGraph::removeEdge (Edges::iterator it) |
Removes an edge from the graph. More... | |
Groups all the base fuctions available for any graph plugin.
For more information: https://evoplex.org/docs/creating-plugins
|
inline |
Edge evoplex::AbstractGraph::addEdge | ( | const Node & | origin, |
const Node & | neighbour, | ||
Attributes * | attrs = new Attributes() |
||
) |
|
inline |
Node evoplex::AbstractGraph::addNode | ( | Attributes | attr, |
float | x, | ||
float | y | ||
) |
|
inline |
Returns the Edge corresponding to edgeId
.
edgeId | A valid edge id. |
std::out_of_range | if no such data is present. |
|
inline |
Returns the Edge that connects originId
to neighbourId
.
originId | A valid node id. |
neighbourId | A valid node id. |
std::out_of_range | if no such data is present. |
|
inline |
Gets the Node corresponding to nodeId
.
nodeId | A valid node id. |
std::out_of_range | if no such data is present. |
Node evoplex::AbstractGraph::randNode | ( | ) | const |
void evoplex::AbstractGraph::removeAllEdges | ( | const Node & | node | ) |
Removes all edges of the node
.
node | A Node that belongs to the graph. |
void evoplex::AbstractGraph::removeEdge | ( | const Edge & | edge | ) |
Removes the edge
from the graph.
edge | An Edge that belongs to the graph. |
Edges::iterator evoplex::AbstractGraph::removeEdge | ( | Edges::iterator | it | ) |
void evoplex::AbstractGraph::removeNode | ( | const Node & | node | ) |
Removes the node
from the graph.
node | A Node that belongs to the graph. |
Nodes::iterator evoplex::AbstractGraph::removeNode | ( | Nodes::iterator | it | ) |