本文整理汇总了C++中Eref::fieldIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ Eref::fieldIndex方法的具体用法?C++ Eref::fieldIndex怎么用?C++ Eref::fieldIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eref
的用法示例。
在下文中一共展示了Eref::fieldIndex方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addSpike
void Synapse::addSpike( const Eref& e, double time )
{
static bool report = false;
static unsigned int tgtDataIndex = 0;
// static unsigned int tgtFieldIndex = 0;
if ( report && e.dataIndex() == tgtDataIndex ) {
cout << " " << time << "," << e.fieldIndex();
}
handler_->addSpike( e.fieldIndex(), time + delay_, weight_ );
}
示例2: Msg
SingleMsg::SingleMsg( const Eref& e1, const Eref& e2, unsigned int msgIndex)
: Msg( ObjId( managerId_, (msgIndex != 0 ) ? msgIndex: msg_.size() ),
e1.element(), e2.element() ),
i1_( e1.dataIndex() ),
i2_( e2.dataIndex() ),
f2_( e2.fieldIndex() )
{
if ( msgIndex == 0 ) {
msg_.push_back( this );
return;
} else if ( msg_.size() <= msgIndex ) {
msg_.resize( msgIndex + 1 );
}
msg_[ msgIndex ] = this;
}
示例3: path
// Static function
string Neutral::path( const Eref& e )
{
static const Finfo* pf = neutralCinfo->findFinfo( "parentMsg" );
static const DestFinfo* pf2 = dynamic_cast< const DestFinfo* >( pf );
static const FuncId pafid = pf2->getFid();
vector< ObjId > pathVec;
ObjId curr = e.objId();
stringstream ss;
pathVec.push_back( curr );
while ( curr.id != Id() ) {
ObjId mid = curr.eref().element()->findCaller( pafid );
if ( mid == ObjId() ) {
cout << "Error: Neutral::path:Cannot follow msg of ObjId: " <<
e.objId() << " for func: " << pafid << endl;
break;
}
curr = Msg::getMsg( mid )->findOtherEnd( curr );
pathVec.push_back( curr );
}
if ( pathVec.size() <= 1 )
return "/";
for ( unsigned int i = 1; i < pathVec.size(); ++i ) {
ss << "/";
ObjId& oid = pathVec[ pathVec.size() - i - 1 ];
ss << oid.element()->getName();
if ( !oid.element()->hasFields() )
ss << "[" << oid.dataIndex << "]";
/*
if ( !oid.element()->hasFields() )
ss << "[" << oid.dataIndex << "]";
if ( oid.element()->numData() > 1 )
ss << "[" << oid.dataIndex << "]";
*/
}
// Append braces if Eref was for a fieldElement. This should
// work even if it is off-node.
if ( e.element()->hasFields() ) {
ss << "[" << e.fieldIndex() << "]";
}
return ss.str();
}
示例4: getFieldIndex
unsigned int Neutral::getFieldIndex( const Eref& e ) const
{
return e.fieldIndex();
}
示例5:
vector< double >MeshEntry::getDiffusionScaling( const Eref& e ) const
{
return parent_->getDiffusionScaling( e.fieldIndex() );
}
示例6: getMeshType
unsigned int MeshEntry::getMeshType( const Eref& e ) const
{
return parent_->getMeshType( e.fieldIndex() );
}
示例7: getDimensions
unsigned int MeshEntry::getDimensions( const Eref& e ) const
{
return parent_->getMeshDimensions( e.fieldIndex() );
}
示例8: getTopSpike
double Synapse::getTopSpike( const Eref& e ) const
{
return handler_->getTopSpike( e.fieldIndex() );
}