LessWeightedLengthInStratModified.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_LessWeightedLengthInStratModified_h_
#define polybori_groebner_LessWeightedLengthInStratModified_h_
// include basic definitions
#include "groebner_defs.h"
BEGIN_NAMESPACE_PBORIGB
inline wlen_type wlen_literal_exceptioned(const PolyEntry& e){
wlen_type res=e.weightedLength;
if ((e.deg==1) && (e.length<=4)){
//if (e.length==1) return -1;
//if (e.p.hasConstantPart()) return 0;
return res-1;
}
return res;
}
class LessWeightedLengthInStratModified{
public:
const ReductionStrategy* strat;
LessWeightedLengthInStratModified(const ReductionStrategy& strat){
this->strat=&strat;
}
bool operator() (const Monomial& a , const Monomial& b){
wlen_type wa=wlen_literal_exceptioned((*strat)[a]);
wlen_type wb=wlen_literal_exceptioned((*strat)[b]);
return wa<wb;
}
bool operator() (const Exponent& a , const Exponent& b){
wlen_type wa=wlen_literal_exceptioned((*strat)[a]);
wlen_type wb=wlen_literal_exceptioned((*strat)[b]);
return wa<wb;
}
};
END_NAMESPACE_PBORIGB
#endif /* polybori_LessWeightedLengthInStratModified_h_ */
polybori::BooleExponent
This class is just a wrapper for using variables for storing indices as interim data structure for Bo...
Definition: BooleExponent.h:34
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::groebner::LessWeightedLengthInStratModified::LessWeightedLengthInStratModified
LessWeightedLengthInStratModified(const ReductionStrategy &strat)
Definition: LessWeightedLengthInStratModified.h:43
polybori::groebner::wlen_literal_exceptioned
wlen_type wlen_literal_exceptioned(const PolyEntry &e)
Definition: LessWeightedLengthInStratModified.h:24
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PolyEntry
This class defines PolyEntry.
Definition: PolyEntry.h:32
polybori::groebner::PolyEntryBase::deg
deg_type deg
Definition: PolyEntryBase.h:58
polybori::groebner::PolyEntryBase::weightedLength
wlen_type weightedLength
Definition: PolyEntryBase.h:56
groebner_defs.h
polybori::groebner::wlen_type
long wlen_type
Definition: groebner_defs.h:39
polybori::groebner::PolyEntryBase::length
len_type length
Definition: PolyEntryBase.h:57
polybori::groebner::ReductionStrategy
This class defines ReductionStrategy.
Definition: ReductionStrategy.h:34
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::groebner::LessWeightedLengthInStratModified::strat
const ReductionStrategy * strat
Definition: LessWeightedLengthInStratModified.h:42