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

horizontal precedence class with utility methods. More...

#include <ramps.h>

Inheritance diagram for delphos::RampPrecedence:
Inheritance graph
Collaboration diagram for delphos::RampPrecedence:
Collaboration graph

Public Member Functions

 RampPrecedence (delphos::BlockModel &bm, const double &neighbor_distance)
 Creates a new ramp precedence. More...
 
 RampPrecedence (delphos::BlockModel &bm, const double &neighbor_distance, const string &ramp_attr_name)
 Creates a new ramp precedence. More...
 
 RampPrecedence (delphos::BlockModel &bm, const double &neighbor_distance, const string &ramp_attr_name, const string &neighbor_attr_name)
 Creates a new ramp precedence. More...
 
 RampPrecedence (delphos::BlockModel &bm, const double &neighbor_distance, const vector< delphos::BlockIndexType > &ramps)
 Creates a new ramp precedence. More...
 
 RampPrecedence (delphos::BlockModel &bm, const double &neighbor_distance, const vector< delphos::BlockIndexType > &ramps, const string &neighbor_attr_name)
 Creates a new ramp precedence. More...
 
const double & NeighborDistance () const
 Return the neighbor distance being used in the precedence. More...
 
const double & GetNeighborDistance () const
 Return the neighbor distance being used in the precedence. More...
 
void AddRamp (const delphos::BlockIndexType &block_id)
 Adds a new ramp to the precedence. More...
 
void AddRamp (const double &x, const double &y, const double &z)
 adds a new ramp to the precedence. More...
 
bool IsRamp (const delphos::BlockIndexType &block_id) const
 Determines if a given block is a ramp or not. More...
 
bool IsRamp (const double &x, const double &y, const double &z) const
 Determins if a given block is a ramp or not. More...
 
void RemoveRamp (const delphos::BlockIndexType &block_id)
 Removes an existing ramp. More...
 
void RemoveRamp (const double &x, const double &y, const double &z)
 Removes an existing ramp. More...
 
void CreateArcs ()
 Creates the arcs of the ramp precedence.
 
delphos::BlockSelectionUnreachableBlocks ()
 Returns the blocks that cannot be accessed by this precedence. More...
 
delphos::BlockSelectionGetUnreachableBlocks ()
 Returns the blocks that cannot be accessed by this precedence. More...
 
const string & NeighborAttribute () const
 Returns the neighbor attribute being used in the precedence. More...
 
const string & GetNeighborAttribute () const
 Returns the neighbor attribute being used in the precedence. More...
 
delphos::BlockIndexType BlockRamp (const BlockIndexType &block_id) const
 Returns the ramp from which the block will be extracted. More...
 
delphos::BlockIndexType GetBlockRamp (const BlockIndexType &block_id) const
 Returns the ramp from which the block will be extracted. More...
 
delphos::BlockSelection Leaves (const BlockIndexType &block_id)
 Returns the leaves of a ramp. More...
 
delphos::BlockSelection GetLeaves (const BlockIndexType &block_id)
 Returns the leaves of a ramp. More...
 
vector< delphos::BlockIndexType > * GetAccesses () const
 Returns a pointer to the accesses container.
 
virtual ~RampPrecedence ()
 Destructor.
 
- Public Member Functions inherited from delphos::Precedence
 Precedence (BlockModel &bm)
 Creates a new precedence with no arcs. More...
 
 Precedence (delphos::Precedence &other)
 Copy constructor.
 
virtual ~Precedence ()
 Destructor.
 
Arc operator[] (const delphos::BlockIndexType &index) const
 Retrieves the Arc instance with given index. More...
 
Arc GetArc (const delphos::BlockIndexType &index) const
 Retrieves the Arc instance with given index. More...
 
void AddArc (const delphos::Arc &new_arc)
 Adds a new arc to the precedence. More...
 
void AddArc (const delphos::BlockIndexType &first, const delphos::BlockIndexType &second)
 Adds a new arc to the precedence. More...
 
void Clear ()
 Deletes all arcs. More...
 
const delphos::BlockIndexType Size () const
 Returns the size (number of arcs) in the precedence. More...
 
const delphos::BlockIndexType GetSize () const
 Returns the size (number of arcs) in the precedence. More...
 
- Public Member Functions inherited from delphos::BlockModelEntity
 BlockModelEntity (delphos::BlockModel &bm)
 Creates a new block instance associated to a given block model. More...
 
delphos::BlockModelGetBlockModel ()
 Retrieves the block model to which the entity is associated. More...
 
const delphos::BlockModelGetBlockModel () const
 Retrieves the block model to which the entity is associated. More...
 

Static Public Attributes

static double ZTolerance = 0.01
 The tolerance to determine if 2 blocks are neighbours.
 

Detailed Description

horizontal precedence class with utility methods.

Constructor & Destructor Documentation

delphos::RampPrecedence::RampPrecedence ( delphos::BlockModel bm,
const double &  neighbor_distance 
)

Creates a new ramp precedence.

Parameters
bmThe block model to which the precedence is associated.
neighbor_distanceMaximum distance to connect blocks.

This constructor creates a ramp precedence with no ramps, so they have to be added afterwards.

delphos::RampPrecedence::RampPrecedence ( delphos::BlockModel bm,
const double &  neighbor_distance,
const string &  ramp_attr_name 
)

Creates a new ramp precedence.

Parameters
bmThe block model to which the precedence is associated.
neighbor_distanceMaximum distance to connect blocks.
ramp_attr_nameName of attribute containing 1 for ramps and 0 for other blocks.
delphos::RampPrecedence::RampPrecedence ( delphos::BlockModel bm,
const double &  neighbor_distance,
const string &  ramp_attr_name,
const string &  neighbor_attr_name 
)

Creates a new ramp precedence.

Parameters
bmThe block model to which the precedence is associated.
neighbor_distanceThe maximum distance to connect blocks.
ramp_attr_nameThe name of attribute containing 1 for ramps and 0 for other blocks.
neighbor_attr_nameThe name of attribute for which only blocks that have same value for it can be neighbors.
delphos::RampPrecedence::RampPrecedence ( delphos::BlockModel bm,
const double &  neighbor_distance,
const vector< delphos::BlockIndexType > &  ramps 
)

Creates a new ramp precedence.

Parameters
bmThe block model to which the precedence is associated.
neighbor_distanceMaximum distance to connect blocks.
rampsList of ramps to be added to the ramp precedence.
delphos::RampPrecedence::RampPrecedence ( delphos::BlockModel bm,
const double &  neighbor_distance,
const vector< delphos::BlockIndexType > &  ramps,
const string &  neighbor_attr_name 
)

Creates a new ramp precedence.

Parameters
bmThe block model to which the precedence is associated.
neighbor_distanceMaximum distance to connect blocks.
rampsList of ramps to be added to the ramp precedence.
neighbor_attr_name.Name of attribute for which only blocks that have same value for it can be neighbors.

Member Function Documentation

void delphos::RampPrecedence::AddRamp ( const delphos::BlockIndexType &  block_id)

Adds a new ramp to the precedence.

Parameters
block_idid of the block to be added as ramp.
void delphos::RampPrecedence::AddRamp ( const double &  x,
const double &  y,
const double &  z 
)

adds a new ramp to the precedence.

Parameters
xX coordinate of the block to be added as ramp.
yY coordinate of the block to be added as ramp.
zZ coordinate of the block to be added as ramp.
BlockIndexType delphos::RampPrecedence::BlockRamp ( const BlockIndexType &  block_id) const

Returns the ramp from which the block will be extracted.

Parameters
block_idid of the block. Deprecated.
BlockIndexType delphos::RampPrecedence::GetBlockRamp ( const BlockIndexType &  block_id) const

Returns the ramp from which the block will be extracted.

Parameters
block_idid of the block.
BlockSelection delphos::RampPrecedence::GetLeaves ( const BlockIndexType &  block_id)

Returns the leaves of a ramp.

Parameters
block_idid of the ramp.
const string & delphos::RampPrecedence::GetNeighborAttribute ( ) const

Returns the neighbor attribute being used in the precedence.

The neighbor attribute establishes which blocks will be connected in every bench in order to determine accessibility from the ramps.

const double & delphos::RampPrecedence::GetNeighborDistance ( ) const

Return the neighbor distance being used in the precedence.

The neighbor distance establishes which blocks will be connected in every bench in order to determine accessibility from the ramps.

BlockSelection * delphos::RampPrecedence::GetUnreachableBlocks ( )

Returns the blocks that cannot be accessed by this precedence.

Warning
This method allocates new memory that has to be released by the user.
bool delphos::RampPrecedence::IsRamp ( const delphos::BlockIndexType &  block_id) const

Determines if a given block is a ramp or not.

Parameters
block_idid of the block to be checked.
Returns
True if the block with given ID is a ramp, False if not.
bool delphos::RampPrecedence::IsRamp ( const double &  x,
const double &  y,
const double &  z 
) const

Determins if a given block is a ramp or not.

Parameters
xX coordinate of the block being checked.
yY coordinate of the block being checked.
zZ coordinate of the block being checked.
BlockSelection delphos::RampPrecedence::Leaves ( const BlockIndexType &  block_id)

Returns the leaves of a ramp.

Parameters
block_idid of the ramp. Deprecated.
const string & delphos::RampPrecedence::NeighborAttribute ( ) const

Returns the neighbor attribute being used in the precedence.

The neighbor attribute establishes which blocks will be connected in every bench in order to determine accessibility from the ramps. Deprecated.

const double & delphos::RampPrecedence::NeighborDistance ( ) const

Return the neighbor distance being used in the precedence.

The neighbor distance establishes which blocks will be connected in every bench in order to determine accessibility from the ramps. Deprecated.

void delphos::RampPrecedence::RemoveRamp ( const delphos::BlockIndexType &  block_id)

Removes an existing ramp.

Parameters
block_idid of the block to be removed as ramp.
void delphos::RampPrecedence::RemoveRamp ( const double &  x,
const double &  y,
const double &  z 
)

Removes an existing ramp.

Parameters
xX coordinate of the ramp being removed.
yY coordinate of the ramp being removed.
zZ coordinate of the ramp being removed.
BlockSelection * delphos::RampPrecedence::UnreachableBlocks ( )

Returns the blocks that cannot be accessed by this precedence.

Warning
This method allocates new memory that has to be released by the user. Deprecated.

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