src/NFcore/observable.cpp
/* add multiple new matches to an observable (rather than call 'add' a bunch of times --justin */
/* useful for counters! */
add multiple new matches to an observable (rather than call 'add' a bunch of times --justin
useful for counters!
add multiple new matches to an observable ( rather than call ' add ' a bunch of times -- justin useful for counters!
void Observable::add( int n_matches )
{
	count += n_matches;
	for (int r=0; r<n_dependentRxns; r++)
	{
		double old_a = dependentRxns[r]->get_a();
		double new_a = dependentRxns[r]->update_a();
		templateMolecules[0]->getMoleculeType()->getSystem()->update_A_tot( dependentRxns[r], old_a, new_a);
	}
}
void Observable :: add ( int n_matches ) { count += n_matches ; for ( int r = 0 ; r < n_dependentRxns ; r ++ ) { double old_a = dependentRxns [ r ] -> get_a ( ) ; double new_a = dependentRxns [ r ] -> update_a ( ) ; templateMolecules [ 0 ] -> getMoleculeType ( ) -> getSystem ( ) -> update_A_tot ( dependentRxns [ r ] , old_a , new_a ) ; } }
add multiple new matches to an observable (rather than call 'add' a bunch of times --justin
useful for counters!
add multiple new matches to an observable ( rather than call ' add ' a bunch of times -- justin useful for counters!
//debug //cout << "Observable::add( " << n_matches << " )" << endl; // First, we add to our observable count // Next, we update our dependent reactions, if there are any