Version: 8.3.0
TimeKeeper Class Reference

#include <MEDFileFieldRepresentationTree.hxx>

Public Member Functions

 TimeKeeper (int policy)
 
int getPolicy () const
 
void setPolicy (int policy)
 
std::vector< double > getTimeStepsRegardingPolicy (const std::vector< std::pair< int, int > > &tsPairs, const std::vector< double > &ts) const
 
int getTimeStepIdFrom (double timeReq) const
 
std::vector< double > getPostProcessedTime () const
 
void printSelf (std::ostream &oss) const
 
std::vector< bool > getTheVectOfBool () const
 
std::vector< std::pair< bool,
std::string > > & 
getTimesFlagArray ()
 
void setMaxNumberOfTimeSteps (int maxNumberOfTS)
 

Private Member Functions

std::vector< double > getTimeStepsRegardingPolicy0 (const std::vector< std::pair< int, int > > &tsPairs, const std::vector< double > &ts) const
 
std::vector< double > getTimeStepsRegardingPolicy1 (const std::vector< std::pair< int, int > > &tsPairs, const std::vector< double > &ts) const
 
std::vector< double > processedUsingPairOfIds (const std::vector< std::pair< int, int > > &tsPairs) const
 

Private Attributes

int _policy
 
std::vector< double > _postprocessed_time
 
std::vector< std::pair< bool,
std::string > > 
_activated_ts
 

Constructor & Destructor Documentation

TimeKeeper::TimeKeeper ( int  policy)

Member Function Documentation

int TimeKeeper::getPolicy ( ) const
void TimeKeeper::setPolicy ( int  policy)
std::vector< double > TimeKeeper::getTimeStepsRegardingPolicy ( const std::vector< std::pair< int, int > > &  tsPairs,
const std::vector< double > &  ts 
) const
int TimeKeeper::getTimeStepIdFrom ( double  timeReq) const

References _postprocessed_time.

std::vector<double> TimeKeeper::getPostProcessedTime ( ) const
void TimeKeeper::printSelf ( std::ostream &  oss) const

References _activated_ts.

std::vector< bool > TimeKeeper::getTheVectOfBool ( ) const

References _activated_ts.

std::vector< std::pair<bool,std::string> >& TimeKeeper::getTimesFlagArray ( )
void TimeKeeper::setMaxNumberOfTimeSteps ( int  maxNumberOfTS)

References _activated_ts.

std::vector< double > TimeKeeper::getTimeStepsRegardingPolicy0 ( const std::vector< std::pair< int, int > > &  tsPairs,
const std::vector< double > &  ts 
) const
private

policy = 0 : if all of ts are in -1e299,1e299 and different each other pairs are ignored ts taken directly. if all of ts are in -1e299,1e299 but some are not different each other ts are ignored pairs used if some of ts are out of -1e299,1e299 ts are ignored pairs used

References _postprocessed_time, getPostProcessedTime(), and processedUsingPairOfIds().

std::vector< double > TimeKeeper::getTimeStepsRegardingPolicy1 ( const std::vector< std::pair< int, int > > &  tsPairs,
const std::vector< double > &  ts 
) const
private

policy = 1 : idem than 0, except that ts is preaccumulated before invoking policy 0.

References getTimeStepsRegardingPolicy0().

std::vector< double > TimeKeeper::processedUsingPairOfIds ( const std::vector< std::pair< int, int > > &  tsPairs) const
private

Field Documentation

int TimeKeeper::_policy
private
std::vector<double> TimeKeeper::_postprocessed_time
mutableprivate
std::vector< std::pair<bool,std::string> > TimeKeeper::_activated_ts
private