polyphas.h

来自「FIR2LIFT is a program to factor a wavele」· C头文件 代码 · 共 108 行

H
108
字号
/*
FILE : POLYPHAS.H

Routines to handle polyphase matrices, a matrix that holds (Laurent) 
polynomials in z. This implementation only handles 2x2 matrices.

(C) C. Valens

Created     : 14/09/1999
Last update : 23/09/1999
*/


#ifndef __POLYPHASE_H__
#define __POLYPHASE_H__


#include "zpoly.h"


/*
 * A polyphase matrix is a 2x2 matrix that holds polynomials in z.
 */
typedef struct __polyphase_matrix {
  zpoly_pair row1;
  zpoly_pair row2;
} polyphase_matrix;


/*
 * Write a polyphase pair to the output stream.
 */
void polyphase_write(zpoly_pair evenodd);

/*
 * Split a zpoly into its polyphase components.
 */
zpoly_pair polyphase_split(zpoly *poly);

/*
 * Merge two polyphase components into a new zpoly.
 */
zpoly *polyphase_merge(zpoly_pair evenodd);

/*
 * Build a polyphase matrix from two zpolies.
 */
polyphase_matrix polyphase_matrix_build(zpoly_pair evenodd);

/*
 * Decomposes a polyphase matrix into two zpolies.
 */
zpoly_pair polyphase_matrix_decompose(polyphase_matrix m);

/*
 * Destroy a polyphase matrix.
 */
void polyphase_matrix_destroy(polyphase_matrix m);

/*
 * Write a polyphase pair to the output stream.
 */
void polyphase_matrix_write(polyphase_matrix m);

/*
 * Returns 1 if m1 is identical to m2, returns 0 if not.
 */
int polyphase_matrix_equal(polyphase_matrix m1, polyphase_matrix m2);

/*
 * Calculates the determinant of m.
 */
zpoly *polyphase_matrix_determinant(polyphase_matrix m);

/*
 * Create a copy of m.
 */
polyphase_matrix polyphase_matrix_copy(polyphase_matrix m);

/*
 * Transposes m.
 */
polyphase_matrix polyphase_matrix_transpose(polyphase_matrix m);

/*
 * Returns the inverse of m.
 */
polyphase_matrix polyphase_matrix_inverse(polyphase_matrix m);

/*
 * Returns a matrix that holds m1*m2.
 */
polyphase_matrix polyphase_matrix_mul(polyphase_matrix m1, polyphase_matrix m2);

/*
 * Multiplies all elements of m by poly.
 */
polyphase_matrix polyphase_matrix_scale(polyphase_matrix m, zpoly *poly);

/*
 * Reverses the exponent ordering of all elements of m.
 * If reverse_time==1 all exponents will be negated.
 */
polyphase_matrix polyphase_matrix_reverse(polyphase_matrix m, int reverse_time);


#endif /* __POLYPHASE_H__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?