ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::CsrInput< X, Y > Class Template Reference

the offsets and the heads of a graph as arrays of X, and its weights as an array of Y, in place where the layouts agree and copied otherwise More...

#include <ADS/interop/Csr.h>

Classes

struct  Copies
 which arrays were copied More...

Public member functions

template<class G>
 CsrInput (const G &g, bool weights=true)
 the arrays of \( g \), with its weights if weights and if the graph is weighted; \( g \) must outlive the input and not change
 CsrInput (const CsrInput &)=delete
CsrInput & operator= (const CsrInput &)=delete
const X * offsets (void) const
 the \( n + 1 \) offsets of the rows
const X * heads (void) const
 the heads of the arcs, row by row
const Y * weights (void) const
 the weights of the arcs in the places of the heads, null if the graph is unweighted or they were not asked
const Copies & copied (void) const
 which arrays were copied

Detailed description

template<class X, class Y = X>
class ADS::CsrInput< X, Y >

the offsets and the heads of a graph as arrays of X, and its weights as an array of Y, in place where the layouts agree and copied otherwise

Constructor and destructor documentation

◆ CsrInput() [1/2]

template<class X, class Y = X>
template<class G>
ADS::CsrInput< X, Y >::CsrInput ( const G & g,
bool weights = true )
inlineexplicit

the arrays of \( g \), with its weights if weights and if the graph is weighted; \( g \) must outlive the input and not change

◆ CsrInput() [2/2]

template<class X, class Y = X>
ADS::CsrInput< X, Y >::CsrInput ( const CsrInput< X, Y > & )
delete

Member function documentation

◆ copied()

template<class X, class Y = X>
const Copies & ADS::CsrInput< X, Y >::copied ( void ) const
inlinenodiscard

which arrays were copied

◆ heads()

template<class X, class Y = X>
const X * ADS::CsrInput< X, Y >::heads ( void ) const
inlinenodiscard

the heads of the arcs, row by row

◆ offsets()

template<class X, class Y = X>
const X * ADS::CsrInput< X, Y >::offsets ( void ) const
inlinenodiscard

the \( n + 1 \) offsets of the rows

◆ operator=()

template<class X, class Y = X>
CsrInput & ADS::CsrInput< X, Y >::operator= ( const CsrInput< X, Y > & )
delete

◆ weights()

template<class X, class Y = X>
const Y * ADS::CsrInput< X, Y >::weights ( void ) const
inlinenodiscard

the weights of the arcs in the places of the heads, null if the graph is unweighted or they were not asked


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