Empirical
Public Member Functions | List of all members
emp::Graph::Node Class Reference

Information about nodes within a graph. More...

#include <Graph.h>

Public Member Functions

 Node (size_t num_nodes)
 What other node IDs is this one connected to? More...
 
 Node (const Node &in_node)
 
 ~Node ()
 
Nodeoperator= (const Node &in_node)
 Set this node to have the same connections as another node. More...
 
bool HasEdge (size_t to) const
 Is this node connect to a specific other node? More...
 
void AddEdge (size_t to)
 Add a connection between this node and another. More...
 
void AddEdgeSet (BitVector in_set)
 Add a full set of connections from this node to others. More...
 
void RemoveEdge (size_t to)
 Remove the connection (if there is one) between this node and another one. More...
 
void SetEdge (size_t to, bool val)
 Set whether a connection to another specific node should exist or not. More...
 
const BitVectorGetEdgeSet () const
 Get a BitVector representing which nodes this one is connected to. More...
 
void Resize (size_t new_size)
 Change the number of potential node connections that we are tracking. More...
 
void Clear ()
 Remove all edges from this node. More...
 
size_t GetDegree () const
 Identify how many other nodes this one is connected to. More...
 
size_t GetMaskedDegree (const BitVector &mask) const
 Identify how many other nodes from a provided set (a BitVector) this one is connected to. More...
 

Detailed Description

Information about nodes within a graph.

Constructor & Destructor Documentation

emp::Graph::Node::Node ( size_t  num_nodes)
inline

What other node IDs is this one connected to?

emp::Graph::Node::Node ( const Node in_node)
inline
emp::Graph::Node::~Node ( )
inline

Member Function Documentation

void emp::Graph::Node::AddEdge ( size_t  to)
inline

Add a connection between this node and another.

void emp::Graph::Node::AddEdgeSet ( BitVector  in_set)
inline

Add a full set of connections from this node to others.

void emp::Graph::Node::Clear ( )
inline

Remove all edges from this node.

size_t emp::Graph::Node::GetDegree ( ) const
inline

Identify how many other nodes this one is connected to.

const BitVector& emp::Graph::Node::GetEdgeSet ( ) const
inline

Get a BitVector representing which nodes this one is connected to.

size_t emp::Graph::Node::GetMaskedDegree ( const BitVector mask) const
inline

Identify how many other nodes from a provided set (a BitVector) this one is connected to.

bool emp::Graph::Node::HasEdge ( size_t  to) const
inline

Is this node connect to a specific other node?

Node& emp::Graph::Node::operator= ( const Node in_node)
inline

Set this node to have the same connections as another node.

void emp::Graph::Node::RemoveEdge ( size_t  to)
inline

Remove the connection (if there is one) between this node and another one.

void emp::Graph::Node::Resize ( size_t  new_size)
inline

Change the number of potential node connections that we are tracking.

void emp::Graph::Node::SetEdge ( size_t  to,
bool  val 
)
inline

Set whether a connection to another specific node should exist or not.


The documentation for this class was generated from the following file: