本文整理汇总了C++中getSequence函数的典型用法代码示例。如果您正苦于以下问题:C++ getSequence函数的具体用法?C++ getSequence怎么用?C++ getSequence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getSequence函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: getDT
VarExprReturnSP LitMatrixExprReturn::convertToVarExprReturn( VarExprReturn &varExprReturn ) {
SFC::DT dt = getDT();
// assert( dt == varExprReturn.getDT() );
SFCTypesManager::DimensionVector dimensionVector = SFCTypesManager::getDimensions( dt );
if ( dimensionVector.empty() ) {
Exprs exprs = DE( getSequence().front() );
VarExprReturnSP varExprReturnSP = VarExprReturn::create( getBlock(), exprs, ExprsProxyVector(), SFCTypesManager::getSingleton().getBasicType( "double" ) );
varExprReturn.combine( "=", varExprReturnSP )->collapse();
return VarExprReturn::create( varExprReturn );
}
SFCTypesManager::DimensionVector countVector( dimensionVector.size(), 0 );
for( Sequence::iterator sqnItr = getSequence().begin() ; sqnItr != getSequence().end() ; ++sqnItr ) {
for( unsigned int ix = 0 ; ix < (unsigned int) dimensionVector.size() ; ++ix ) {
varExprReturn.getExprsProxyVector()[ ix ].setExprs( IE( countVector[ ix ] ) );
}
Exprs exprs = BE( varExprReturn.getExprs(), "=", DE( *sqnItr ) );
exprs.buildUdm( getBlock(), SFC::CompoundStatement::meta_stmnt );
for( int ix = dimensionVector.size() ; --ix >= 0 ;) {
if ( ++countVector[ix] < dimensionVector[ix] ) break;
countVector[ix] = 0;
}
}
return VarExprReturn::create( varExprReturn );
}
开发者ID:pombreda,项目名称:metamorphosys-desktop,代码行数:33,代码来源:LitMatrixExprReturn.cpp
示例2: getSequence
//This function gets the node's sequence. The full parameter only has an effect
//for Velvet LastGraph files where the sequences are shifted from their reverse
//complement. If full is true and the graph is from Velvet, this function will
//extend the sequence using either the reverse complement or upstream nodes.
QByteArray DeBruijnNode::getFullSequence() const
{
if (g_assemblyGraph->m_graphFileType != LAST_GRAPH)
return getSequence();
//If the code got here, then we are getting a full sequence from a Velvet
//LastGraph graph, so we need to extend the beginning of the sequence.
int extensionLength = g_assemblyGraph->m_kmer - 1;
//If the node is at least k-1 in length, then the necessary sequence can be
//deduced from the reverse complement node.
if (getLength() >= extensionLength)
{
QByteArray revCompSeq = getReverseComplement()->getSequence();
QByteArray endOfRevCompSeq = revCompSeq.right(extensionLength);
QByteArray extension = AssemblyGraph::getReverseComplement(endOfRevCompSeq);
return extension + getSequence();
}
//If the node is not long enough, then we must look in upstream nodes for
//the rest of the sequence.
else
{
QByteArray extension = getUpstreamSequence(extensionLength);
if (extension.length() < extensionLength)
{
int additionalBases = extensionLength - extension.length();
QByteArray n;
n.fill('N', additionalBases);
extension = n + extension;
}
return extension + getSequence();
}
}
开发者ID:fxia22,项目名称:Bandage,代码行数:38,代码来源:debruijnnode.cpp
示例3: setSubRegion
bool UniPAX::DnaReference::merge(DnaReference& object)
{
if (subRegion != 0)
{
if (object.getSubRegion() != 0)
{
if (subRegion->getUnipaxId() != object.getSubRegion()->getUnipaxId())
{
std::cerr << "Error during merging: UniPAX::DnaReference::subRegion not equal ..."
<< subRegion->getUnipaxId() << " != " << object.getSubRegion()->getUnipaxId() << std::endl;
return false;
}
}
}
else
{
setSubRegion(object.getSubRegion());
}
if (organism != 0)
{
if (object.getOrganism() != 0)
{
if (organism->getUnipaxId() != object.getOrganism()->getUnipaxId())
{
std::cerr << "Error during merging: UniPAX::DnaReference::organism not equal ..."
<< organism->getUnipaxId() << " != " << object.getOrganism()->getUnipaxId() << std::endl;
return false;
}
}
}
else
{
setOrganism(object.getOrganism());
}
if (!object.getSequence().empty())
{
if (!getSequence().empty())
{
if (getSequence() != object.getSequence())
{
std::cerr << "Error during merging: UniPAX::DnaReference::sequence not equal ..."
<< getSequence() << " != " << object.getSequence() << std::endl;
return false;
}
}
else
setSequence(object.getSequence());
}
return UniPAX::EntityReference::merge(object);
}
开发者ID:thortiede,项目名称:unipax,代码行数:53,代码来源:DnaReference.cpp
示例4: getSequence
ExprReturnSP LitMatrixExprReturn::collapseLogical() {
if ( getDT().type() != SFC::Array::meta ) return create( *this );
Sequence::iterator sqnItr = getSequence().begin();
SFC::LocalVar localVar = SFCManager::createUniqueLocalVar( getBlock(), "test" );
bool value = *sqnItr != 0;
while( ++sqnItr != getSequence().end() ) value = value && ( *sqnItr != 0 );
return create( getBlock(), value );
}
开发者ID:pombreda,项目名称:metamorphosys-desktop,代码行数:12,代码来源:LitMatrixExprReturn.cpp
示例5: getSequence
void TSThread::activateTriggers(F32 a, F32 b)
{
S32 i;
const TSShape * shape = mShapeInstance->mShape;
S32 firstTrigger = getSequence()->firstTrigger;
S32 numTriggers = getSequence()->numTriggers;
// first find triggers at position a and b
// we assume there aren't many triggers, so
// search is linear
F32 lastPos = -1.0f;
S32 aIndex = numTriggers+firstTrigger; // initialized to handle case where pos past all triggers
S32 bIndex = numTriggers+firstTrigger; // initialized to handle case where pos past all triggers
for (i=firstTrigger; i<numTriggers+firstTrigger; i++)
{
TSShape::Trigger currentTrigger = shape->triggers[i];
// is a between this trigger and previous one...
if (a>lastPos && a <= currentTrigger.pos)
aIndex = i;
// is b between this trigger and previous one...
if (b>lastPos && b <= currentTrigger.pos)
bIndex = i;
lastPos = currentTrigger.pos;
}
// activate triggers between aIndex and bIndex (depends on direction)
if (aIndex<=bIndex)
{
for (i=aIndex; i<bIndex; i++)
{
U32 state = shape->triggers[i].state;
bool on = (state & TSShape::Trigger::StateOn)!=0;
mShapeInstance->setTriggerStateBit(state & TSShape::Trigger::StateMask, on);
}
}
else
{
for (i=aIndex-1; i>=bIndex; i--)
{
U32 state = shape->triggers[i].state;
bool on = (state & TSShape::Trigger::StateOn)!=0;
if (state & TSShape::Trigger::InvertOnReverse)
on = !on;
mShapeInstance->setTriggerStateBit(state & TSShape::Trigger::StateMask, on);
}
}
}
开发者ID:03050903,项目名称:Torque3D,代码行数:48,代码来源:tsThread.cpp
示例6: AssertFatal
void TSThread::transitionToSequence(S32 seq, F32 toPos, F32 duration, bool continuePlay)
{
AssertFatal(duration>=0.0f,"TSThread::transitionToSequence: negative duration not allowed");
// make sure these nodes are smoothly interpolated to new positions...
// basically, any node we controlled just prior to transition, or at any stage
// of the transition is interpolated. If we start to transtion from A to B,
// but before reaching B we transtion to C, we interpolate all nodes controlled
// by A, B, or C to their new position.
if (transitionData.inTransition)
{
transitionData.oldRotationNodes.overlap(getSequence()->rotationMatters);
transitionData.oldTranslationNodes.overlap(getSequence()->translationMatters);
transitionData.oldScaleNodes.overlap(getSequence()->scaleMatters);
}
else
{
transitionData.oldRotationNodes = getSequence()->rotationMatters;
transitionData.oldTranslationNodes = getSequence()->translationMatters;
transitionData.oldScaleNodes = getSequence()->scaleMatters;
}
// set time characteristics of transition
transitionData.oldSequence = sequence;
transitionData.oldPos = pos;
transitionData.duration = duration;
transitionData.pos = 0.0f;
transitionData.direction = timeScale>0.0f ? 1.0f : -1.0f;
transitionData.targetScale = continuePlay ? 1.0f : 0.0f;
// in transition...
transitionData.inTransition = true;
// set target sequence data
sequence = seq;
priority = getSequence()->priority;
pos = toPos;
makePath = getSequence()->makePath();
path.start = path.end = 0;
path.loop = 0;
// 1.0f doesn't exist on cyclic sequences
if (pos>0.9999f && getSequence()->isCyclic())
pos = 0.9999f;
// select keyframes
selectKeyframes(pos,getSequence(),&keyNum1,&keyNum2,&keyPos);
}
开发者ID:03050903,项目名称:Torque3D,代码行数:48,代码来源:tsThread.cpp
示例7: matrixRsaParsePubKey
/*
Binary to struct helper for RSA public keys.
*/
int32 matrixRsaParsePubKey(psPool_t *pool, unsigned char *keyBuf,
int32 keyBufLen, sslRsaKey_t **key)
{
unsigned char *p, *end;
int32 len;
p = keyBuf;
end = p + keyBufLen;
/*
Supporting both the PKCS#1 RSAPublicKey format and the
X.509 SubjectPublicKeyInfo format. If encoding doesn't start with
the SEQUENCE identifier for the SubjectPublicKeyInfo format, jump down
to the RSAPublicKey subset parser and try that
*/
if (getSequence(&p, (int32)(end - p), &len) == 0) {
if (getAlgorithmIdentifier(&p, (int32)(end - p), &len, 1) < 0) {
return -1;
}
}
/*
Now have the DER stream to extract from in asnp
*/
*key = psMalloc(pool, sizeof(sslRsaKey_t));
if (*key == NULL) {
return -8; /* SSL_MEM_ERROR */
}
memset(*key, 0x0, sizeof(sslRsaKey_t));
if (getPubKey(pool, &p, (int32)(end - p), *key) < 0) {
matrixRsaFreeKey(*key);
*key = NULL;
matrixStrDebugMsg("Unable to ASN parse public key\n", NULL);
return -1;
}
return 0;
}
开发者ID:Mirocow,项目名称:balancer,代码行数:38,代码来源:rsaPki.c
示例8: _log
int CClientAmxController::startClient(int msqKey)
{
_log(LOG_TAG" Connecting to AMX controller validation service %s:%d",
serverIp.c_str(), validationPort);
int nRet = connectWithCallback(serverIp.c_str(), validationPort, msqKey,
[](CATcpClient *caller, pthread_t msgRecvTid, pthread_t pktRecvTid) -> void
{
pthread_setname_np(msgRecvTid, "AmxMsgRecv");
pthread_setname_np(pktRecvTid, "AmxPktRecv");
});
if (nRet < 0)
{
_log(LOG_TAG" startClient() Connecting to AMX controller FAILED");
return FALSE;
}
tokenCache.clear();
nRet = request(getSocketfd(), bind_request, STATUS_ROK, getSequence(), NULL);
if (nRet < 0)
{
_log(LOG_TAG" startClient() Binding to AMX controller FAILED");
return FALSE;
}
// enquireLinkYo starts in onResponse(), when binding response is received
return TRUE;
}
开发者ID:ideasiii,项目名称:ControllerPlatform,代码行数:29,代码来源:CClientAmxController.cpp
示例9: FinalChar
INode * REParser::getSequence(char start, char end)
{
INode * ret = new FinalChar(start);
if (start != end)
ret = new Or(ret, getSequence(start + 1, end));
return ret;
}
开发者ID:salomonbrys-deprecated,项目名称:LLVM-RE-Gen,代码行数:7,代码来源:REParser.cpp
示例10: on_Gene_done_clicked
void Widget::on_Gene_done_clicked()
{
QString temp=ui->gene->text();
gene_sequence=temp.toStdString();
QAction::connect(this,SIGNAL(pass_sequence(string,string)),console_ui,SLOT(getSequence(string,string)));
emit pass_sequence(promoter_sequence,gene_sequence);
for(int i=0;i<GENEAM;i++)
{
QAction::connect(this,SIGNAL(pass_information(GeneIM,int)),console_ui,SLOT(getInformation(GeneIM,int)));
emit pass_information(ecoli[i],i);
}
this->hide();
console_ui->show();
if((int)promoter_sequence.size()<50||(int)gene_sequence.size()<50)
{
console_ui->ui->analyze->setStyleSheet("#analyze{border-image: url(:/picture/picture/gray1.png);color:white;font: 75 18pt \"Arial\";}#analyze:hover{border-image: url(:/picture/picture/gray2.png);}");
console_ui->analyze_flag=1;
console_ui->ui->tips->setText("Sleepy?");
}
else
{
console_ui->ui->analyze->setStyleSheet("#analyze{border-image: url(:/picture/picture/blue1.png);color:white;font: 75 18pt \"Arial\";}#analyze:hover{border-image: url(:/picture/picture/blue2.png);}");
console_ui->analyze_flag=0;
console_ui->ui->tips->setText("Sleepy?");
}
}
开发者ID:igemsoftware,项目名称:USTC-Software2013,代码行数:26,代码来源:widget.cpp
示例11: switch
void PacketQueue::add(const void* data, int len)
{
switch (getProtocolOpcode(data))
{
case OP_Combined:
readCombined(data, len);
break;
case OP_Packet:
case OP_Fragment:
{
uint16_t seq = getSequence(data);
if (seq == m_nextSeq)
{
m_connection.sendToLocal(data, len);
sendQueued(seq + 1);
}
else
{
enqueue(data, len, seq);
}
break;
}
case OP_SessionDisconnect:
m_connection.endSession();
// Fallthrough
default:
// Forward anything that didn't need special handling
m_connection.sendToLocal(data, len);
break;
}
}
开发者ID:Zaela,项目名称:eqemu-login-helper,代码行数:33,代码来源:packet_queue.cpp
示例12: getVariants
SequenceVector Contig::getVariants() const
{
SequenceVector out;
out.push_back(getSequence());
out.insert(out.end(), m_variants.begin(), m_variants.end());
return out;
}
开发者ID:AlgoLab,项目名称:FastStringGraph,代码行数:7,代码来源:Contig.cpp
示例13: animateTriggers
void TSThread::animateTriggers()
{
if (!getSequence()->numTriggers)
return;
switch (path.loop)
{
case -1 :
activateTriggers(path.start,0);
activateTriggers(1,path.end);
break;
case 0 :
activateTriggers(path.start,path.end);
break;
case 1 :
activateTriggers(path.start,1);
activateTriggers(0,path.end);
break;
default:
{
if (path.loop>0)
{
activateTriggers(path.end,1);
activateTriggers(0,path.end);
}
else
{
activateTriggers(path.end,0);
activateTriggers(1,path.end);
}
}
}
}
开发者ID:03050903,项目名称:Torque3D,代码行数:33,代码来源:tsThread.cpp
示例14: print_sequence
void print_sequence(int seqId)
{
char *seqDes = descriptions_getDescription_mem(readdb_sequenceData[seqId].descriptionStart, readdb_sequenceData[seqId].descriptionLength);
char *seq = getSequence(seqId);
printf(">%s\n%s\n", seqDes, seq);
free(seqDes); free(seq);
}
开发者ID:vtsynergy,项目名称:muBLASTP,代码行数:7,代码来源:querySelector.c
示例15: getSequence
QList<double> QuickSort::Sort(){
curList = getSequence();
if ( curList.count() > 0 ){
sortIt(0,curList.count()-1);
}
return curList;
}
开发者ID:Fisharoo,项目名称:ProjektQT,代码行数:7,代码来源:quicksort.cpp
示例16: query
/*!
* \brief Functions::getSequence returns the next available sequence of specified table from database.
* \param className refers to the class name, which is the table name in database.
* \param db refers to the database connection.
* \return next available sequence of specified table.
*/
qlonglong Functions::getSequence(const QString &className, QSqlDatabase *db)
{
qlonglong result = -1;
try {
SqlQuery query(db);
query.prepare("select nextvalue from sequences where name = :name");
query.bindValue(":name", className);
query.exec();
if(query.next()){
// If sequence exists, update the table with the new available sequence.
result = query.value(0).toLongLong();
SqlQuery updateQuery(db);
updateQuery.prepare("update sequences set nextvalue = :value where name = :name");
qlonglong nextValue = result + 1;
updateQuery.bindValue(":value", nextValue);
updateQuery.bindValue(":name", className);
updateQuery.exec();
}else{
// If sequence does not exists, the system creates one and returns its next value
SqlQuery query(db);
query.prepare("insert into sequences(name, initialvalue, nextvalue)"
"values(:name, :initialvalue, :nextvalue)");
query.bindValue(":name", className);
query.bindValue(":initialvalue", 1);
query.bindValue(":nextvalue", 1);
query.exec();
return getSequence(className, db);
}
}catch(SqlException &ex){
Logger::instance()->writeRecord(Logger::severity_level::critical, "PersistenceModule", Q_FUNC_INFO, QString("Transaction Error: %1").arg(ex.what()));
return -1;
}
return result;
}
开发者ID:CELTAB,项目名称:rfidmonitor,代码行数:40,代码来源:functions.cpp
示例17: getSequence
string FastaReference::getTargetSubSequence(FastaRegion& target) {
if (target.startPos == -1) {
return getSequence(target.startSeq);
} else {
return getSubSequence(target.startSeq, target.startPos - 1, target.length());
}
}
开发者ID:brentp,项目名称:fastahack-python,代码行数:7,代码来源:Fasta.cpp
示例18: down_to_transport
static void down_to_transport(CnetEvent ev, CnetTimer timer, CnetData data) {
/* our packet */
TR_PACKET p;
/* destination address to pass to network layer */
CnetAddr temp;
p.length = sizeof(p.msg);
CHECK(CNET_read_application(&temp, p.msg, &p.length));
CNET_disable_application(temp);
/* establish sequence number */
unsigned long seq = getSequence(temp);
if( seq == -1) {
addAddress(temp,0);
p.sequence_number = 0;
}
else {
unsigned long newseq = seq + p.length;
setSequence(temp,newseq);
p.sequence_number = newseq;
}
p.checksum = checksum_crc32( ((char*)&p)+sizeof(unsigned int)
, TR_PACKET_SIZE(p) - sizeof(unsigned int));
down_to_network( (char*)&p , TR_PACKET_SIZE(p) , temp);
/* enqueuePacket((char*)&p, TR_PACKET_SIZE(p), temp); */
CNET_start_timer(EV_TIMER1, 1000, (CnetData)1);
}
开发者ID:sumdog,项目名称:assignments,代码行数:34,代码来源:flooding3.c
示例19: getPubKey
/*
Get the BIT STRING key and plug into RSA structure. Not included in
asn1.c because it deals directly with the sslRsaKey_t struct.
*/
int32 getPubKey(psPool_t *pool, unsigned char **pp, int32 len,
sslRsaKey_t *pubKey)
{
unsigned char *p = *pp;
int32 pubKeyLen, ignore_bits, seqLen;
if (len < 1 || (*(p++) != ASN_BIT_STRING) ||
asnParseLength(&p, len - 1, &pubKeyLen) < 0 ||
(len - 1) < pubKeyLen) {
return -1;
}
ignore_bits = *p++;
/*
We assume this is always zero
*/
sslAssert(ignore_bits == 0);
if (getSequence(&p, pubKeyLen, &seqLen) < 0 ||
getBig(pool, &p, seqLen, &pubKey->N) < 0 ||
getBig(pool, &p, seqLen, &pubKey->e) < 0) {
return -1;
}
pubKey->size = mp_unsigned_bin_size(&pubKey->N);
*pp = p;
return 0;
}
开发者ID:BashfulBladder,项目名称:gargoyle,代码行数:32,代码来源:rsaPki.c
示例20: iop_lock
set<TS_UINT64> CBlock::scanMissingPackets() {
set<TS_UINT64> answers; // 将数组号转换成的序列号
iop_lock(&mapLock);
for (auto iter = blockContents.begin(); iter != blockContents.end();) { // 搜包
set<int> results; // 获取保存的位置号
CPackage* pack = iter->second;
if (pack->isFull()) {
straWrite->onMsgScanStrategy(pack); // 写文件扫描触发
if (straDestroy->onMsgScanStrategy(pack)) { // 销毁包扫描触发
delete iter->second; // 若返回true则销毁
iter->second = NULL;
blockContents.erase(iter++);
} else {
iter++;
}
} else {
int answer = pack->scanMissingPackets(results); // 获取包内丢失packet的位置
for (auto i = results.begin(); i != results.end(); i++) {
answers.insert(getSequence(iter->first, (*i))); // 根据包号,位置号,得到序号
}
iter++;
}
}
iop_unlock(&mapLock);
return answers;
}
开发者ID:ideallx,项目名称:serveree,代码行数:29,代码来源:CBlock.cpp
注:本文中的getSequence函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论