Macaulay2 Engine
Loading...
Searching...
No Matches
skew.hpp
Go to the documentation of this file.
1// Copyright 2010 Michael E. Stillman
2
3#ifndef _skew_hpp_
4#define _skew_hpp_
5
36
54{
55 public:
58 int *_skew_list; // An array 0.._n_skew-1, listing the indices of the skew
59 // comm variables.
60 bool *_skew_exp; // 0.._n_vars-1
61
62 unsigned long skew_byte_size;
63
65 SkewMultiplication(int nvars, int nskew, int *skew_list);
67 int n_skew_vars() const { return _n_skew; }
68 bool is_skew_var(int i) const { return _skew_exp[i]; }
69 int skew_variable(int i) const { return _skew_list[i]; }
70 // number of variables occurring in 'exp' which are skew variables
71 int skew_degree(const int *exp) const;
72
73 int skew_vars(const int *exp, int *result) const;
74 int skew_vars(const long *exp, int *result) const;
75 // The number s of skew variables in 'exp' is returned, and their
76 // indices are placed in result[0], ..., result[s-1].
77 // The space that 'result' points to MUST hold at least 'nskew' ints.
78
79 int mult_sign(const int *exp1, const int *exp2) const;
80 int mult_sign(const long *exp1, const long *exp2) const;
81
82 int diff(const int *exp1, const int *exp2, int *result) const;
83 int divide(const int *exp1, const int *exp2, int *result) const;
84 bool exp_is_zero(const int *exp) const;
85};
86
87#endif
88
89// Local Variables:
90// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
91// indent-tabs-mode: nil
92// End:
int skew_variable(int i) const
Definition skew.hpp:69
int skew_degree(const int *exp) const
Definition skew.cpp:49
unsigned long skew_byte_size
Definition skew.hpp:62
int n_skew_vars() const
Definition skew.hpp:67
int mult_sign(const int *exp1, const int *exp2) const
Definition skew.cpp:91
bool * _skew_exp
Definition skew.hpp:60
bool exp_is_zero(const int *exp) const
Definition skew.cpp:146
int diff(const int *exp1, const int *exp2, int *result) const
Definition skew.cpp:109
int skew_vars(const int *exp, int *result) const
Definition skew.cpp:61
bool is_skew_var(int i) const
Definition skew.hpp:68
int divide(const int *exp1, const int *exp2, int *result) const
Definition skew.cpp:131
VALGRIND_MAKE_MEM_DEFINED & result(result)