本文整理汇总了C++中getSequence函数的典型用法代码示例。如果您正苦于以下问题:C++ getSequence函数的具体用法?C++ getSequence怎么用?C++ getSequence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getSequence函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
示例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();
}
}
示例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);
}
示例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 );
}
示例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);
}
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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?");
}
}
示例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;
}
}
示例12: getVariants
SequenceVector Contig::getVariants() const
{
SequenceVector out;
out.push_back(getSequence());
out.insert(out.end(), m_variants.begin(), m_variants.end());
return out;
}
示例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);
}
}
}
}
示例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);
}
示例15: getSequence
QList<double> QuickSort::Sort(){
curList = getSequence();
if ( curList.count() > 0 ){
sortIt(0,curList.count()-1);
}
return curList;
}