#include <fglmvec.h>
Definition at line 18 of file fglmvec.h.
◆ fglmVector() [1/5]
Implementation of class fglmVector
Definition at line 152 of file fglmvec.cc.
◆ fglmVector() [2/5]
fglmVector::fglmVector |
( |
| ) |
|
◆ fglmVector() [3/5]
fglmVector::fglmVector |
( |
int |
size | ) |
|
◆ fglmVector() [4/5]
fglmVector::fglmVector |
( |
int |
size, |
|
|
int |
basis |
|
) |
| |
Definition at line 164 of file fglmvec.cc.
165{
167}
void setelem(int i, number n)
◆ fglmVector() [5/5]
Definition at line 169 of file fglmvec.cc.
170{
171 rep =
v.rep->copyObject ();
172}
const Variable & v
< [in] a sqrfree bivariate poly
◆ ~fglmVector()
fglmVector::~fglmVector |
( |
| ) |
|
◆ clearDenom()
number fglmVector::clearDenom |
( |
| ) |
|
Definition at line 502 of file fglmvec.cc.
503{
504 number theLcm =
nInit (1);
508 {
510 {
514 theLcm = temp;
515 }
516 }
518 {
521 }
522 else
523 {
525 {
526 *this *= theLcm;
528 {
530 }
531 }
532 }
533 return theLcm;
534}
number getconstelem(int i) const
static FORCE_INLINE number n_NormalizeHelper(number a, number b, const coeffs r)
assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,...
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
◆ elemIsZero()
int fglmVector::elemIsZero |
( |
int |
i | ) |
|
◆ gcd()
number fglmVector::gcd |
( |
| ) |
const |
Definition at line 458 of file fglmvec.cc.
459{
463 number theGcd;
464 number current;
466 {
469 {
470 theGcd =
nCopy (current);
473 {
475 }
478 }
480 }
482 {
483 while(
i > 0 && !gcdIsOne)
484 {
487 {
490 theGcd = temp;
493 }
495 }
496 }
497 else
499 return theGcd;
500}
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
◆ getconstelem()
number fglmVector::getconstelem |
( |
int |
i | ) |
const |
◆ getelem()
number & fglmVector::getelem |
( |
int |
i | ) |
|
◆ isZero()
int fglmVector::isZero |
( |
| ) |
|
◆ makeUnique()
void fglmVector::makeUnique |
( |
| ) |
|
|
protected |
Definition at line 198 of file fglmvec.cc.
199{
201 {
204 }
205}
fglmVectorRep * clone() const
◆ nihilate()
Definition at line 218 of file fglmvec.cc.
220{
222 int vsize =
v.size ();
223 number term1, term2;
224 fglmASSERT (vsize <= rep->
size (),
"v has to be smaller or equal");
226 {
227 for(
i = vsize;
i > 0;
i--)
228 {
230 term2 =
nMult (fac2,
v.rep->getconstelem (
i));
234 }
236 {
238 }
239 }
240 else
241 {
242 number *newelems;
244 for(
i = vsize;
i > 0;
i--)
245 {
247 term2 =
nMult (fac2,
v.rep->getconstelem (
i));
248 newelems[
i - 1] =
nSub (term1, term2);
251 }
253 {
255 }
258 }
259}
#define fglmASSERT(ignore1, ignore2)
◆ numNonZeroElems()
int fglmVector::numNonZeroElems |
( |
| ) |
const |
Definition at line 212 of file fglmvec.cc.
213{
215}
int numNonZeroElems() const
◆ operator!=()
Definition at line 290 of file fglmvec.cc.
291{
292 return !(*
this ==
v);
293}
◆ operator*=()
Definition at line 350 of file fglmvec.cc.
351{
355 {
356 number *temp;
357 temp = (number *)
omAlloc (
s *
sizeof (number));
358 for(
i =
s;
i > 0;
i--)
362 }
363 else
364 {
365 for(
i =
s;
i > 0;
i--)
367 }
368 return *this;
369}
const CanonicalForm int s
◆ operator+=()
Definition at line 305 of file fglmvec.cc.
306{
308
311 {
314 }
315 else
316 {
318 number *newelems;
319 newelems = (number *)
omAlloc (n *
sizeof (number));
320 for(
i = n;
i > 0;
i--)
324 }
325 return *this;
326}
◆ operator-=()
Definition at line 328 of file fglmvec.cc.
329{
333 {
336 }
337 else
338 {
340 number *newelems;
341 newelems = (number *)
omAlloc (n *
sizeof (number));
342 for(
i = n;
i > 0;
i--)
346 }
347 return *this;
348}
◆ operator/=()
Definition at line 371 of file fglmvec.cc.
372{
376 {
377 number *temp;
378 temp = (number *)
omAlloc (
s *
sizeof (number));
379 for(
i =
s;
i > 0;
i--)
380 {
383 }
386 }
387 else
388 {
389 for(
i =
s;
i > 0;
i--)
390 {
393 }
394 }
395 return *this;
396}
◆ operator=()
Definition at line 261 of file fglmvec.cc.
262{
264 {
267 rep =
v.rep->copyObject ();
268 }
269 return *this;
270}
◆ operator==()
Definition at line 272 of file fglmvec.cc.
273{
275 {
277 return 1;
278 else
279 {
283 return 0;
284 return 1;
285 }
286 }
287 return 0;
288}
◆ setelem()
void fglmVector::setelem |
( |
int |
i, |
|
|
number & |
n |
|
) |
| |
Definition at line 451 of file fglmvec.cc.
452{
456}
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
◆ size()
int fglmVector::size |
( |
| ) |
const |
◆ operator* [1/2]
Definition at line 426 of file fglmvec.cc.
427{
429 temp *= n;
430 return temp;
431}
◆ operator* [2/2]
Definition at line 433 of file fglmvec.cc.
434{
436 temp *= n;
437 return temp;
438}
◆ operator+
Definition at line 412 of file fglmvec.cc.
413{
415 temp += rhs;
416 return temp;
417}
◆ operator- [1/2]
Definition at line 419 of file fglmvec.cc.
420{
422 temp -= rhs;
423 return temp;
424}
◆ operator- [2/2]
Definition at line 398 of file fglmvec.cc.
399{
402 number n;
403 for(
i =
v.size ();
i > 0;
i--)
404 {
405 n =
nCopy (
v.getconstelem (
i));
408 }
409 return temp;
410}
◆ rep
The documentation for this class was generated from the following files: