public static void Backward ( double [ ] data ) { double [ ] result = new double [ data . length ] ; double sum ; double scale = Math . sqrt ( 2.0 / data . length ) ; for ( int t = 0 ; t < data . length ; t ++ ) { sum = 0 ; for ( int j = 0 ; j < data . length ; j ++ ) { double cos = Math . cos ( ( ( 2 * t + 1 ) * j * Math . PI ) / ( 2 * data . length ) ) ; sum += alpha ( j ) * data [ j ] * cos ; } result [ t ] = scale * sum ; } for ( int i = 0 ; i < data . length ; i ++ ) { data [ i ] = result [ i ] ; } }
1 - D Backward Discrete Cosine Transform .