bool iAIDA::AIDA_Histogram_native::AIDA_Histogram2D::reset() { for ( unsigned int i = 0; i < m_bins.size(); ++i ) for ( unsigned int j = 0; j < m_bins[0].size(); ++j ) m_bins[i][j]->reset(); m_sumWeightTimesSquaredX = m_sumWeightTimesSquaredY = 0; setUpToDate( false ); m_validStatistics = false; return true; }
void PokeGraphics::load(int gender, bool shiny) { if (upToDate() && gender==m_storedgender && shiny == m_storedshininess) return; m_storedgender = gender; m_storedshininess = shiny; m_picture = PokemonInfo::Picture(num(), gen(), gender, shiny, false); setUpToDate(true); }
bool iAIDA::AIDA_Histogram_native::AIDA_Histogram2D::scale( double scaleFactor ) { for ( unsigned int i = 0; i < m_bins.size(); ++i ) for ( unsigned int j = 0; j < m_bins[0].size(); ++j ) m_bins[i][j]->scale( scaleFactor ); m_sumWeightTimesSquaredX *= scaleFactor; m_sumWeightTimesSquaredY *= scaleFactor; setUpToDate( false ); m_validStatistics = false; return true; }
bool iAIDA::AIDA_Histogram_native::AIDA_Histogram2D::increment( const AIDA_Histogram2D& h ) { for ( unsigned int i = 0; i < m_bins.size(); ++i ) { for ( unsigned int j = 0; j < m_bins[0].size(); ++j ) { m_bins[i][j]->increment( *( h.m_bins[i][j] ) ); } } m_sumWeightTimesSquaredX += h.m_sumWeightTimesSquaredX; m_sumWeightTimesSquaredY += h.m_sumWeightTimesSquaredY; setUpToDate( false ); m_validStatistics = false; return true; }
bool iAIDA::AIDA_Histogram_native::AIDA_Histogram2D::fill( double x, double y, double weight ) { // ignore Nan's filled in histograms if (isNaN(x) || isNaN(y) || isNaN(weight) ) return false; const int binIndexX = m_axisX->coordToIndex( x ); const int binIndexY = m_axisY->coordToIndex( y ); m_bins[binIndexX + numberOfExtraBins][binIndexY + numberOfExtraBins]->fill( weight, x, y ); if ( binIndexX >= 0 && binIndexY >= 0 ) { m_sumWeightTimesSquaredX += weight * x * x; m_sumWeightTimesSquaredY += weight * y * y; } setUpToDate( false ); m_validStatistics = false; return true; }
bool iAIDA::AIDA_Histogram_native::AIDA_Histogram2D::setBinContents( int binIndexX, int binIndexY, int entries, double height, double error, double centreX, double centreY ) { unsigned int realIndexX = binIndexX + numberOfExtraBins; if ( realIndexX >= m_bins.size() ) return false; unsigned int realIndexY = binIndexY + numberOfExtraBins; if ( realIndexY >= m_bins[0].size() ) return false; // set also sumwx2 in case setRms will not be called if (binIndexX >= 0) m_sumWeightTimesSquaredX += height*centreX*centreX; if (binIndexY >= 0) m_sumWeightTimesSquaredY += height*centreY*centreY; setUpToDate( false ); m_validStatistics = false; return m_bins[ realIndexX ][realIndexY]->set( entries, height, error, centreX, centreY ); }
//----------------------------------------------------------------------------------------------- // processes the model after the reservoir simulator is run //----------------------------------------------------------------------------------------------- void DecoupledModel::process() { // update the streams in the pipe network updateStreams(); // calculating pressures in the Pipe network calculatePipePressures(); // updating the constraints (this must be done after the pressure calc) updateConstraints(); // updating the objective updateObjectiveValue(); // updating the status of the model setUpToDate(true); }
void PokeGraphics::setGen(Pokemon::gen gen) { m_gen = gen; setUpToDate(false); }
void PokeGraphics::setNum(Pokemon::uniqueId num) { m_num = num; setUpToDate(false); }
void PokeGraphics::setGen(int gen) { m_gen = gen; setUpToDate(false); }