gcd.h

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

H
52
字号
/*
FILE : GCD.H

Implementation of the Euclidean algorithm for Laurent polynomials.

(C) C. Valens

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


#ifndef __GCD_H__
#define __GCD_H__


#include "zpoly.h"


/*
 * List stuff
 */
typedef struct __gcd_list {
  zpoly_pair divmod;
  struct __gcd_list *next;
} gcd_list;

/*
 * Create a gcd list.
 */
gcd_list *gcd_create_list(void);

/*
 * Destroy a gcd list.
 */
void gcd_destroy_list(gcd_list *root);

/*
 * Write a gcd list to the output stream.
 */
void gcd_write_list(gcd_list *list);

/*
 * Do the Euclidean algorithm.
 * Returns a list with all possible gcds of poly1 and poly2.
 */
gcd_list *gcd_euclides(zpoly *poly1, zpoly *poly2);


#endif /* __GCD_H__ */

⌨️ 快捷键说明

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