![]() |
This file provides functions to compute the Newton polygon of a bivariate polynomial. More...
#include "config.h"#include "cf_assert.h"#include <stdlib.h>#include "canonicalform.h"#include "cf_iter.h"#include "cf_algorithm.h"#include "cf_primes.h"#include "cf_reval.h"#include "cf_factory.h"#include "gfops.h"#include "cfNewtonPolygon.h"#include "templates/ftmpl_functions.h"Go to the source code of this file.
Functions | |
| static void | translate (int **points, int *point, int sizePoints) |
| static int | smallestPointIndex (int **points, int sizePoints) |
| static void | swap (int **points, int i, int j) |
| static bool | isLess (int *point1, int *point2) |
| static void | quickSort (int lo, int hi, int **points) |
| static void | sort (int **points, int sizePoints) |
| static bool | isConvex (int *point1, int *point2, int *point3) |
| static bool | isConvex (int **points, int i) |
| int | grahamScan (int **points, int sizePoints) |
| int | polygon (int **points, int sizePoints) |
| compute a polygon More... | |
| static int * | getDegrees (const CanonicalForm &F, int &sizeOfOutput) |
| int ** | getPoints (const CanonicalForm &F, int &n) |
| int ** | merge (int **points1, int sizePoints1, int **points2, int sizePoints2, int &sizeResult) |
| int ** | newtonPolygon (const CanonicalForm &F, int &sizeOfNewtonPoly) |
| compute the Newton polygon of a bivariate polynomial More... | |
| int ** | newtonPolygon (const CanonicalForm &F, const CanonicalForm &G, int &sizeOfNewtonPoly) |
| compute the convex hull of the support of two bivariate polynomials More... | |
| bool | isInPolygon (int **points, int sizePoints, int *point) |
| check if point is inside a polygon described by points More... | |
| void | lambda (int **points, int sizePoints) |
| void | lambdaInverse (int **points, int sizePoints) |
| void | tau (int **points, int sizePoints, int k) |
| void | mu (int **points, int sizePoints) |
| void | getMaxMin (int **points, int sizePoints, int &minDiff, int &minSum, int &maxDiff, int &maxSum, int &maxX, int &maxY) |
| void | mpz_mat_mul (const mpz_t *N, mpz_t *&M) |
| void | mpz_mat_inv (mpz_t *&M) |
| void | convexDense (int **points, int sizePoints, mpz_t *&M, mpz_t *&A) |
| Algorithm 5 as described in Convex-Dense Bivariate Polynomial Factorization by Berthomieu, Lecerf. More... | |
| CanonicalForm | compress (const CanonicalForm &F, mpz_t *&M, mpz_t *&A, bool computeMA) |
| compress a bivariate poly More... | |
| CanonicalForm | decompress (const CanonicalForm &F, const mpz_t *inverseM, const mpz_t *A) |
| decompress a bivariate poly More... | |
| int * | getRightSide (int **polygon, int sizeOfPolygon, int &sizeOfOutput) |
| get the y-direction slopes of all edges with positive slope in y-direction of a convex polygon with at least one point of the polygon lying on the x-axis and one lying on the y-axis More... | |
| bool | irreducibilityTest (const CanonicalForm &F) |
| computes the Newton polygon of F and checks if it satisfies the irreducibility criterion from S.Gao "Absolute irreducibility of polynomials
via polytopes", Example 1 More... | |
| bool | absIrredTest (const CanonicalForm &F) |
| absolute irreducibility test as described in "Modular Las Vegas Algorithms
for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo More... | |
| bool | modularIrredTest (const CanonicalForm &F) |
| modular absolute irreducibility test as described in "Modular Las Vegas
Algorithms for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo More... | |
| bool | modularIrredTestWithShift (const CanonicalForm &F) |
| modular absolute irreducibility test with shift as described in "Modular Las
Vegas Algorithms for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo More... | |
This file provides functions to compute the Newton polygon of a bivariate polynomial.
Definition in file cfNewtonPolygon.cc.
| bool absIrredTest | ( | const CanonicalForm & | F | ) |
absolute irreducibility test as described in "Modular Las Vegas Algorithms for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo
| [in] | F | a bivariate polynomial irreducible over ground field |
Definition at line 1142 of file cfNewtonPolygon.cc.
| CanonicalForm compress | ( | const CanonicalForm & | F, |
| mpz_t *& | inverseM, | ||
| mpz_t *& | A, | ||
| bool | computeMA = true |
||
| ) |
compress a bivariate poly
| [in] | F | compressed, i.e. F.level()==2, bivariate poly |
| [in,out] | M | returns the inverse of M, if computeMA==true, M otherwise |
| [in,out] | A | returns translation |
| [in] | computeMA | whether to compute M and A |
Definition at line 706 of file cfNewtonPolygon.cc.
Algorithm 5 as described in Convex-Dense Bivariate Polynomial Factorization by Berthomieu, Lecerf.
| [in,out] | points | a set of points in Z^2, returns M (points)+A |
| [in] | sizePoints | size of points |
| [in,out] | M | returns an invertible 2x2 matrix |
| [in,out] | A | returns translation |
Definition at line 558 of file cfNewtonPolygon.cc.
| CanonicalForm decompress | ( | const CanonicalForm & | F, |
| const mpz_t * | M, | ||
| const mpz_t * | A | ||
| ) |
decompress a bivariate poly
| [in] | F | compressed, i.e. F.level()<= 2, uni- or bivariate poly |
| [in] | inverseM | matrix M obtained from compress |
| [in] | A | vector A obtained from compress |
Definition at line 848 of file cfNewtonPolygon.cc.
|
static |
Definition at line 179 of file cfNewtonPolygon.cc.
| void getMaxMin | ( | int ** | points, |
| int | sizePoints, | ||
| int & | minDiff, | ||
| int & | minSum, | ||
| int & | maxDiff, | ||
| int & | maxSum, | ||
| int & | maxX, | ||
| int & | maxY | ||
| ) |
Definition at line 478 of file cfNewtonPolygon.cc.
| int** getPoints | ( | const CanonicalForm & | F, |
| int & | n | ||
| ) |
Definition at line 197 of file cfNewtonPolygon.cc.
get the y-direction slopes of all edges with positive slope in y-direction of a convex polygon with at least one point of the polygon lying on the x-axis and one lying on the y-axis
| [in] | polygon | vertices of a polygon |
| [in] | sizeOfPolygon | number of vertices |
| [in,out] | sizeOfOutput | size of the output |
Definition at line 1050 of file cfNewtonPolygon.cc.
Definition at line 128 of file cfNewtonPolygon.cc.
| bool irreducibilityTest | ( | const CanonicalForm & | F | ) |
computes the Newton polygon of F and checks if it satisfies the irreducibility criterion from S.Gao "Absolute irreducibility of polynomials via polytopes", Example 1
| [in] | F | a bivariate polynomial |
Definition at line 1102 of file cfNewtonPolygon.cc.
Definition at line 107 of file cfNewtonPolygon.cc.
Definition at line 123 of file cfNewtonPolygon.cc.
check if point is inside a polygon described by points
| [in] | points | an array of points in the plane describing a polygon |
| [in] | sizePoints | size of points |
| [in] | point | a point in the plane |
Definition at line 383 of file cfNewtonPolygon.cc.
Definition at line 64 of file cfNewtonPolygon.cc.
Definition at line 449 of file cfNewtonPolygon.cc.
Definition at line 455 of file cfNewtonPolygon.cc.
Definition at line 230 of file cfNewtonPolygon.cc.
| bool modularIrredTest | ( | const CanonicalForm & | F | ) |
modular absolute irreducibility test as described in "Modular Las Vegas Algorithms for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo
| [in] | F | a bivariate polynomial irreducible over Z |
Definition at line 1192 of file cfNewtonPolygon.cc.
| bool modularIrredTestWithShift | ( | const CanonicalForm & | F | ) |
modular absolute irreducibility test with shift as described in "Modular Las Vegas Algorithms for Polynomial Absolute Factorization" by C. Bertone, G. Cheze, A. Galligo
| [in] | F | a bivariate polynomial irreducible over Z |
Definition at line 1271 of file cfNewtonPolygon.cc.
| void mpz_mat_inv | ( | mpz_t *& | M | ) |
Definition at line 535 of file cfNewtonPolygon.cc.
| void mpz_mat_mul | ( | const mpz_t * | N, |
| mpz_t *& | M | ||
| ) |
Definition at line 502 of file cfNewtonPolygon.cc.
Definition at line 467 of file cfNewtonPolygon.cc.
| int** newtonPolygon | ( | const CanonicalForm & | F, |
| int & | sizeOfNewtonPoly | ||
| ) |
compute the Newton polygon of a bivariate polynomial
| [in] | F | a bivariate polynomial |
| [in,out] | sizeOfNewtonPoly | size of the result |
Definition at line 282 of file cfNewtonPolygon.cc.
| int** newtonPolygon | ( | const CanonicalForm & | F, |
| const CanonicalForm & | G, | ||
| int & | sizeOfNewtonPoly | ||
| ) |
compute the convex hull of the support of two bivariate polynomials
| [in] | F | a bivariate polynomial |
| [in] | G | a bivariate polynomial |
| [in,out] | sizeOfNewtonPoly | size of the result |
Definition at line 321 of file cfNewtonPolygon.cc.
compute a polygon
| [in,out] | points | an array of points in the plane |
| [in] | sizePoints | number of elements in points |
Definition at line 172 of file cfNewtonPolygon.cc.
Definition at line 77 of file cfNewtonPolygon.cc.
Definition at line 43 of file cfNewtonPolygon.cc.
Definition at line 100 of file cfNewtonPolygon.cc.
Definition at line 56 of file cfNewtonPolygon.cc.
Definition at line 461 of file cfNewtonPolygon.cc.
Definition at line 33 of file cfNewtonPolygon.cc.