29 #ifndef __INCLUDE_MIST_PARCOR_H__
30 #define __INCLUDE_MIST_PARCOR_H__
32 #ifndef __INCLUDE_MIST_H__
50 template <
class T1,
class Allocator1,
class T2,
class Allocator2,
class T3,
class Allocator3 >
54 double res = cor[ 0 ];
63 for(
size_t i = 0 ; i < length ; i++ )
65 double r = cor[ i + 1 ];
67 for(
size_t j = 0 ; j < i ; j++ )
69 r += alf_old[ j ] * cor[ i - j ];
72 ref[ i ] = static_cast < T3 >( r / res );
76 for(
size_t j = 0 ; j < i ; j++ )
78 alf[ j ] = static_cast < T2 >( alf_old[ j ] - ref[ i ] * alf_old[ i - j - 1 ] );
81 res *= ( 1.0 - ref[ i ] ) * ( 1.0 + ref[ i ] );