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

Defines nested pits. More...

#include <nestedpit.h>

Collaboration diagram for delphos::NestedPits:
Collaboration graph

Public Member Functions

 NestedPits (NestedPitInstance &pi)
 Create new nested pits. More...
 
 ~NestedPits ()
 Deletes the nested pits.
 
delphos::NestedPitInstanceGetInstance () const
 Returns the nested pit instance.
 
void SetNestedPits (const vector< unsigned int > &npits)
 Set the nested pits.
 
unsigned int GetSize () const
 Returns the number of Pits.
 
unsigned int GetPitId (const delphos::Block &block) const
 Returns the index of the Pit minimum that contains given block. More...
 
unsigned int GetPitId (const BlockIndexType &blockid) const
 Returns the index of the Pit minimum that contains given block id. More...
 
double GetRF (const delphos::Block &block) const
 Returns the Revenue factor of the Pit minimum that contains given block. More...
 
double GetRF (BlockIndexType blockid) const
 Returns the Revenue factor of the Pit minimum that contains given block id. More...
 
delphos::BlockSelectionGetBlocksInPitByIndex (const unsigned int &pitindex) const
 Returns the pit of given index. More...
 
delphos::BlockSelectionGetBlocksInPitByRF (const double &rf) const
 Returns the pit of given revenue factor. More...
 
void StorePitsAsAttribute (const string &attribute, const bool &multiattr=true)
 Saves the nested pits as an attribute or as attributes in the block model. More...
 

Static Public Attributes

static const unsigned int NO_INDEX = numeric_limits<unsigned int>::max()
 Index of nonexistent Pit.
 

Detailed Description

Defines nested pits.

Constructor & Destructor Documentation

delphos::NestedPits::NestedPits ( NestedPitInstance pi)

Create new nested pits.

Parameters
piThe nested pit instance the nested pits refers to.

Member Function Documentation

delphos::BlockSelection * delphos::NestedPits::GetBlocksInPitByIndex ( const unsigned int &  pitindex) const

Returns the pit of given index.

Parameters
pitindexThe Pit index of returned pit.

pitindex vary from 0 to GetSize()-1

delphos::BlockSelection * delphos::NestedPits::GetBlocksInPitByRF ( const double &  rf) const

Returns the pit of given revenue factor.

Parameters
rfThe revenue factor of returned pit.
unsigned int delphos::NestedPits::GetPitId ( const delphos::Block block) const

Returns the index of the Pit minimum that contains given block.

Parameters
blockThe block for which the index of minimum pit that contains it is returned.
unsigned int delphos::NestedPits::GetPitId ( const BlockIndexType &  blockid) const

Returns the index of the Pit minimum that contains given block id.

Parameters
blockidThe block id for which the index of minimum pit that contains it is returned.
double delphos::NestedPits::GetRF ( const delphos::Block block) const

Returns the Revenue factor of the Pit minimum that contains given block.

Parameters
blockThe block for which the revenue factor of minimum pit that containt it is returned.
double delphos::NestedPits::GetRF ( BlockIndexType  blockid) const

Returns the Revenue factor of the Pit minimum that contains given block id.

Parameters
blockidThe block id for which the revenue factor of minimum pit that containt it is returned.
void delphos::NestedPits::StorePitsAsAttribute ( const string &  attribute,
const bool &  multiattr = true 
)

Saves the nested pits as an attribute or as attributes in the block model.

Parameters
attributeName of the attribute the nested pits will be saved into.
multiattrboolean equal to FALSE only if the nested pits will be saved into only 1 attribute.

This method creates an attribute in the block model and stores the nested pit in this attribute or these attributes.


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