src/Level2/TrnsTable1D.cc
// Input		TTab1D	: Transitions table (this)
//			res     : A resolution in Hz
// Output		void	: The transitions matrix is
//			  	  modified by the blending of
//			  	  transitions that are within res
//			  	  from each another in frequency
Input          TTab1D  : Transitions table (this)
res     : A resolution in Hz
Output         void    : The transitions matrix is
modified by the blending of
transitions that are within res
from each another in frequency
Input TTab1D : Transitions table ( this ) res : A resolution in Hz Output void : The transitions matrix is modified by the blending of transitions that are within res from each another in frequency
void TTable1D::resolution(double res)
  {
  int nr = rows();			
  if(!nr) return;			
  int i, I, tr=1, resolved=0;		
  double vi, vI;
  res *= 2.0*PI;			
  for(i=1; i<nr; i++)			
    {
    vi = getIm(i,0);			
    resolved = 1;                       
    for(I=0; I<tr && resolved; I++)     
      {
      vI = getIm(I,0);			
      if(fabs(vi-vI) <= res)            
        {
        put(get(I,1)+get(i,1),I,1);
        resolved = 0;
        }
      }
    if(resolved)                        
      {                                 
      put(get(i,0),tr,0);		
      put(get(i,1),tr,1);
      tr++;
      } 
    }   
  *this = get_block(0,0,tr,2);
  }
void TTable1D :: resolution ( double res ) { int nr = rows ( ) ; if ( ! nr ) return ; int i , I , tr = 1 , resolved = 0 ; double vi , vI ; res *= 2.0 * PI ; for ( i = 1 ; i < nr ; i ++ ) { vi = getIm ( i , 0 ) ; resolved = 1 ; for ( I = 0 ; I < tr && resolved ; I ++ ) { vI = getIm ( I , 0 ) ; if ( fabs ( vi - vI ) <= res ) { put ( get ( I , 1 ) + get ( i , 1 ) , I , 1 ) ; resolved = 0 ; } } if ( resolved ) { put ( get ( i , 0 ) , tr , 0 ) ; put ( get ( i , 1 ) , tr , 1 ) ; tr ++ ; } } * this = get_block ( 0 , 0 , tr , 2 ) ; }
Input          TTab1D  : Transitions table (this)
res     : A resolution in Hz
Output         void    : The transitions matrix is
modified by the blending of
transitions that are within res
from each another in frequency
Input TTab1D : Transitions table ( this ) res : A resolution in Hz Output void : The transitions matrix is modified by the blending of transitions that are within res from each another in frequency
// Input transitions // Quit if no transitions // Count transitions, resolved // Convert res to rad/sec // Loop the transitions // Trans. frequency (rad/sec) // Flag its resolved // Loop resolved transitions // Trans. I freqeuncy (rad/sec) // If i isn't resolved from I // If resolved transition then // put it at the next spot in // the transitions array