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

Abstracts a sum function to be evaluated over a set of blocks. More...

#include <blocksel.h>

Inheritance diagram for delphos::SelectionSum:
Inheritance graph
Collaboration diagram for delphos::SelectionSum:
Collaboration graph

Public Member Functions

 SelectionSum (const string &column_to_add)
 Defines the attribute to be added. More...
 
virtual const string & ColumnToAdd () const
 Retrieves rhe name of the attribute column that is going to be added.
 
virtual double Eval (const delphos::BlockSelection &bsel) const
 Evaluates the operation over the given selection. More...
 
- Public Member Functions inherited from delphos::SelectionFunctor
virtual ~SelectionFunctor ()
 Destroys the selection functor.
 

Detailed Description

Abstracts a sum function to be evaluated over a set of blocks.

Constructor & Destructor Documentation

delphos::SelectionSum::SelectionSum ( const string &  column_to_add)

Defines the attribute to be added.

Parameters
column_to_addThe name of the attribute column that is going to be added.

Member Function Documentation

double delphos::SelectionSum::Eval ( const delphos::BlockSelection bsel) const
virtual

Evaluates the operation over the given selection.

Parameters
bselThe BlockSelection instance to be evaluated.
Returns
The sum of the defined attribute column over the given selection.

If the column to be added is not found in the selection's subyacent BlockModel instance, an exception is thrown.

Implements delphos::SelectionFunctor.

Reimplemented in delphos::SelectionAvg.


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