Exemple #1
0
void Candidate::Reindex(const MiscLib::Vector< int > &newIndices, int minInvalidIndex,
	size_t mergedSubsets, const MiscLib::Vector< size_t > &subsetSizes,
	const PointCloud &pc, size_t currentSize, float epsilon, float normalThresh,
	float bitmapEpsilon)
{
	size_t i = 0, j = 0;
	for(; i < m_indices->size(); ++i)
		if(newIndices[(*m_indices)[i]] < minInvalidIndex)
			(*m_indices)[j++] = newIndices[(*m_indices)[i]];
	if(m_subset <= mergedSubsets)
	{
		m_hasConnectedComponent = false;
		m_subset = 0;
		m_indices->clear();
		m_lowerBound = 0;
		m_upperBound = 0; // forget this candidate
		m_score = 0;
		return;
	}
	else
	{
		m_indices->resize(j);
		m_subset -= mergedSubsets;
		if(m_subset >= subsetSizes.size())
			// do connected component if all subsets have been computed
			ConnectedComponent(pc, bitmapEpsilon);		
	}
	size_t sampledPoints = 0,
		endi = std::min(m_subset, subsetSizes.size());;
	for(i = 0; i < endi; ++i)
		sampledPoints += subsetSizes[i];

	GetBounds(sampledPoints, currentSize);
}
void ompl::LTLVis::ComponentMap::reset(void)
{
  components_.clear();
  components_.push_back(ConnectedComponent(components_.size()));
}
ompl::LTLVis::tIndex ompl::LTLVis::ComponentMap::makeNewComponent(void)
{
  ompl::LTLVis::tIndex retq = components_.size();
  components_.push_back(ConnectedComponent(components_.size()));
  return(retq);
}