OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::NodeCoupling2DRows Struct Reference

Sparse [2D_NODE_COUPLING] rows (one per authored node). More...

#include <NodeCoupling2DData.hpp>

Collaboration diagram for openswmm::NodeCoupling2DRows:

Public Member Functions

int count () const noexcept
 Count sparse coupling rows from the node-key column.
 
int row_of (int node_idx) const noexcept
 Find the first sparse row for a stored node index.
 
int ensure_row (int node_idx, NodeCoupling2DType t)
 Reuse a sparse node row or append an unauthored one.
 
void erase_row (int r)
 Erase a sparse row from all three columns.
 
void erase_node (int idx)
 Remove a deleted node's first sparse row and shift higher stored node keys.
 
void clear ()
 Erase all owned sparse node-coupling rows.
 

Public Attributes

std::vector< int > node
 node index
 
std::vector< NodeCoupling2DType > type
 
std::vector< NodeCoupling2DParams > params
 NaN = not authored.
 

Detailed Description

Sparse [2D_NODE_COUPLING] rows (one per authored node).

Member Function Documentation

◆ clear()

void openswmm::NodeCoupling2DRows::clear ( )
inline

Erase all owned sparse node-coupling rows.

Retains vector capacities; invalidates element references and does not reset base-node defaults or derived mesh maps.

◆ count()

int openswmm::NodeCoupling2DRows::count ( ) const
inlinenoexcept

Count sparse coupling rows from the node-key column.

Returns
node.size() converted to int; other column lengths are not checked.
Here is the caller graph for this function:

◆ ensure_row()

int openswmm::NodeCoupling2DRows::ensure_row ( int node_idx,
NodeCoupling2DType t )
inline

Reuse a sparse node row or append an unauthored one.

Appends node/type/NaN parameter columns without validation or rollback; allocation failure can leave columns misaligned. Does not derive mesh maps.

Parameters
[in]node_idxStored node key; caller validates model index and type legality.
[in]tType for a newly appended row; an existing row keeps its current type.
Returns
Existing/new sparse row index.
Here is the call graph for this function:

◆ erase_node()

void openswmm::NodeCoupling2DRows::erase_node ( int idx)
inline

Remove a deleted node's first sparse row and shift higher stored node keys.

Drops the first row_of(idx) match, then decrements every remaining key above idx. Does not repair duplicate rows or other model references.

Parameters
[in]idxDeleted pre-erasure node key; caller has updated the base node store.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ erase_row()

void openswmm::NodeCoupling2DRows::erase_row ( int r)
inline

Erase a sparse row from all three columns.

Later sparse rows shift down; node indices stored in remaining rows are unchanged.

Parameters
[in]rExisting sparse row index with aligned node/type/params arrays; no bounds check.
Here is the caller graph for this function:

◆ row_of()

int openswmm::NodeCoupling2DRows::row_of ( int node_idx) const
inlinenoexcept

Find the first sparse row for a stored node index.

Parameters
[in]node_idxInteger node key; no model-range validation.
Returns
First matching row, or -1 for no authored entry; linear scan.
Here is the caller graph for this function:

Member Data Documentation

◆ node

std::vector<int> openswmm::NodeCoupling2DRows::node

node index

◆ params

std::vector<NodeCoupling2DParams> openswmm::NodeCoupling2DRows::params

NaN = not authored.

◆ type

std::vector<NodeCoupling2DType> openswmm::NodeCoupling2DRows::type

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