_TScalar cpExtensions::DataStructures::FourierSeriesContour< _TScalar >::
GetArea( ) const
{
- S a = TScalar( 0 );
+ TScalar a = TScalar( 0 );
int q = this->GetNumberOfHarmonics( );
typename Self::const_iterator i = this->begin( );
for( int l = -q; i != this->end( ); ++i, ++l )
int q = this->GetNumberOfHarmonics( );
typename Self::const_iterator i = this->begin( );
for( int l = -q; i != this->end( ); ++i, ++l )
- res.push_back( *i * std::polar( S( 1 ), S( l ) * phase ) );
+ res.push_back( *i * std::polar( TScalar( 1 ), TScalar( l ) * phase ) );
return( res );
}
int q = this->GetNumberOfHarmonics( );
typename Self::iterator i = this->begin( );
for( int l = -q; i != this->end( ); ++i, ++l )
- *i *= std::polar( S( 1 ), S( l ) * phase );
+ *i *= std::polar( TScalar( 1 ), TScalar( l ) * phase );
return( *this );
}
// 1.1. Roughly sample phases
for( unsigned int s = 0; s < _samples; ++s )
{
- S w = TScalar( s ) * _angleOff;
- S a = std::arg( contour._Z( w, 0 ) );
+ TScalar w = TScalar( s ) * _angleOff;
+ TScalar a = std::arg( contour._Z( w, 0 ) );
function.push_back( std::pair< TScalar, TScalar >( w, a ) );
if( a < minA )
{
static const TScalar _2pi = TScalar( 2 ) * TScalar( vnl_math::pi );
TScalar off = _2pi / TScalar( s - 1 );
for( unsigned int w = 0; w < s; ++w )
- p.push_back( ( *this )( S( w ) * off ) );
+ p.push_back( ( *this )( TScalar( w ) * off ) );
}
// -------------------------------------------------------------------------
{
zp /= np;
zn /= nn;
- t = std::real( std::log( zp * zn ) / TComplex( TScalar( 0 ), S( 2 ) ) );
- p = std::real( std::log( zp / zn ) / TComplex( TScalar( 0 ), S( 2 * l ) ) );
+ t = std::real(
+ std::log( zp * zn ) / TComplex( TScalar( 0 ), TScalar( 2 ) )
+ );
+ p = std::real(
+ std::log( zp / zn ) / TComplex( TScalar( 0 ), TScalar( 2 * l ) )
+ );
}
else
{
void cpExtensions::DataStructures::FourierSeriesContour< _TScalar >::
_DFT( const std::vector< TComplex >& p, unsigned int q )
{
- static const S _2pi = TScalar( 2 ) * TScalar( vnl_math::pi );
+ static const TScalar _2pi = TScalar( 2 ) * TScalar( vnl_math::pi );
this->SetNumberOfHarmonics( q );
*this *= TScalar( 0 );