spielwiese
Last change
on this file since cd5fefc was
cd5fefc,
checked in by Oleksandr Motsak <motsak@…>, 11 years ago
|
new p_Tail and id_Tail (separated from a wrapper)
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | // -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
---|
2 | /*****************************************************************************\ |
---|
3 | * Computer Algebra System SINGULAR |
---|
4 | \*****************************************************************************/ |
---|
5 | /** @file syzextra.cc |
---|
6 | * |
---|
7 | * Here we implement the Computation of Syzygies |
---|
8 | * |
---|
9 | * ABSTRACT: Computation of Syzygies due to Schreyer |
---|
10 | * |
---|
11 | * @author Oleksandr Motsak |
---|
12 | * |
---|
13 | **/ |
---|
14 | /*****************************************************************************/ |
---|
15 | |
---|
16 | // include header file |
---|
17 | #include <kernel/mod2.h> |
---|
18 | |
---|
19 | #include "syzextra.h" |
---|
20 | |
---|
21 | #include <omalloc/omalloc.h> |
---|
22 | #include <polys/monomials/p_polys.h> |
---|
23 | |
---|
24 | #include <kernel/ideals.h> |
---|
25 | |
---|
26 | |
---|
27 | BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SYZEXTRA) |
---|
28 | |
---|
29 | |
---|
30 | poly p_Tail(const poly p, const ring r) |
---|
31 | { |
---|
32 | if( p == NULL) |
---|
33 | return NULL; |
---|
34 | else |
---|
35 | return p_Copy( pNext(p), r ); |
---|
36 | } |
---|
37 | |
---|
38 | |
---|
39 | ideal id_Tail(const ideal id, const ring r) |
---|
40 | { |
---|
41 | if( id == NULL) |
---|
42 | return NULL; |
---|
43 | |
---|
44 | const ideal newid = idInit(IDELEMS(id),id->rank); |
---|
45 | |
---|
46 | for (int i=IDELEMS(id) - 1; i >= 0; i--) |
---|
47 | newid->m[i] = p_Tail( id->m[i], r ); |
---|
48 | |
---|
49 | newid->rank = id_RankFreeModule(newid, currRing); |
---|
50 | |
---|
51 | return newid; |
---|
52 | } |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | END_NAMESPACE END_NAMESPACE_SINGULARXX |
---|
62 | |
---|
63 | |
---|
64 | // Vi-modeline: vim: filetype=c:syntax:shiftwidth=2:tabstop=8:textwidth=0:expandtab |
---|
Note: See
TracBrowser
for help on using the repository browser.