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


C++ Eref::fieldIndex方法代码示例

本文整理汇总了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_ );
}
开发者ID:2pysarthak,项目名称:moose-core-personal,代码行数:10,代码来源:Synapse.cpp

示例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;
}
开发者ID:2pysarthak,项目名称:moose-core-personal,代码行数:15,代码来源:SingleMsg.cpp

示例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();
}
开发者ID:NeuroArchive,项目名称:moose,代码行数:45,代码来源:Neutral.cpp

示例4: getFieldIndex

unsigned int Neutral::getFieldIndex( const Eref& e ) const
{
	return e.fieldIndex();
}
开发者ID:2pysarthak,项目名称:moose-core-personal,代码行数:4,代码来源:Neutral.cpp

示例5:

vector< double >MeshEntry::getDiffusionScaling( const Eref& e ) const
{
	return parent_->getDiffusionScaling( e.fieldIndex() );
}
开发者ID:csiki,项目名称:MOOSE,代码行数:4,代码来源:MeshEntry.cpp

示例6: getMeshType

unsigned int MeshEntry::getMeshType( const Eref& e ) const
{
	return parent_->getMeshType( e.fieldIndex() );
}
开发者ID:csiki,项目名称:MOOSE,代码行数:4,代码来源:MeshEntry.cpp

示例7: getDimensions

unsigned int MeshEntry::getDimensions( const Eref& e ) const
{
	return parent_->getMeshDimensions( e.fieldIndex() );
}
开发者ID:csiki,项目名称:MOOSE,代码行数:4,代码来源:MeshEntry.cpp

示例8: getTopSpike

double Synapse::getTopSpike( const Eref& e ) const
{
	return handler_->getTopSpike( e.fieldIndex() );
}
开发者ID:hrani,项目名称:moose-core,代码行数:4,代码来源:Synapse.cpp


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