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

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

A forward-star-only graph representation for greater efficiency in those algorithms that don't need reverse arcs. More...

#include <ebert_graph.h>

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

operations_research::EbertGraphCore< NodeIndexType, ArcIndexType, DerivedGraph >

List of all members.

Public Types

typedef NodeIndexType NodeIndex
 < SWIG
typedef ArcIndexType ArcIndex

Public Member Functions

 ForwardEbertGraph ()
 ForwardEbertGraph (NodeIndexType max_num_nodes, ArcIndexType max_num_arcs)
 ~ForwardEbertGraph ()
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.
bool IsNodeValid (const NodeIndexType node) const
 Utility function to check that a node index is within the bounds AND different from kNilNode.
bool CheckTailIndexValidity (const ArcIndexType arc) const
 Returns true if arc is a valid index into the (*tail_) array.
NodeIndexType Tail (const ArcIndexType arc) const
 Returns the tail or start-node of arc.
bool IsIncoming (ArcIndexType arc, NodeIndexType node) const
 Returns true if arc is incoming to node.
void BuildRepresentation ()
 Recreates the next_adjacent_arc_ and first_incident_arc_ variables from the arrays head_ and tail_ in O(n + m) time.
bool BuildTailArray ()
void ReleaseTailArray ()
bool TailArrayComplete () const
 To be used in a DCHECK().
string DebugString () const
 Returns a debug string containing all the information contained in the data structure in raw form.

Friends

class EbertGraphCore< NodeIndexType, ArcIndexType, ForwardEbertGraph< NodeIndexType, ArcIndexType > >

Classes

class  OutgoingArcIterator
 Iterator class for traversing the arcs incident to a given node in the graph. More...


Detailed Description

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

A forward-star-only graph representation for greater efficiency in those algorithms that don't need reverse arcs.

Definition at line 1081 of file ebert_graph.h.


Member Typedef Documentation

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

< SWIG

Definition at line 1113 of file ebert_graph.h.

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

Definition at line 1114 of file ebert_graph.h.


Constructor & Destructor Documentation

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

Definition at line 1116 of file ebert_graph.h.

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

Definition at line 1118 of file ebert_graph.h.

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

Definition at line 1122 of file ebert_graph.h.


Member Function Documentation

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::ForwardEbertGraph< 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 ForwardEbertGraph class can use it. To be used in a DCHECK.

Definition at line 1174 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::ForwardEbertGraph< 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 ForwardEbertGraph class can use it. To be used in a DCHECK.

Definition at line 1182 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::ForwardEbertGraph< NodeIndexType, ArcIndexType >::IsNodeValid ( const NodeIndexType  node  )  const [inline]

Utility function to check that a node index is within the bounds AND different from kNilNode.

It is exported so that users of the ForwardEbertGraph class can use it. To be used in a DCHECK; also used internally to validate arguments passed to our methods from clients (e.g., AddArc())..

Reimplemented from operations_research::EbertGraphCore< NodeIndexType, ArcIndexType, DerivedGraph >.

Definition at line 1191 of file ebert_graph.h.

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

Returns true if arc is a valid index into the (*tail_) array.

Definition at line 1196 of file ebert_graph.h.

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

Returns the tail or start-node of arc.

Definition at line 1201 of file ebert_graph.h.

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

Returns true if arc is incoming to node.

Definition at line 1208 of file ebert_graph.h.

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

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

This is useful if the head_ and tail_ arrays have been sorted according to a given criterion, for example.

Definition at line 1216 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::ForwardEbertGraph< NodeIndexType, ArcIndexType >::BuildTailArray (  )  [inline]

Definition at line 1226 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
void operations_research::ForwardEbertGraph< NodeIndexType, ArcIndexType >::ReleaseTailArray (  )  [inline]

Definition at line 1254 of file ebert_graph.h.

template<typename NodeIndexType, typename ArcIndexType>
bool operations_research::ForwardEbertGraph< NodeIndexType, ArcIndexType >::TailArrayComplete (  )  const [inline]

To be used in a DCHECK().

Definition at line 1259 of file ebert_graph.h.

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

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

Definition at line 1270 of file ebert_graph.h.


Friends And Related Function Documentation

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

Definition at line 1087 of file ebert_graph.h.


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