void SynChan::normalizeGbar() { if ( doubleEq( tau2_, 0.0 ) ) { // norm_ = 1.0; norm_ = SynChanBase::getGbar(); } else { if ( doubleEq( tau1_, tau2_ ) ) { norm_ = SynChanBase::getGbar() * SynE() / tau1_; } else { double tpeak = tau1_ * tau2_ * log( tau1_ / tau2_ ) / ( tau1_ - tau2_ ); norm_ = SynChanBase::getGbar() * ( tau1_ - tau2_ ) / ( tau1_ * tau2_ * ( exp( -tpeak / tau1_ ) - exp( -tpeak / tau2_ ) )); } } if ( normalizeWeights_ && getNumSynapses() > 0 ) norm_ /= static_cast< double >( getNumSynapses() ); }
void SynChan::normalizeGbar() { if ( doubleEq( tau2_, 0.0 ) ) { // norm_ = 1.0; norm_ = ChanCommon::getGbar(); } else { if ( doubleEq( tau1_, tau2_ ) ) { norm_ = ChanCommon::getGbar() * SynE() / tau1_; } else { double tpeak = tau1_ * tau2_ * log( tau1_ / tau2_ ) / ( tau1_ - tau2_ ); norm_ = ChanCommon::getGbar() * ( tau1_ - tau2_ ) / ( tau1_ * tau2_ * ( exp( -tpeak / tau1_ ) - exp( -tpeak / tau2_ ) )); } } /* * Can't handle at this time. Simple but tedious to implement. if ( normalizeWeights_ && getNumSynapses() > 0 ) norm_ /= static_cast< double >( getNumSynapses() ); */ }