58 std::sort( dst.begin(), dst.end() );
62 for ( CexmcAngularRangeList::iterator k( dst.begin() + 1 );
65 if ( std::fabs( k->top - ( k - 1 )->top ) < epsilon ||
66 k->bottom + epsilon >= ( k - 1 )->bottom )
71 if ( k->top + epsilon >= ( k - 1 )->bottom )
73 ( k - 1 )->bottom = k->bottom;
95 if ( normalizedAngularRanges[ 0 ].top < 1.0 )
97 1.0, normalizedAngularRanges[ 0 ].top, index++ ) );
99 for ( CexmcAngularRangeList::iterator
100 k( normalizedAngularRanges.begin() );
101 k != normalizedAngularRanges.end(); ++k )
103 if ( k + 1 == normalizedAngularRanges.end() )
106 k->bottom, ( k + 1 )->top, index++ ) );
109 if ( normalizedAngularRanges.back().bottom > -1.0 )
111 normalizedAngularRanges.back().bottom, -1.0, index ) );
118 std::ostream::fmtflags savedFlags( out.flags() );
119 std::streamsize
prec( out.precision() );
122 out.flags( std::ios::fixed );
124 out << std::setw( 2 ) << angularRange.
index + 1 <<
" [" << std::setw( 7 ) <<
125 angularRange.
top <<
", " << std::setw( 7 ) << angularRange.
bottom <<
128 out.precision(
prec );
129 out.flags( savedFlags );
139 for ( CexmcAngularRangeList::const_iterator k( angularRanges.begin() );
140 k != angularRanges.end(); ++k )
142 out <<
" " << *k << std::endl;
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
void GetNormalizedAngularRange(const CexmcAngularRangeList &src, CexmcAngularRangeList &dst)
void GetAngularGaps(const CexmcAngularRangeList &src, CexmcAngularRangeList &dst)
double epsilon(double density, double temperature)
std::vector< CexmcAngularRange > CexmcAngularRangeList