PolyBoRi
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
groebner
include
polybori
groebner
LessWeightedLengthInStratModified.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//*****************************************************************************
14
//*****************************************************************************
15
16
#ifndef polybori_groebner_LessWeightedLengthInStratModified_h_
17
#define polybori_groebner_LessWeightedLengthInStratModified_h_
18
19
// include basic definitions
20
#include "
groebner_defs.h
"
21
22
BEGIN_NAMESPACE_PBORIGB
23
24
inline
wlen_type
wlen_literal_exceptioned
(
const
PolyEntry
& e){
25
wlen_type
res=e.
weightedLength
;
26
if
((e.
deg
==1) && (e.
length
<=4)){
27
//if (e.length==1) return -1;
28
//if (e.p.hasConstantPart()) return 0;
29
return
res-1;
30
}
31
return
res;
32
}
33
39
40
class
LessWeightedLengthInStratModified
{
41
public
:
42
const
ReductionStrategy
*
strat
;
43
LessWeightedLengthInStratModified
(
const
ReductionStrategy
& strat){
44
this->strat=&strat;
45
}
46
bool
operator() (
const
Monomial
& a ,
const
Monomial
& b){
47
wlen_type
wa=
wlen_literal_exceptioned
((*strat)[a]);
48
wlen_type
wb=
wlen_literal_exceptioned
((*strat)[b]);
49
50
return
wa<wb;
51
52
}
53
bool
operator() (
const
Exponent
& a ,
const
Exponent
& b){
54
wlen_type
wa=
wlen_literal_exceptioned
((*strat)[a]);
55
wlen_type
wb=
wlen_literal_exceptioned
((*strat)[b]);
56
57
return
wa<wb;
58
59
}
60
};
61
62
END_NAMESPACE_PBORIGB
63
64
#endif
/* polybori_LessWeightedLengthInStratModified_h_ */
Generated by
1.8.3.1