56#ifndef __ADS_IncidenceGraph
57 #define __ADS_IncidenceGraph
93 [[nodiscard]]
int n(
void )
const {
return( f_n ); }
96 [[nodiscard]]
int bound(
void )
const {
return( f_n ); }
99 [[nodiscard]]
int m(
void )
const {
return( f_m ); }
102 [[nodiscard]]
bool directed(
void )
const {
return(
true ); }
106 return( ( u >= 0 ) && ( u < f_n ) );
110 [[nodiscard]] std::vector< int >
V(
void )
const;
147 [[nodiscard]]
bool hasEdge(
int i ,
int j )
const;
165 [[nodiscard]] std::vector< int >
adj(
int i )
const;
170 [[nodiscard]] std::vector< int >
inAdj(
int i )
const;
179 [[nodiscard]]
int entry(
int i ,
int e )
const;
182 [[nodiscard]] std::size_t
bytes(
void )
const {
return( f_A.size() ); }
187 [[nodiscard]]
int column(
int i ,
int j )
const;
190 [[nodiscard]]
int find(
int e , std::int8_t v )
const;
193 [[nodiscard]]
bool columnOk(
int e )
const;
197 std::vector< std::int8_t > f_A;
209#include "ADS/graph/impl/IncidenceGraph.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
bool hasNode(int u) const
whether is a node
Definition IncidenceGraph.h:105
std::vector< int > inAdj(int i) const
the sources of the edges into , in the order of the columns, time
void insertEdge(int i, int j)
adds the edge as a new column, amortized time
std::vector< int > V(void) const
the nodes,
int bound(void) const
the names of the nodes are in
Definition IncidenceGraph.h:96
bool hasEdge(int i, int j) const
whether is an edge, time
int m(void) const
the number of edges, the columns
Definition IncidenceGraph.h:99
int n(void) const
the number of nodes
Definition IncidenceGraph.h:93
void forEachAdj(int i, F &&f) const
on the targets of the edges out of
std::vector< int > adj(int i) const
the targets of the edges out of , in the order of the columns, time
bool directed(void) const
always oriented
Definition IncidenceGraph.h:102
int entry(int i, int e) const
the entry
IncidenceGraph(int n=0)
the graph of nodes and no edge
std::size_t bytes(void) const
the bytes of the matrix,
Definition IncidenceGraph.h:182
void deleteEdge(int i, int j)
removes the edge , if it is there, the last column copied in its place, time