GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
LatticeGraph::Node Class Reference

#include <node.h>

Public Member Functions

 Node ()
 
 ~Node ()
 
 Node (Vtx::Vortex &data)
 
unsigned int getUid ()
 Get vortex (node) UID. More...
 
unsigned int & getSuid ()
 Get vortex (node) static UID for new UID generation. More...
 
Vtx::VortexgetData ()
 Get vortex (node) data struct. More...
 
std::vector< std::weak_ptr< Edge > > & getEdges ()
 Get all connected edges to vortex (node) More...
 
std::weak_ptr< EdgegetEdge (int idx)
 Get edge at index idx. Assumes indices exist. More...
 
std::shared_ptr< NodegetConnectedNode (std::shared_ptr< Edge > e)
 Get the node on the other side of the edge e. More...
 
void getConnectedNodes (unsigned int &nodes)
 Get all connected nodes to the current vortex. PassByRef. More...
 
void setData (Vtx::Vortex &data)
 Set the vortex data (in node) More...
 
void addEdge (std::weak_ptr< Edge > e)
 Add edge e to the current vortex (node) More...
 
void removeEdge (std::shared_ptr< Node > n)
 Remove edge connecting this to Node n. More...
 
void removeEdgeUid (unsigned int uid)
 Remove edge with UID uid. More...
 
void removeEdgeIdx (unsigned int idx)
 Remove edge with index idx. More...
 
void removeEdge (std::weak_ptr< Edge > e)
 Remove edge e directly. More...
 
void removeEdges ()
 Remove all connected edges. More...
 

Public Attributes

unsigned int uid
 

Detailed Description

Definition at line 32 of file node.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

LatticeGraph::Node::Node ( )

◆ ~Node()

LatticeGraph::Node::~Node ( )

◆ Node() [2/2]

LatticeGraph::Node::Node ( Vtx::Vortex data)

Member Function Documentation

◆ addEdge()

void LatticeGraph::Node::addEdge ( std::weak_ptr< Edge e)

Add edge e to the current vortex (node)

Parameters
eWeak pointer to the edge to add

◆ getConnectedNode()

std::shared_ptr<Node> LatticeGraph::Node::getConnectedNode ( std::shared_ptr< Edge e)

Get the node on the other side of the edge e.

Parameters
eEdge sharing connection with required node
Returns
Share pointer to connected vortex (node)

◆ getConnectedNodes()

void LatticeGraph::Node::getConnectedNodes ( unsigned int &  nodes)

Get all connected nodes to the current vortex. PassByRef.

Parameters
&nodesPass by reference location for nodes result

◆ getData()

Vtx::Vortex& LatticeGraph::Node::getData ( )

Get vortex (node) data struct.

Returns
Vortex data struct

◆ getEdge()

std::weak_ptr<Edge> LatticeGraph::Node::getEdge ( int  idx)

Get edge at index idx. Assumes indices exist.

Parameters
idxIndex of the requested edge
Returns
Vector of weak pointers to the requested edge at index idx

◆ getEdges()

std::vector<std::weak_ptr <Edge> >& LatticeGraph::Node::getEdges ( )

Get all connected edges to vortex (node)

Returns
Vector of weak pointers to the connected edges

◆ getSuid()

unsigned int& LatticeGraph::Node::getSuid ( )

Get vortex (node) static UID for new UID generation.

Returns
Static class UID

◆ getUid()

unsigned int LatticeGraph::Node::getUid ( )

Get vortex (node) UID.

Returns
Vortex UID

◆ removeEdge() [1/2]

void LatticeGraph::Node::removeEdge ( std::shared_ptr< Node n)

Remove edge connecting this to Node n.

Parameters
nShared pointer to vortex (node) edge connected with.

◆ removeEdge() [2/2]

void LatticeGraph::Node::removeEdge ( std::weak_ptr< Edge e)

Remove edge e directly.

Parameters
eShared pointer to edge for removal

◆ removeEdgeIdx()

void LatticeGraph::Node::removeEdgeIdx ( unsigned int  idx)

Remove edge with index idx.

Parameters
idxIndex of the requested edge to remove

◆ removeEdges()

void LatticeGraph::Node::removeEdges ( )

Remove all connected edges.

◆ removeEdgeUid()

void LatticeGraph::Node::removeEdgeUid ( unsigned int  uid)

Remove edge with UID uid.

Parameters
uidUID of requested edge to remove

◆ setData()

void LatticeGraph::Node::setData ( Vtx::Vortex data)

Set the vortex data (in node)

Parameters
&dataReference to vortex struct to set.

Member Data Documentation

◆ uid

unsigned int LatticeGraph::Node::uid

Definition at line 40 of file node.h.


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