DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Data Structures | Public Types | Public Member Functions | Private Attributes
DGtal::CUndirectedSimpleLocalGraph< T > Struct Template Reference

#include <CUndirectedSimpleLocalGraph.h>

Inheritance diagram for DGtal::CUndirectedSimpleLocalGraph< T >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::CUndirectedSimpleLocalGraph< T >:
Collaboration graph
[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 ((CInteger< Size >))
 BOOST_CONCEPT_USAGE (CUndirectedSimpleLocalGraph)
void checkConstConstraints () const

Private Attributes

myX
Size mySize
Vertex myVertex
boost::output_iterator_archetype
< Vertex
myOutIt

Detailed Description

template<typename T>
struct DGtal::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 :

- Size: an integral type to count the number of vertices.
- Vertex: the type for the vertices of the graph.
- VertexSet: the type for storing a set of vertices.
- VertexMap: a rebinding structure to associate Value to vertices of model CVertexMap.

Notation

Definitions

Valid expressions and

Name Expression Type requirements Return type Precondition Semantics Postcondition Complexity
Degree x.degree( v ) Size Returns the degree of vertex v
Best capacity x.bestCapacity() Size Returns the approximate number of neighbors to be expected. Useful to prepare data structures.
Neighborhood 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

- DigitalSurface, LightImplicitDigitalSurface, LightExplicitDigitalSurface, Object, MetricAdjacency, DomainAdjacency

Notes

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

Definition at line 144 of file CUndirectedSimpleLocalGraph.h.


Member Typedef Documentation

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

Reimplemented in DGtal::CUndirectedSimpleGraph< T >.

Definition at line 154 of file CUndirectedSimpleLocalGraph.h.

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

Definition at line 153 of file CUndirectedSimpleLocalGraph.h.

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

Definition at line 155 of file CUndirectedSimpleLocalGraph.h.


Member Function Documentation

template<typename T>
DGtal::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_ASSERT ( (CInteger< Size >)  )
template<typename T>
DGtal::CUndirectedSimpleLocalGraph< T >::BOOST_CONCEPT_USAGE ( CUndirectedSimpleLocalGraph< T >  )
inline

Definition at line 165 of file CUndirectedSimpleLocalGraph.h.

{
// check const methods.
}
template<typename T>
void DGtal::CUndirectedSimpleLocalGraph< T >::checkConstConstraints ( ) const
inline

Reimplemented in DGtal::CUndirectedSimpleGraph< T >.

Definition at line 170 of file CUndirectedSimpleLocalGraph.h.

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

{
ConceptUtils::sameType( mySize, myX.bestCapacity() );
myX.writeNeighbors( myOutIt, myVertex );
// @todo create VertexPredicate to test the other writeNeighbors method.
}

Field Documentation

template<typename T>
boost::output_iterator_archetype<Vertex> DGtal::CUndirectedSimpleLocalGraph< T >::myOutIt
mutableprivate
template<typename T>
Size DGtal::CUndirectedSimpleLocalGraph< T >::mySize
private
template<typename T>
Vertex DGtal::CUndirectedSimpleLocalGraph< T >::myVertex
private
template<typename T>
T DGtal::CUndirectedSimpleLocalGraph< T >::myX
private

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