Gadget
Public Member Functions | Protected Attributes | List of all members
StockAggregator Class Reference

This is the class used to aggregate stock information. More...

#include <stockaggregator.h>

Collaboration diagram for StockAggregator:
Collaboration graph

Public Member Functions

 StockAggregator (const StockPtrVector &Stocks, const LengthGroupDivision *const LgrpDiv, const IntMatrix &Areas, const IntMatrix &Ages)
 This is the StockAggregator constructor. More...
 
 ~StockAggregator ()
 This is the default StockAggregator destructor. More...
 
void Reset ()
 This function will reset the stock data. More...
 
void Sum ()
 This function will aggregate the stock data. More...
 
const AgeBandMatrixPtrVectorgetSum () const
 This will return the AgeBandMatrixPtrVector containing the aggregated stock information. More...
 
void Print (ofstream &outfile) const
 This will print the aggregator information to the ofstream specified. More...
 

Protected Attributes

StockPtrVector stocks
 This is the StockPtrVector of the stocks that will be aggregated. More...
 
ConversionIndexPtrVector CI
 This is the ConversionIndexPtrVector used to convert the length groups of the stocks to be aggregated. More...
 
IntMatrix areas
 This is the IntMatrix used to store area information. More...
 
IntMatrix ages
 This is the IntMatrix used to store age information. More...
 
AgeBandMatrixPtrVector total
 This is the AgeBandMatrixPtrVector used to store the aggregated stock information. More...
 
const AgeBandMatrixalptr
 This is the AgeBandMatrix used to temporarily store information when aggregating the stocks. More...
 

Detailed Description

This is the class used to aggregate stock information.

Constructor & Destructor Documentation

◆ StockAggregator()

StockAggregator::StockAggregator ( const StockPtrVector Stocks,
const LengthGroupDivision *const  LgrpDiv,
const IntMatrix Areas,
const IntMatrix Ages 
)

This is the StockAggregator constructor.

Parameters
Stocksis the StockPtrVector of the stocks that will be aggregated
LgrpDivis the LengthGroupDivision that the stocks will be aggregated to
Areasis the IntMatrix of areas that the stocks to be aggregated live on
Agesis the IntMatrix of ages of the stocks to be aggregated

◆ ~StockAggregator()

StockAggregator::~StockAggregator ( )

This is the default StockAggregator destructor.

Member Function Documentation

◆ getSum()

const AgeBandMatrixPtrVector& StockAggregator::getSum ( ) const
inline

This will return the AgeBandMatrixPtrVector containing the aggregated stock information.

Returns
total, the AgeBandMatrixPtrVector of aggregated stock information

◆ Print()

void StockAggregator::Print ( ofstream &  outfile) const

This will print the aggregator information to the ofstream specified.

Parameters
outfileis the ofstream to the file that the aggregator information gets sent to

◆ Reset()

void StockAggregator::Reset ( )

This function will reset the stock data.

◆ Sum()

void StockAggregator::Sum ( )

This function will aggregate the stock data.

Member Data Documentation

◆ ages

IntMatrix StockAggregator::ages
protected

This is the IntMatrix used to store age information.

◆ alptr

const AgeBandMatrix* StockAggregator::alptr
protected

This is the AgeBandMatrix used to temporarily store information when aggregating the stocks.

◆ areas

IntMatrix StockAggregator::areas
protected

This is the IntMatrix used to store area information.

◆ CI

ConversionIndexPtrVector StockAggregator::CI
protected

This is the ConversionIndexPtrVector used to convert the length groups of the stocks to be aggregated.

◆ stocks

StockPtrVector StockAggregator::stocks
protected

This is the StockPtrVector of the stocks that will be aggregated.

◆ total

AgeBandMatrixPtrVector StockAggregator::total
protected

This is the AgeBandMatrixPtrVector used to store the aggregated stock information.


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