Template Class GraphNodes

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

Class Documentation

template<class T>
class GraphNodes

the nodes, their labels and the counts shared by the realizations

Subclassed by ADS::ListGraph< W, T >, ADS::MatrixGraph< W, T >

Public Functions

inline bool directed(void) const
inline int n(void) const

the number of nodes, the G.n of the book

inline int m(void) const

the number of edges, an unoriented one counted once

inline int bound(void) const

the names of the nodes are in [ 0 , bound() )

bool hasNode(int u) const
std::vector<int> V(void) const

the set of the nodes, in increasing order

const T &label(int u) const

the label of the node u

Pre:

u is a node

void setLabel(int u, const T &t)
Pre:

u is a node

inline auto nodes(void) const

the nodes in increasing order, bidirectional

Protected Functions

GraphNodes(int n, bool directed)
Pre:

n >= 0

int addNode(const T &t)
int check(int u) const

u, which must be a node

void edge(int u, int v) const

u and v must be two distinct nodes

bool nodesCounted(void) const

n() counts the names in use, and each has a label

Protected Attributes

bool f_directed

oriented or not

std::vector<bool> f_alive

whether a name is a node

std::vector<T> f_label

the labels

int f_n = 0

the number of nodes

int f_m = 0

the number of edges

struct Alive

the names in use, for SlotIterator

Public Static Functions

static inline std::size_t size(const auto &o)
static inline bool occupied(const auto &o, std::size_t i)
static inline int read(const auto&, std::size_t i)