PairLS.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_PairLS_h_
#define polybori_groebner_PairLS_h_
// include basic definitions
#include "groebner_defs.h"
#include <boost/shared_ptr.hpp>
BEGIN_NAMESPACE_PBORIGB
typedef boost::shared_ptr<PairData> pair_data_ptr;
enum {
VARIABLE_PAIR,
IJ_PAIR,
DELAYED_PAIR
};
class PairLS{
private:
int type;
public:
int getType() const{
return type;
}
wlen_type wlen;
deg_type sugar;
//three sorts of pairs
//x*poly, poly, i,j
pair_data_ptr data;
Monomial lm; //must not be the real lm, can be lm of syzygy or something else
Polynomial extract(const PolyEntryVector& v){
return data->extract(v);
}
PairLS(int i, int j, const PolyEntryVector &v):
wlen(v[i].weightedLength+v[j].weightedLength-2),
data(new IJPairData(i,j)),
lm(v[i].lead*v[j].lead)
{
type=IJ_PAIR;
sugar=lm.deg()+std::max(v[i].ecart(),v[j].ecart());
}
PairLS(int i, idx_type v, const PolyEntryVector &gen,int type):
// sugar(gen[i].lmDeg+1),///@only do that because of bad criteria impl
wlen(gen[i].weightedLength+gen[i].length),
sugar(gen[i].deg+1),
data(new VariablePairData(i,v)), lm(gen[i].lead) {
PBORI_ASSERT(type==VARIABLE_PAIR);
this->type=type;
}
PairLS(const Polynomial& delayed):
type(DELAYED_PAIR), wlen(delayed.eliminationLength()),
sugar(delayed.deg()),
data(new PolyPairData(delayed)),
lm(delayed.lead()) { }
};
END_NAMESPACE_PBORIGB
#endif /* polybori_PairLS_h_ */
polybori::BooleMonomial::deg
deg_type deg() const
Degree of the monomial.
Definition: BooleMonomial.h:146
polybori::groebner::PairLS::sugar
deg_type sugar
Definition: PairLS.h:47
polybori::groebner::pair_data_ptr
boost::shared_ptr< PairData > pair_data_ptr
Definition: PairLS.h:25
polybori::groebner::PolyEntryVector
Definition: PolyEntryVector.h:28
polybori::groebner::PairLS::extract
Polynomial extract(const PolyEntryVector &v)
Definition: PairLS.h:52
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::groebner::PairLS::wlen
wlen_type wlen
Definition: PairLS.h:46
polybori::groebner::IJ_PAIR
Definition: PairLS.h:29
polybori::groebner::deg_type
int deg_type
Definition: groebner_defs.h:42
polybori::groebner::IJPairData
This class defines IJPairData.
Definition: IJPairData.h:28
polybori::groebner::PairLS
This class defines PairLS.
Definition: PairLS.h:39
polybori::groebner::PairLS::PairLS
PairLS(int i, int j, const PolyEntryVector &v)
Definition: PairLS.h:55
polybori::groebner::VariablePairData
This class defines VariablePairData.
Definition: VariablePairData.h:28
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PolyPairData
This class defines PolyPairData.
Definition: PolyPairData.h:28
polybori::groebner::PairLS::PairLS
PairLS(int i, idx_type v, const PolyEntryVector &gen, int type)
Definition: PairLS.h:63
polybori::groebner::PairLS::lm
Monomial lm
Definition: PairLS.h:51
polybori::BoolePolynomial
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
polybori::groebner::VARIABLE_PAIR
Definition: PairLS.h:28
groebner_defs.h
PBORI_ASSERT
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
polybori::groebner::wlen_type
long wlen_type
Definition: groebner_defs.h:39
polybori::groebner::PairLS::data
pair_data_ptr data
Definition: PairLS.h:50
polybori::groebner::PairLS::getType
int getType() const
Definition: PairLS.h:43
polybori::groebner::idx_type
polybori::CTypes::idx_type idx_type
Definition: groebner_defs.h:44
polybori::groebner::PairLS::PairLS
PairLS(const Polynomial &delayed)
Definition: PairLS.h:72
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::groebner::DELAYED_PAIR
Definition: PairLS.h:30