Miind
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GeomLib::BinEstimator Class Reference

#include <libs/GeomLib/BinEstimator.hpp>

Collaboration diagram for GeomLib::BinEstimator:
Collaboration graph

Classes

struct  BinCover
 

Public Types

typedef std::pair< BinCover, BinCoverCoverPair
 

Public Member Functions

 BinEstimator (const vector< Potential > &, const OdeParameter &)
 
 ~BinEstimator ()
 
CoverPair CalculateBinCover (MPILib::Index i, Potential h) const
 
const vector< double > & InterpretationArray () const
 
MPILib::Index SearchBin (Potential) const
 

Private Member Functions

double BinHighFraction (Potential, int) const
 
double BinLowFraction (Potential, int) const
 
int Search (MPILib::Index, Potential, Potential) const
 
int SearchBin (MPILib::Index, Potential, Potential) const
 
Potential Translate (Potential, Potential) const
 

Private Attributes

const OdeParameter _par_ode
 
vector< double > _vec_interpretation
 

Detailed Description

Calculates the coverage corresponding a given bin and a potential difference.

In a non-equidistant grid, it is important to determine which bins correspond to the probability mass in a given bin. The current bin must be translated by an amount commensurate to the synaptic efficacy of the connection under consideration. The translated bin can cover a number of other bins, some partially or it can cover a single bin partially. The object uses linear search to determine where in which bin the translated end points of a given bin fall.

Definition at line 41 of file BinEstimator.hpp.

Member Typedef Documentation

Type representing begin an end bins of a translated bins and the respective covering fraction.

Definition at line 51 of file BinEstimator.hpp.

Constructor & Destructor Documentation

BinEstimator::BinEstimator ( const vector< Potential > &  ,
const OdeParameter  
)

Constructor.

Definition at line 30 of file BinEstimator.cpp.

BinEstimator::~BinEstimator ( )

Definition at line 39 of file BinEstimator.cpp.

Member Function Documentation

double BinEstimator::BinHighFraction ( Potential  v,
int  i_tr_high 
) const
private

Definition at line 103 of file BinEstimator.cpp.

double BinEstimator::BinLowFraction ( Potential  v,
int  i_tr_low 
) const
private

Definition at line 92 of file BinEstimator.cpp.

BinEstimator::CoverPair BinEstimator::CalculateBinCover ( MPILib::Index  i,
Potential  h 
) const

Cover pair looks at the boundaries of the current bins and calculates where they would end up if a potential difference is applied to them. The translated lower boundary is represented as the first element of the pair of type BinCover. Its _index member gives the index of the translated boundary where _alpha gives the fraction of the bin that is covered. The coverage is calculated from the upper boundary of the corresponding bin in the interpretation array for the first element in the pair, but from the lower boundary of the corresponding bin. If a translated bin boundary ends up below the minimum potential, the index will be -1. If a translated bin boundary ends up above the maximum potential, the index will be n, where n is the size of the interpretation array. A client must test for these cases. This is odd, and will change in future implementations so that a CoverPair can be reliably used in a loop.

Parameters
i[in] Index of the bin whose boundaries will be shifted
h[in] Potential difference by which bin will be shifted. Careful! Excitation requires a negative shift.

Definition at line 114 of file BinEstimator.cpp.

References i.

const vector<double>& GeomLib::BinEstimator::InterpretationArray ( ) const
inline

Read only access to the interpretation array.

Definition at line 86 of file BinEstimator.hpp.

References _vec_interpretation.

int BinEstimator::Search ( MPILib::Index  ind,
Potential  v,
Potential  dv 
) const
private

Definition at line 58 of file BinEstimator.cpp.

References i.

MPILib::Index BinEstimator::SearchBin ( Potential  v) const

Use for testing purposes, for any normal usage CalculateBinCover should be used. This function returns the index of the bin that contains the potential and throws an exception if the Potential is below the minimum or above the maximum of the potential range covered by the interpretation array.

Definition at line 42 of file BinEstimator.cpp.

References i.

int BinEstimator::SearchBin ( MPILib::Index  ind,
Potential  v,
Potential  dv 
) const
private

Definition at line 70 of file BinEstimator.cpp.

References i.

Potential BinEstimator::Translate ( Potential  v,
Potential  delta_v 
) const
private

Definition at line 86 of file BinEstimator.cpp.

Member Data Documentation

const OdeParameter GeomLib::BinEstimator::_par_ode
private

Definition at line 128 of file BinEstimator.hpp.

vector<double> GeomLib::BinEstimator::_vec_interpretation
private

Definition at line 130 of file BinEstimator.hpp.

Referenced by InterpretationArray().


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