DGtal  1.1.0
Data Structures | Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CUndirectedSimpleLocalGraph< T > Struct Template Reference

Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not necessarily know all the vertices. More...

#include <DGtal/graph/CUndirectedSimpleLocalGraph.h>

Inheritance diagram for DGtal::concepts::CUndirectedSimpleLocalGraph< T >:
[legend]
Collaboration diagram for DGtal::concepts::CUndirectedSimpleLocalGraph< T >:
[legend]

Data Structures

struct  VertexMap
 

Public Types

typedef T::Vertex Vertex
 
typedef T::Size Size
 
typedef T::VertexSet VertexSet
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CIntegralNumber< Size >))
 
 BOOST_CONCEPT_ASSERT ((boost::DefaultConstructible< Vertex >))
 
 BOOST_CONCEPT_ASSERT ((boost::Assignable< Vertex >))
 
 BOOST_CONCEPT_ASSERT ((boost::CopyConstructible< Vertex >))
 
 BOOST_CONCEPT_USAGE (CUndirectedSimpleLocalGraph)
 
void checkConstConstraints () const
 

Private Attributes

myX
 
Size mySize
 
Vertex myVertex
 
boost::output_iterator_archetype< VertexmyOutIt
 
CVertexPredicateArchetype< VertexmyVPred
 

Detailed Description

template<typename T>
struct DGtal::concepts::CUndirectedSimpleLocalGraph< T >

Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not necessarily know all the vertices.

Description of concept 'CUndirectedSimpleLocalGraph'

Refinement of

Associated types

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
Degree x.degree(v) Size Returns the degree of vertex v
Capacity x.bestCapacity() Size Returns the approximate number of neighbors to be expected. Useful to prepare data structures.
Neighbourhood x.writeNeighbors<OutputIterator>( out, v ) Writes with the output iterator out the neighboring vertices of v.
Neighborhood x.writeNeighbors<OutputIterator,VertexPredicate>( out, v, p ) Writes with the output iterator out the neighboring vertices of v that satisfy the predicate p.

Invariants

Models

Notes

Template Parameters
Tthe type that should be a model of CUndirectedSimpleLocalGraph.

Definition at line 100 of file CUndirectedSimpleLocalGraph.h.

Member Typedef Documentation

◆ Size

template<typename T >
typedef T::Size DGtal::concepts::CUndirectedSimpleLocalGraph< T >::Size

Definition at line 106 of file CUndirectedSimpleLocalGraph.h.

◆ Vertex

template<typename T >
typedef T::Vertex DGtal::concepts::CUndirectedSimpleLocalGraph< T >::Vertex

Definition at line 105 of file CUndirectedSimpleLocalGraph.h.

◆ VertexSet

template<typename T >
typedef T::VertexSet DGtal::concepts::CUndirectedSimpleLocalGraph< T >::VertexSet

Definition at line 107 of file CUndirectedSimpleLocalGraph.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/4]

template<typename T >
DGtal::concepts::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_ASSERT ( (boost::Assignable< Vertex >)  )

◆ BOOST_CONCEPT_ASSERT() [2/4]

template<typename T >
DGtal::concepts::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_ASSERT ( (boost::CopyConstructible< Vertex >)  )

◆ BOOST_CONCEPT_ASSERT() [3/4]

template<typename T >
DGtal::concepts::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_ASSERT ( (boost::DefaultConstructible< Vertex >)  )

◆ BOOST_CONCEPT_ASSERT() [4/4]

template<typename T >
DGtal::concepts::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_ASSERT ( (CIntegralNumber< Size >)  )

◆ BOOST_CONCEPT_USAGE()

template<typename T >
DGtal::concepts::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_USAGE ( CUndirectedSimpleLocalGraph< T >  )
inline

Definition at line 120 of file CUndirectedSimpleLocalGraph.h.

121  {
122  // check const methods.
124  }

◆ checkConstConstraints()

template<typename T >
void DGtal::concepts::CUndirectedSimpleLocalGraph< T >::checkConstConstraints ( ) const
inline

Definition at line 125 of file CUndirectedSimpleLocalGraph.h.

126  {
127  ConceptUtils::sameType( mySize, myX.bestCapacity() );
129  myX.writeNeighbors( myOutIt, myVertex );
130  myX.writeNeighbors( myOutIt, myVertex, myVPred );
131  }

Referenced by DGtal::concepts::CUndirectedSimpleLocalGraph< Adj >::BOOST_CONCEPT_USAGE().

Field Documentation

◆ myOutIt

template<typename T >
boost::output_iterator_archetype<Vertex> DGtal::concepts::CUndirectedSimpleLocalGraph< T >::myOutIt
mutableprivate

◆ mySize

template<typename T >
Size DGtal::concepts::CUndirectedSimpleLocalGraph< T >::mySize
private

◆ myVertex

template<typename T >
Vertex DGtal::concepts::CUndirectedSimpleLocalGraph< T >::myVertex
private

◆ myVPred

◆ myX

template<typename T >
T DGtal::concepts::CUndirectedSimpleLocalGraph< T >::myX
private

The documentation for this struct was generated from the following file:
DGtal::concepts::CUndirectedSimpleLocalGraph::myOutIt
boost::output_iterator_archetype< Vertex > myOutIt
Definition: CUndirectedSimpleLocalGraph.h:138
DGtal::concepts::CUndirectedSimpleLocalGraph::checkConstConstraints
void checkConstConstraints() const
Definition: CUndirectedSimpleLocalGraph.h:125
DGtal::concepts::CUndirectedSimpleLocalGraph::myVPred
CVertexPredicateArchetype< Vertex > myVPred
Definition: CUndirectedSimpleLocalGraph.h:139
DGtal::concepts::CUndirectedSimpleLocalGraph::mySize
Size mySize
Definition: CUndirectedSimpleLocalGraph.h:136
DGtal::concepts::CUndirectedSimpleLocalGraph::myVertex
Vertex myVertex
Definition: CUndirectedSimpleLocalGraph.h:137
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CUndirectedSimpleLocalGraph::myX
T myX
Definition: CUndirectedSimpleLocalGraph.h:135