MineLink
 All Data Structures Functions Variables Pages
delphos::Arc Class Reference

A class that abstracts a relation between two indexes that represent two block ids. More...

#include <arcs.h>

Collaboration diagram for delphos::Arc:
Collaboration graph

Public Member Functions

 Arc (const delphos::BlockIndexType &first, const delphos::BlockIndexType &second)
 Creates a new arc between the given blocks referenced by indexes. More...
 
 Arc (const delphos::Arc &other)
 Copy constructor for the Arc class. More...
 
delphos::BlockIndexType First () const
 Return the first element in the arc (the tail). Equivalent to To(). More...
 
delphos::BlockIndexType Second () const
 Return the second element in the arc (the head). Equivalent to From(). More...
 
delphos::BlockIndexType From () const
 Return the head of the arc. Equivalent to Second(). More...
 
delphos::BlockIndexType To () const
 Return the first element in the arc (the tail). Equivalent to First(). More...
 

Detailed Description

A class that abstracts a relation between two indexes that represent two block ids.

This class abstracts a relation between two blocks represented by integers which refer to their index in the block model.

Arc class is used to represent precedence constraints in which a block must be extracted BEFORE other, in order to provide, for example, physical accesibility. Neverthelesss, in order to follow traditional notation, the arc goes from the successor to the predecessor, which are represented, respectively, by the 'First' (or 'To') block to the 'Second' (or 'From') block.

Constructor & Destructor Documentation

delphos::Arc::Arc ( const delphos::BlockIndexType &  first,
const delphos::BlockIndexType &  second 
)

Creates a new arc between the given blocks referenced by indexes.

Parameters
firstThe index of the first (head or 'to') block.
secondThe index of the second (tail or 'from') block.
delphos::Arc::Arc ( const delphos::Arc other)

Copy constructor for the Arc class.

Parameters
otherThe arc to be copied.

Member Function Documentation

BlockIndexType delphos::Arc::First ( ) const

Return the first element in the arc (the tail). Equivalent to To().

Returns
The index that refers to the predecessor block.

The First block corresponds to the predecessor, this is, the one that needs to be extracted first. As the arc goes from successor to predecessor, this block id corresponds to the To() arc.

BlockIndexType delphos::Arc::From ( ) const

Return the head of the arc. Equivalent to Second().

As arc goes from successor to predecessor, the From() block corresponds to the succesor, hence the Second() block.

BlockIndexType delphos::Arc::Second ( ) const

Return the second element in the arc (the head). Equivalent to From().

The "second" block corresponds to the successor, this is, the one that is extracted second (between the two in the arc). As the arc goes from successor to predecessor, this block id corresponds to the From() block.

BlockIndexType delphos::Arc::To ( ) const

Return the first element in the arc (the tail). Equivalent to First().

As arc goes from successor to predecessor, the To() block corresponds to the predecessor, hence the First() block.


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