source: git/factory/cfNewtonPolygon.h @ ab547e2

spielwiese
Last change on this file since ab547e2 was a2dd9b2, checked in by Martin Lee <martinlee84@…>, 13 years ago
added newton polygon computation git-svn-id: file:///usr/local/Singular/svn/trunk@14215 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*****************************************************************************\
2 * Computer Algebra System SINGULAR
3\*****************************************************************************/
4/** @file cfNewtonPolygon.h
5 *
6 * This file provides functions to compute the Newton polygon of a bivariate
7 * polynomial
8 *
9 * @author Martin Lee
10 *
11 * @internal
12 * @version \$Id$
13 *
14 **/
15/*****************************************************************************/
16
17#ifndef CF_NEWTON_POLYGON_H
18#define CF_NEWTON_POLYGON_H
19
20#include <config.h>
21
22#ifdef HAVE_NTL
23#include "NTLconvert.h"
24#endif
25
26/// compute a polygon
27///
28/// @return an integer n such that the first n entries of @a points are the
29///         vertices of the convex hull of @a points
30int polygon (int** points, ///< [in,out] an array of points in the plane
31             int sizePoints///< [in] number of elements in @a points
32            );
33
34/// compute the Newton polygon of a bivariate polynomial
35///
36/// @return an array of points in the plane which are the vertices of the Newton
37///         polygon of F
38int ** newtonPolygon (const CanonicalForm& F,///< [in] a bivariate polynomial
39                      int& sizeOfNewtonPoly  ///< [in, out] size of the result
40                     );
41
42/// check if @a point is inside a polygon described by points
43///
44/// @return true if @a point is inside a polygon described by points
45bool isInPolygon (int ** points, ///< [in] an array of points in the
46                                 ///< plane describing a polygon
47                  int sizePoints,///< [in] size of @a points
48                  int* point     ///< [in] a point in the plane
49                 );
50
51#ifdef HAVE_NTL
52/// Algorithm 5 as described in Convex-Dense Bivariate Polynomial Factorization
53/// by Berthomieu, Lecerf
54void convexDense (int** points,  ///< [in, out] a set of points in Z^2, returns
55                                 ///< M (points)+A
56                  int sizePoints,///< [in] size of points
57                  mat_ZZ& M,     ///< [in,out] returns an invertible matrix
58                  vec_ZZ& A      ///< [in,out] returns translation
59                 );
60
61/// compress a bivariate poly
62///
63/// @return @a compress returns a compressed bivariate poly
64/// @sa convexDense, decompress
65CanonicalForm
66compress (const CanonicalForm& F, ///< [in] compressed, i.e. F.level()==2,
67                                  ///< bivariate poly
68          mat_ZZ& inverseM,       ///< [in,out] returns the inverse of M
69          vec_ZZ& A               ///< [in,out] returns translation
70         );
71
72/// decompress a bivariate poly
73///
74/// @return @a decompress returns a decompressed bivariate poly
75/// @sa convexDense, decompress
76CanonicalForm
77decompress (const CanonicalForm& F,///< [in] compressed, i.e. F.level()<= 2,
78                                   ///< uni- or bivariate poly
79            const mat_ZZ& M,       ///< [in] matrix M obtained from compress
80            const vec_ZZ& A        ///< [in] vector A obtained from compress
81           );
82#endif
83
84#endif
85
Note: See TracBrowser for help on using the repository browser.