My Project  debian-1:4.1.1-p2+ds-4build4
Functions | Variables
fac_util.cc File Reference
#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "canonicalform.h"
#include "cf_iter.h"
#include "fac_util.h"

Go to the source code of this file.

Functions

static CanonicalForm mappk (const CanonicalForm &)
 
static CanonicalForm mappksymmetric (const CanonicalForm &)
 
CanonicalForm replaceLc (const CanonicalForm &f, const CanonicalForm &c)
 

Variables

static CanonicalForm PK
 
static CanonicalForm PKHALF
 

Function Documentation

◆ mappk()

CanonicalForm mappk ( const CanonicalForm f)
static

Definition at line 108 of file fac_util.cc.

109 {
110  return mod( f, PK );
111 }
CF_NO_INLINE CanonicalForm mod(const CanonicalForm &, const CanonicalForm &)
Definition: cf_inline.cc:564
FILE * f
Definition: checklibs.c:9
static CanonicalForm PK
Definition: fac_util.cc:14

◆ mappksymmetric()

CanonicalForm mappksymmetric ( const CanonicalForm f)
static

Definition at line 98 of file fac_util.cc.

99 {
100  CanonicalForm result = mod( f, PK );
101  if ( result > PKHALF )
102  return result - PK;
103  else
104  return result;
105 }
factory's main class
Definition: canonicalform.h:83
return result
Definition: facAbsBiFact.cc:76
static CanonicalForm PKHALF
Definition: fac_util.cc:14

◆ replaceLc()

CanonicalForm replaceLc ( const CanonicalForm f,
const CanonicalForm c 
)

Definition at line 89 of file fac_util.cc.

90 {
91  if ( f.inCoeffDomain() )
92  return c;
93  else
94  return f + ( c - LC( f ) ) * power( f.mvar(), degree( f ) );
95 }
CanonicalForm power(const CanonicalForm &f, int n)
exponentiation
int degree(const CanonicalForm &f)
CanonicalForm LC(const CanonicalForm &f)

Variable Documentation

◆ PK

CanonicalForm PK
static

Definition at line 14 of file fac_util.cc.

◆ PKHALF

CanonicalForm PKHALF
static

Definition at line 14 of file fac_util.cc.