示例#1
0
ResultType getWidths (const IObject & v){
  ResultType result(v.dimension(), true);
  typename IObject::const_iterator b = v.begin(), e = v.end();
  typename ResultType::iterator i = result.begin();
  while(b!=e) {
     *i = width(*b);
     ++b; ++i;
  }
  return result;
}
示例#2
0
typename capd::TypeTraits<typename IObject::ScalarType>::Real maxWidth(const IObject& v)
{
  typedef typename capd::TypeTraits<typename IObject::ScalarType>::Real ScalarType;
  ScalarType result(0.);
  typename IObject::const_iterator b=v.begin(), e=v.end();
  while(b!=e)
  {
     result = capd::max(result, width(*b));
     ++b;
  }
  return result;
}
示例#3
0
typename IObject::ScalarType maxDiam(const IObject& v)
{
  typedef typename IObject::ScalarType ScalarType;
  ScalarType result(0.);
  typename IObject::const_iterator b=v.begin(), e=v.end();
  while(b!=e)
  {
     result = capd::max(result,diam(*b));
     ++b;
  }
  return ScalarType(rightBound(result));
}