Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ graph/

operations_research::EbertGraph< NodeIndexType, ArcIndexType > Class Template Reference

Most users should only use StarGraph, which is EbertGraph<int32, int32>, and other type shortcuts; see the bottom of this file. More...

#include <ebert_graph.h>

Inheritance diagram for operations_research::EbertGraph< NodeIndexType, ArcIndexType >:

operations_research::EbertGraphCore< NodeIndexType, ArcIndexType, DerivedGraph >

List of all members.

Public Types

typedef NodeIndexType NodeIndex
 < SWIG
typedef ArcIndexType ArcIndex

Public Member Functions

 EbertGraph ()
 EbertGraph (NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
 ~EbertGraph ()
bool CheckArcBounds (const ArcIndexType arc) const
 Utility function to check that an arc index is within the bounds.
bool CheckArcValidity (const ArcIndexType arc) const
 Utility function to check that an arc index is within the bounds AND different from kNilArc.
NodeIndexType Tail (const ArcIndexType arc) const
 Returns the tail or start-node of arc.
NodeIndexType DirectArcTail (const ArcIndexType arc) const
 Returns the tail or start-node of arc if it is positive (i.e.
NodeIndexType DirectArcHead (const ArcIndexType arc) const
 Returns the head or end-node of arc if it is positive (i.e.
ArcIndexType DirectArc (const ArcIndexType arc) const
 Returns the arc in normal/direct direction.
ArcIndexType ReverseArc (const ArcIndexType arc) const
 Returns the arc in reverse direction.
ArcIndexType Opposite (const ArcIndexType arc) const
 Returns the opposite arc, i.e the direct arc is the arc is in reverse direction, and the reverse arc if the arc is direct.
bool IsDirect (const ArcIndexType arc) const
 Returns true if the arc is direct.
bool IsReverse (const ArcIndexType arc) const
 Returns true if the arc is in the reverse direction.
bool IsIncident (ArcIndexType arc, NodeIndexType node) const
 Returns true if arc is incident to node.
bool IsIncoming (ArcIndexType arc, NodeIndexType node) const
 Returns true if arc is incoming to node.
bool IsOutgoing (ArcIndexType arc, NodeIndexType node) const
 Returns true if arc is outgoing from node.
void BuildRepresentation ()
 Recreates the next_adjacent_arc_ and first_incident_arc_ variables from the array head_ in O(n + m) time.
string DebugString () const
 Returns a debug string containing all the information contained in the data structure in raw form.

Friends

class EbertGraphCore< NodeIndexType, ArcIndexType, EbertGraph< NodeIndexType, ArcIndexType > >

Classes

class  IncidentArcIterator
 Iterator class for traversing the arcs incident to a given node in the graph. More...
class  IncomingArcIterator
 Iterator class for traversing the incoming arcs associated to a given node. More...
class  OutgoingArcIterator
 Iterator class for traversing the outgoing arcs associated to a given node. More...


Detailed Description

template<typename NodeIndexType, typename ArcIndexType>
class operations_research::EbertGraph< NodeIndexType, ArcIndexType >

Most users should only use StarGraph, which is EbertGraph<int32, int32>, and other type shortcuts; see the bottom of this file.

Definition at line 640 of file ebert_graph.h.


Member Typedef Documentation

template<typename NodeIndexType, typename ArcIndexType>
typedef NodeIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::NodeIndex

< SWIG

Definition at line 673 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
typedef ArcIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::ArcIndex

Definition at line 674 of file ebert_graph.h.


Constructor & Destructor Documentation

template<typename NodeIndexType, typename ArcIndexType>
operations_research::EbertGraph< NodeIndexType, ArcIndexType >::EbertGraph (  )  [inline]

Definition at line 676 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
operations_research::EbertGraph< NodeIndexType, ArcIndexType >::EbertGraph ( NodeIndexType  max_num_nodes,
ArcIndexType  max_num_arcs 
) [inline]

Definition at line 678 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
operations_research::EbertGraph< NodeIndexType, ArcIndexType >::~EbertGraph (  )  [inline]

Definition at line 682 of file ebert_graph.h.


Member Function Documentation

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::CheckArcBounds ( const ArcIndexType  arc  )  const [inline]

Utility function to check that an arc index is within the bounds.

It is exported so that users of the EbertGraph class can use it. To be used in a DCHECK.

Definition at line 874 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::CheckArcValidity ( const ArcIndexType  arc  )  const [inline]

Utility function to check that an arc index is within the bounds AND different from kNilArc.

It is exported so that users of the EbertGraph class can use it. To be used in a DCHECK.

Definition at line 882 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
NodeIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::Tail ( const ArcIndexType  arc  )  const [inline]

Returns the tail or start-node of arc.

Definition at line 887 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
NodeIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::DirectArcTail ( const ArcIndexType  arc  )  const [inline]

Returns the tail or start-node of arc if it is positive (i.e.

it is taken in the direction it was entered in the graph), and the head or end-node otherwise. 'This' in Ebert's paper.

Definition at line 895 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
NodeIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::DirectArcHead ( const ArcIndexType  arc  )  const [inline]

Returns the head or end-node of arc if it is positive (i.e.

it is taken in the direction it was entered in the graph), and the tail or start-node otherwise. 'That' in Ebert's paper.

Definition at line 902 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::DirectArc ( const ArcIndexType  arc  )  const [inline]

Returns the arc in normal/direct direction.

Definition at line 907 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::ReverseArc ( const ArcIndexType  arc  )  const [inline]

Returns the arc in reverse direction.

Definition at line 913 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
ArcIndexType operations_research::EbertGraph< NodeIndexType, ArcIndexType >::Opposite ( const ArcIndexType  arc  )  const [inline]

Returns the opposite arc, i.e the direct arc is the arc is in reverse direction, and the reverse arc if the arc is direct.

Definition at line 920 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::IsDirect ( const ArcIndexType  arc  )  const [inline]

Returns true if the arc is direct.

Definition at line 928 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::IsReverse ( const ArcIndexType  arc  )  const [inline]

Returns true if the arc is in the reverse direction.

Definition at line 934 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::IsIncident ( ArcIndexType  arc,
NodeIndexType  node 
) const [inline]

Returns true if arc is incident to node.

Definition at line 940 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::IsIncoming ( ArcIndexType  arc,
NodeIndexType  node 
) const [inline]

Returns true if arc is incoming to node.

Definition at line 945 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::EbertGraph< NodeIndexType, ArcIndexType >::IsOutgoing ( ArcIndexType  arc,
NodeIndexType  node 
) const [inline]

Returns true if arc is outgoing from node.

Definition at line 950 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
void operations_research::EbertGraph< NodeIndexType, ArcIndexType >::BuildRepresentation (  )  [inline]

Recreates the next_adjacent_arc_ and first_incident_arc_ variables from the array head_ in O(n + m) time.

This is useful if head_ array has been sorted according to a given criterion, for example.

Definition at line 958 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
string operations_research::EbertGraph< NodeIndexType, ArcIndexType >::DebugString (  )  const [inline]

Returns a debug string containing all the information contained in the data structure in raw form.

Definition at line 968 of file ebert_graph.h.


Friends And Related Function Documentation

template<typename NodeIndexType, typename ArcIndexType>
friend class EbertGraphCore< NodeIndexType, ArcIndexType,EbertGraph< NodeIndexType, ArcIndexType > > [friend]

Definition at line 646 of file ebert_graph.h.


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