Bpp/Graph
Structure
C++
 
 
DESCRIPTION
 

This module defines the structure of a graph.

 
SOURCE FILES
 

This section allows you to access the C++ source files of the module.

 
PARENT MODULE
 

This module is part of Bpp/Graph.

 
INCLUDED FILES
 

The files listed below are included in the interface part of the module. So any module dependent of this module is also dependent of the files listed here.

  • <bpp/data_structure.hpp>

 
NEEDED FILES
 

The files listed below are needed by the implementation part of the module. But a module dependent of this module is not necessary dependent of the files listed here.

  • <bpp/modules.hpp>

 
INTEGRATED NAMESPACES
 

The namespaces listed below are integrated in this module. That means any element declared in one of those namespaces can now be directly used by or from this module.

  • dataStructureDataTemplate

 
ALIASES
 

The aliases listed below are only used internally by the interface. They are here just to lighten the writing of certain declarations. Never use them, they are local to the interface and can not be used outside of it.

  • tdGraph = class prArcData,class prNodeData

  • tuGraph = prArcData,prNodeData

 
TYPES
 

Here are listed the types defined in the module. To use one of them, you have to specify the namespace of the module.

  • type tyCardinal tyNodeKey
    Key to identify a node in a graph.

  • type tyCardinal tyArcKey
    Key to identify an arc in a graph.

  • type clArc<clGenericData,clGenericData> clGenericArc
    Arc of a generic graph.

  • type clGraph<clGenericData,clGenericData> clGenericGraph
    Generic graph.

  • type clNode<clGenericData,clGenericData> clGenericNode
    Node of a generic graph.

  • type std_pair(tyReal,tyReal) tyPairReal
    Pair of real numbers.

 
ERRORS
 

Here are listed the errors that are supported or generated by the module. To use one of them, you do not have to specify the namespace of the module.

  • erArcExtremityNotFixed
    An arc extremity is not fixed.

  • erArcKeyAlreadyExists
    An arc already has this key in the graph.

  • erInvalidArcKey
    No arc has this key in the graph.

  • erInvalidNodeKey
    No node has this key in the graph.

  • erNodeKeyAlreadyExists
    A node already has this key in the graph.

 
CONSTANTS
 

Here are listed the constants provided by the module. To use one of them, you have to specify the namespace of the module.

  • tyArcKey nilArc()
    Arc key that is never used and represents no arc.

  • tyNodeKey nilNode()
    Node key that is never used and represents no node.

 
FUNCTIONS
 

Here are listed the functions provided by the module. To use one of them, you have to specify the namespace of the module.

 
CLASSES
 

Here are listed the classes provided by the module. To use one of them, you have to specify the namespace of the module.

 
clArc
 
 
Declaration

template <tdGraph> class clArc

 
Description

Represents an arc of a graph. The first parameter of the template is the type of data the arcs carry and the second one is the type of data the nodes carry.

 
Types
  • type clArc<tuGraph> cpArc
    This class.

  • type clNode<tuGraph> cpNode
    Type of the nodes the arc links.

  • type clGraph<tuGraph> cpGraph
    Type of graph the arc belongs to.

  • type std_map(tyArcKey,cpArc *) cpArcX
    List of arcs with their key.

  • type std_map(tyNodeKey,cpNode *) cpNodeX
    List of nodes with their key.

 
Attributes
  • tyArcKey key()
    Key of the arc. Reading access only.

  • tyMark mark()
    Mark used by some algorithms. Reading and writing access.

  • prArcData data()
    Data carried by the arc. Reading and writing access.

  • tyPointer work()
    Pointer to a workspace. Used and managed by some algorithms. Reading and writing access.

  • cpNodeP sourceNode()
    Pointer to the node pointed by the source extremity of the arc. Reading access only.

  • cpNodeP targetNode()
    Pointer to the node pointed by the target extremity of the arc. Reading access only.

 
Methods
 
clGraph
 
 
Declaration

template <tdGraph> class clGraph

 
Description

Represents a graph. The first parameter of the template is the type of data the arcs carry and the second one is the type of data the nodes carry.

 
Types
  • type clArc<tuGraph> cpArc
    Type of the arcs the graph contains.

  • type clNode<tuGraph> cpNode
    Type of the nodes the graph contains.

  • type clGraph<tuGraph> cpGraph
    This class.

  • type std_map(tyArcKey,cpArc *) cpArcX
    List of arcs with their key.

  • type std_map(tyNodeKey,cpNode *) cpNodeX
    List of nodes with their key.

 
Attributes
  • tyBoolean solved()
    Indicates if the graph is solved according to a problem. Reading and writing access.

  • tyMark mark()
    Mark used by some algorithms. Reading and writing access.

  • cpArcX arcs()
    Arcs of the graph. Reading access only.

  • cpNodeX nodes()
    Nodes of the graph. Reading access only.

 
Methods
 
clNode
 
 
Declaration

template <tdGraph> class clNode

 
Description

Represents a node of a graph. The first parameter of the template is the type of data the arcs carry and the second one is the type of data the nodes carry.

 
Types
  • type clArc<tuGraph> cpArc
    Type of the arcs the node is associated with.

  • type clNode<tuGraph> cpNode
    This class.

  • type clGraph<tuGraph> cpGraph
    Type of graph the node belongs to.

  • type std_map(tyArcKey,cpArc *) cpArcX
    List of arcs with their key.

  • type std_map(tyNodeKey,cpNode *) cpNodeX
    List of nodes with their key.

 
Attributes
  • tyNodeKey key()
    Key of the node. Reading access only.

  • tyMark mark()
    Mark used by some algorithms. Reading and writing access.

  • prNodeData data()
    Data carried by the node. Reading and writing access.

  • tyPointer work()
    Pointer to a workspace. Used and managed by some algorithms. Reading and writing access.

  • cpArcX incomingArcs()
    Arcs incoming to the node. Reading access only.

  • cpArcX outgoingArcs()
    Arcs outgoing from the node. Reading access only.

 
Methods
 
 
Copyright (c) 1999-2016 - Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. See this license for more details (http://www.gnu.org).