Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

from libcpp.memory cimport unique_ptr, shared_ptr, make_shared 

  

from sage.rings.polynomial.multi_polynomial_ring_generic cimport \ 

MPolynomialRing_generic 

from sage.rings.polynomial.multi_polynomial cimport MPolynomial 

from sage.structure.element cimport MonoidElement 

  

from sage.libs.polybori.decl cimport * 

  

  

cdef class BooleanPolynomialRing(MPolynomialRing_generic): 

cdef PBRing _pbring 

cdef Py_ssize_t* pbind 

cdef public _monom_monoid 

cdef public object __interface 

cdef object _repr 

  

# it is very important to keep this cached, since otherwise the magma interface will break 

cdef public object __cover_ring 

  

cdef _convert(self, rhs) 

  

cdef class BooleanPolynomial(MPolynomial): 

cdef PBPoly _pbpoly 

cpdef _add_(self, other) 

cpdef _mul_(self, other) 

  

cdef class BooleSet: 

cdef BooleanPolynomialRing _ring 

cdef PBSet _pbset 

  

cdef class CCuddNavigator: 

cdef PBNavigator _pbnav 

cdef Py_ssize_t* _pbind 

  

cdef class BooleanMonomial(MonoidElement): 

cdef PBMonom _pbmonom 

cdef BooleanPolynomialRing _ring 

cpdef _mul_(self, other) 

  

cdef class BooleanMonomialVariableIterator: 

cdef object parent 

cdef BooleanPolynomialRing _ring 

cdef BooleanMonomial obj 

cdef PBMonomVarIter _iter 

cdef PBMonomVarIter _end 

  

cdef class BooleanMonomialIterator: 

cdef BooleanMonomial obj 

cdef PBMonomIter _iter 

cdef PBMonomIter _end 

cdef Py_ssize_t* pbind 

  

# Wrap PBPolyIter using pointers because there is no default constructor 

cdef class BooleanPolynomialIterator: 

cdef BooleanPolynomial obj 

cdef PBPolyIter* _iter 

cdef PBPolyIter* _end 

  

# Wrap PBSetIter using pointers because there is no default constructor 

cdef class BooleSetIterator: 

cdef object _parent 

cdef BooleanPolynomialRing _ring 

cdef PBSetIter* _iter 

cdef PBSetIter* _end 

cdef BooleSet obj 

  

cdef class BooleanPolynomialEntry: 

cdef public BooleanPolynomial p 

  

# Wrap PBRedStrategy using shared_ptr because there is no default 

# constructor and because multiple Python objects may point to 

# the same PBRedStrategy 

cdef class ReductionStrategy: 

cdef shared_ptr[PBRedStrategy] _strat 

cdef BooleanPolynomialRing _parent 

  

# Wrap PBGBStrategy using shared_ptr because there is no default 

# constructor and because multiple Python objects may point to 

# the same PBGBStrategy 

cdef class GroebnerStrategy: 

cdef shared_ptr[PBGBStrategy] _strat 

cdef BooleanPolynomialRing _parent 

cdef public ReductionStrategy reduction_strategy 

  

# Wrap PBFGLMStrategy using unique_ptr for analogy with 

# ReductionStrategy and GroebnerStrategy 

cdef class FGLMStrategy: 

cdef unique_ptr[PBFGLMStrategy] _strat 

cdef BooleanPolynomialRing _parent 

  

cdef class BooleanPolynomialVector: 

cdef PBPolyVector _vec 

cdef BooleanPolynomialRing _parent 

  

cdef class BooleanPolynomialVectorIterator: 

cdef BooleanPolynomialVector obj 

cdef BooleanPolynomialRing _parent 

cdef PBPolyVectorIter _iter 

cdef PBPolyVectorIter _end 

  

cdef class VariableBlock: 

cdef BooleanPolynomialRing _ring 

cdef PBVarBlock* _block 

cdef public object __name__ 

  

cdef class BooleConstant: 

cdef PBConstant _pbconst 

  

cdef class VariableFactory: 

cdef BooleanPolynomialRing _ring 

cdef PBVarFactory _factory 

  

cdef class MonomialFactory: 

cdef BooleanPolynomialRing _ring 

cdef PBMonomFactory _factory 

  

cdef class PolynomialFactory: 

cdef BooleanPolynomialRing _ring 

cdef PBPolyFactory _factory 

  

  

# Cython doesn't seem to support constructors with additional template 

# parameters, so we declare this aliasing constructor as special case 

cdef extern from *: 

cdef shared_ptr[T] shared_ptr_alias_PBGBStrategy "std::shared_ptr"[T](shared_ptr[PBGBStrategy]&, T*)