本文整理汇总了C++中SatIDSet::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ SatIDSet::begin方法的具体用法?C++ SatIDSet::begin怎么用?C++ SatIDSet::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SatIDSet
的用法示例。
在下文中一共展示了SatIDSet::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findIndexOfSat
int GeneralConstraint::findIndexOfSat( const SatIDSet& satSet,
const SatID& sat )
{
int indexOfSat(-1);
int i(0);
for(SatIDSet::const_iterator it=satSet.begin();
it!=satSet.end();
++it)
{
if((*it)==sat) indexOfSat = i;
i++;
}
return indexOfSat;
} // End of method 'GeneralConstraint::findIndexOfSat()'
示例2: prepareCurrentUnknownsAndEquations
// Prepare set of current unknowns and list of current equations
VariableSet EquationSystem::prepareCurrentUnknownsAndEquations(
gnssDataMap& gdsMap )
{
// Let's clear the current equations list
currentEquationsList.clear();
// Let's create 'currentUnkSet' set
VariableSet currentUnkSet;
// Get "currentSatSet" and "currentSourceSet"
// and stored in currentSourceSet and currentSatSet
prepareCurrentSourceSat( gdsMap );
// Visit each "Equation" in "equationDescriptionList"
for( std::list<Equation>::const_iterator itEq =
equationDescriptionList.begin();
itEq != equationDescriptionList.end();
++itEq )
{
// First, get the SourceID set for this equation description
SourceIDSet equSourceSet;
// Check if current equation description is valid for all sources
if ( (*itEq).getEquationSource() == Variable::allSources )
{
equSourceSet = currentSourceSet;
}
else
{
// Check if equation description is valid for some sources
if ( (*itEq).getEquationSource() == Variable::someSources )
{
// We have to find the intersection between equation
// description SourceID's and available SourceID's.
SourceIDSet tempSourceSet( (*itEq).getSourceSet() );
// Declare an 'insert_iterator' to be used by
// 'set_intersection' algorithm (provided by STL)
std::insert_iterator< SourceIDSet >
itOut( equSourceSet, equSourceSet.begin() );
// Let's intersect both sets
set_intersection( tempSourceSet.begin(), tempSourceSet.end(),
currentSourceSet.begin(), currentSourceSet.end(),
itOut );
}
else
{
// In this case, we take directly the source into the
// equation source set
equSourceSet.insert( (*itEq).getEquationSource() );
}
} // End of 'if ( (*itEq).getEquationSource() == ...'
// Second, get the SatID set for this equation description
SatIDSet equSatSet = (*itEq).getSatSet();
// We have the SourceID set that is applicable to this
// equation description.
// Now we must get the satellites visible from each
// particular SourceID
for( SourceIDSet::const_iterator itSource = equSourceSet.begin();
itSource != equSourceSet.end();
++itSource )
{
// Get visible satellites from this SourceID
SatIDSet visibleSatSet;
// Iterate through all items in the gnssDataMap
for( gnssDataMap::const_iterator it = gdsMap.begin();
it != gdsMap.end();
++it )
{
// Look for current SourceID
sourceDataMap::const_iterator sdmIter(
(*it).second.find( (*itSource) ) );
// If SourceID was found, then look for satellites
if( sdmIter != (*it).second.end() )
{
// Iterate through corresponding 'satTypeValueMap'
for( satTypeValueMap::const_iterator stvmIter =
(*sdmIter).second.begin();
stvmIter != (*sdmIter).second.end();
stvmIter++ )
{
// for some sat
//.........这里部分代码省略.........