当前位置: 首页>>代码示例>>C++>>正文


C++ CurrentEvent类代码示例

本文整理汇总了C++中CurrentEvent的典型用法代码示例。如果您正苦于以下问题:C++ CurrentEvent类的具体用法?C++ CurrentEvent怎么用?C++ CurrentEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CurrentEvent类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: assert

void
nest::ac_generator::update( Time const& origin, const long from, const long to )
{
  assert(
    to >= 0 && ( delay ) from < kernel().connection_manager.get_min_delay() );
  assert( from < to );

  long start = origin.get_steps();

  CurrentEvent ce;
  for ( long lag = from; lag < to; ++lag )
  {
    S_.I_ = 0.0;

    if ( device_.is_active( Time::step( start + lag ) ) )
    {
      const double y_0 = S_.y_0_;
      S_.y_0_ = V_.A_00_ * y_0 + V_.A_01_ * S_.y_1_;
      S_.y_1_ = V_.A_10_ * y_0 + V_.A_11_ * S_.y_1_;
      S_.I_ = S_.y_1_ + P_.offset_;

      ce.set_current( S_.I_ );
      kernel().event_delivery_manager.send( *this, ce, lag );
    }
    B_.logger_.record_data( origin.get_steps() + lag );
  }
}
开发者ID:markovg,项目名称:nest-simulator,代码行数:27,代码来源:ac_generator.cpp

示例2: assert

void
nest::izhikevich::handle( CurrentEvent& e )
{
    assert( e.get_delay() > 0 );

    const double_t c = e.get_current();
    const double_t w = e.get_weight();
    B_.currents_.add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), w * c );
}
开发者ID:CiNCFZJ,项目名称:nest-simulator,代码行数:9,代码来源:izhikevich.cpp

示例3: assert

void
nest::iaf_cond_alpha::handle( CurrentEvent& e )
{
  assert( e.get_delay_steps() > 0 );

  // add weighted current; HEP 2002-10-04
  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ),
    e.get_weight() * e.get_current() );
}
开发者ID:dnao,项目名称:nest-simulator,代码行数:10,代码来源:iaf_cond_alpha.cpp

示例4: assert

void
nest::izhikevich::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );

  const double_t c = e.get_current();
  const double_t w = e.get_weight();
  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), w * c );
}
开发者ID:gewaltig,项目名称:nest-simulator,代码行数:10,代码来源:izhikevich.cpp

示例5: assert

void mynest::coronet_neuron::handle(CurrentEvent& e)
{
  assert(e.get_delay() > 0);

  const double_t c=e.get_current();
  const double_t w=e.get_weight();

  // add weighted current; HEP 2002-10-04
  B_.currents_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), 
		      w *c);
}
开发者ID:bvogginger,项目名称:coronet-nest-module,代码行数:11,代码来源:coronet_neuron.cpp

示例6: assert

void nest::iaf_psc_alpha_mod::handle(CurrentEvent& e)
{
  assert(e.get_delay() > 0);

  const double_t I = e.get_current();
  const double_t w = e.get_weight();

  // add weighted current; HEP 2002-10-04
  B_.currents_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()),
		                     w * I);
}
开发者ID:QJonny,项目名称:CyNest,代码行数:11,代码来源:iaf_psc_alpha_mod.cpp

示例7: assert

void
nest::iaf_tum_2000::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );

  const double_t c = e.get_current();
  const double_t w = e.get_weight();

  // add weighted current; HEP 2002-10-04
  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), w * c );
}
开发者ID:gewaltig,项目名称:nest-simulator,代码行数:12,代码来源:iaf_tum_2000.cpp

示例8: assert

void
iaf_psc_alpha::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );

  const double I = e.get_current();
  const double w = e.get_weight();

  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ),
    w * I );
}
开发者ID:DimitriPlotnikov,项目名称:nest-simulator,代码行数:12,代码来源:iaf_psc_alpha.cpp

示例9: kernel

void
nest::dc_generator::update( Time const& origin, const long from, const long to )
{
  long start = origin.get_steps();

  CurrentEvent ce;
  ce.set_current( P_.amp_ );

  for ( long offs = from; offs < to; ++offs )
    if ( device_.is_active( Time::step( start + offs ) ) )
      kernel().event_delivery_manager.send( *this, ce, offs );
}
开发者ID:DimitriPlotnikov,项目名称:nest-simulator,代码行数:12,代码来源:dc_generator.cpp

示例10: assert

void
iaf_psc_alpha_multisynapse::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );

  const double_t I = e.get_current();
  const double_t w = e.get_weight();

  // add weighted current; HEP 2002-10-04
  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), w * I );
}
开发者ID:healther,项目名称:nest-simulator,代码行数:12,代码来源:iaf_psc_alpha_multisynapse.cpp

示例11: network

void
nest::dc_generator::update( Time const& origin, const long_t from, const long_t to )
{
  long_t start = origin.get_steps();

  CurrentEvent ce;
  ce.set_current( P_.amp_ );

  for ( long_t offs = from; offs < to; ++offs )
    if ( device_.is_active( Time::step( start + offs ) ) )
      network()->send( *this, ce, offs );
}
开发者ID:JanneM,项目名称:nest-simulator,代码行数:12,代码来源:dc_generator.cpp

示例12: assert

void
iaf_psc_delta_canon::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );

  const double_t c = e.get_current();
  const double_t w = e.get_weight();

  // add stepwise constant current; MH 2009-10-14
  B_.currents_.add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), w * c );
}
开发者ID:healther,项目名称:nest-simulator,代码行数:12,代码来源:iaf_psc_delta_canon.cpp

示例13: network

void nest::ac_generator::update(Time const & origin, const long_t from, const long_t to)
{
  long_t start = origin.get_steps();

  CurrentEvent ce;
  for ( long_t lag = from ; lag < to ; ++lag )
    if( device_.is_active(Time::step(start+lag) ))
      {
        const double_t y_0 = S_.y_0_;
        S_.y_0_ = V_.A_00_ * y_0 + V_.A_01_ * S_.y_1_;
        S_.y_1_ = V_.A_10_ * y_0 + V_.A_11_ * S_.y_1_;
        ce.set_current(S_.y_1_ + P_.offset_);
        network()->send(*this, ce, lag);
      }
}
开发者ID:MogeiWang,项目名称:nest,代码行数:15,代码来源:ac_generator.cpp

示例14: assert

void
nest::iaf_cond_alpha_mc::handle( CurrentEvent& e )
{
  assert( e.get_delay() > 0 );
  assert( 0 <= e.get_rport() && e.get_rport() < NCOMP ); // not 100% clean, should look at MIN, SUP

  // add weighted current; HEP 2002-10-04
  B_.currents_[ e.get_rport() ].add_value(
    e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ),
    e.get_weight() * e.get_current() );
}
开发者ID:gewaltig,项目名称:nest-simulator,代码行数:11,代码来源:iaf_cond_alpha_mc.cpp


注:本文中的CurrentEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。