#include <intvec.h>
Definition at line 19 of file intvec.h.
◆ intvec() [1/4]
intvec::intvec |
( |
int |
l = 1 | ) |
|
|
inline |
◆ intvec() [2/4]
intvec::intvec |
( |
int |
s, |
|
|
int |
e |
|
) |
| |
Definition at line 21 of file intvec.cc.
22{
23 int inc;
26 {
28 inc = 1;
29 }
30 else
31 {
33 inc = -1;
34 }
37 {
40 }
41}
const CanonicalForm int s
◆ intvec() [3/4]
intvec::intvec |
( |
int |
r, |
|
|
int |
c, |
|
|
int |
init |
|
) |
| |
Definition at line 43 of file intvec.cc.
44{
50 else
52 for (
int i=0;
i<
l;
i++)
53 {
55 }
56}
◆ intvec() [4/4]
Definition at line 40 of file intvec.h.
41 {
48 {
51 {
53 }
54 }
56 }
◆ ~intvec()
Definition at line 105 of file intvec.h.
106 {
110 {
113 }
114 }
#define omFreeSize(addr, size)
◆ cols()
int intvec::cols |
( |
| ) |
const |
|
inline |
◆ compare() [1/2]
Definition at line 206 of file intvec.cc.
207{
208 if ((
col!=1) ||(op->cols()!=1))
209 {
211 || (
row!=op->rows()))
212 return -2;
213 }
216 {
218 return 1;
220 return -1;
221 }
222
224 {
226 return 1;
228 return -1;
229 }
230 for (;
i<op->rows();
i++)
231 {
233 return 1;
235 return -1;
236 }
237 return 0;
238}
static int si_min(const int a, const int b)
◆ compare() [2/2]
int intvec::compare |
( |
int |
o | ) |
const |
Definition at line 239 of file intvec.cc.
240{
242 {
243 if (
v[
i] <o)
return -1;
244 if (
v[
i] >o)
return 1;
245 }
246 return 0;
247}
◆ delete_pos()
intvec * intvec::delete_pos |
( |
int |
p | ) |
|
Definition at line 842 of file intvec.cc.
843{
846 for(
int i=0;
i<
p;
i++) (*iv)[
i]=
v[
i];
848 return iv;
849}
◆ ivGetVec()
int * intvec::ivGetVec |
( |
| ) |
const |
|
inline |
◆ ivString()
char * intvec::ivString |
( |
int |
not_mat = 1 , |
|
|
int |
spaces = 0 , |
|
|
int |
dim = 2 |
|
) |
| const |
Definition at line 58 of file intvec.cc.
59{
60
61#ifndef OM_NDEBUG
64#endif
66 if ((
col == 1)&&(not_mat))
67 {
70 {
72 }
74 {
76 }
77 }
78 else
79 {
81 {
83 {
85 {
87 }
88 }
89 else
90 {
92 {
94 }
95 }
97 {
100 }
101 }
102 }
104}
#define omCheckAddr(addr)
void StringSetS(const char *st)
void StringAppendS(const char *st)
◆ ivTEST()
void intvec::ivTEST |
( |
| ) |
const |
|
inline |
Definition at line 115 of file intvec.h.
116 {
120 }
#define omCheckAddrSize(addr, size)
◆ length()
int intvec::length |
( |
| ) |
const |
|
inline |
◆ makeVector()
void intvec::makeVector |
( |
| ) |
|
|
inline |
◆ max_in()
◆ min_in()
◆ operator%=()
void intvec::operator%= |
( |
int |
intop | ) |
|
Definition at line 193 of file intvec.cc.
194{
195 if (intop == 0) return;
198 {
200 int c=r%bb;
201 if (c<0) c+=bb;
203 }
204}
◆ operator*=()
void intvec::operator*= |
( |
int |
intop | ) |
|
◆ operator+=()
void intvec::operator+= |
( |
int |
intop | ) |
|
◆ operator-=()
void intvec::operator-= |
( |
int |
intop | ) |
|
◆ operator/=()
void intvec::operator/= |
( |
int |
intop | ) |
|
Definition at line 179 of file intvec.cc.
180{
181 if (intop == 0) return;
184 {
186 int c=r%bb;
187 if (c<0) c+=bb;
188 r=(r-c)/intop;
190 }
191}
◆ operator[]() [1/2]
int & intvec::operator[] |
( |
int |
i | ) |
|
|
inline |
Definition at line 65 of file intvec.h.
66 {
67#ifndef SING_NDEBUG
69 {
70 Werror(
"wrong intvec index:%d\n",
i);
71 }
72#endif
74 }
void Werror(const char *fmt,...)
◆ operator[]() [2/2]
const int & intvec::operator[] |
( |
int |
i | ) |
const |
|
inline |
Definition at line 75 of file intvec.h.
76 {
77#ifndef SING_NDEBUG
79 {
80 Werror(
"wrong intvec index:%d\n",
i);
81 }
82#endif
84 }
◆ range() [1/2]
int intvec::range |
( |
int |
i | ) |
const |
|
inline |
Definition at line 59 of file intvec.h.
61 {
return ((((
unsigned)
i)<((
unsigned)
row)) && (
col==1)); }
◆ range() [2/2]
int intvec::range |
( |
int |
i, |
|
|
int |
j |
|
) |
| const |
|
inline |
Definition at line 62 of file intvec.h.
64 {
return ((((
unsigned)
i)<((
unsigned)
row)) && (((
unsigned)
j)<((
unsigned)
col))); }
◆ resize()
void intvec::resize |
( |
int |
new_length | ) |
|
Definition at line 106 of file intvec.cc.
107{
109 if (new_length==0)
110 {
112 {
115 }
116 }
117 else
118 {
121 else
122 v = (
int*)
omAlloc0(new_length*
sizeof(
int));
123 }
125}
#define omRealloc0Size(addr, o_size, size)
◆ rows()
int intvec::rows |
( |
| ) |
const |
|
inline |
◆ show()
void intvec::show |
( |
int |
mat = 0 , |
|
|
int |
spaces = 0 |
|
) |
| const |
Definition at line 149 of file intvec.cc.
150{
152 if (spaces>0)
153 {
156 }
157 else
158 {
160 }
162}
char * ivString(int not_mat=1, int spaces=0, int dim=2) const
void PrintNSpaces(const int n)
void PrintS(const char *s)
◆ String()
char * intvec::String |
( |
int |
dim = 2 | ) |
const |
◆ view()
void intvec::view |
( |
| ) |
const |
Definition at line 134 of file intvec.cc.
135{
137
138 for (
int i = 0;
i <
rows();
i++)
139 {
141 for (
int j = 0;
j <
cols();
j++)
144 }
146}
◆ col
◆ row
The documentation for this class was generated from the following files: