spielwiese
Last change
on this file since 3c473c was
3c473c,
checked in by Kai Krüger <krueger@…>, 14 years ago
|
rename directory modules to dyn_modules
anticipating "modules" directory for cmake.
git-svn-id: file:///usr/local/Singular/svn/trunk@13033 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[aabddbd] | 1 | %{ |
---|
| 2 | /* |
---|
| 3 | * |
---|
| 4 | * $Id $ |
---|
| 5 | * |
---|
| 6 | * Module file for computing locally trivial vector fields |
---|
| 7 | * by a Groebner basis computation similar to the syzygies |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | #include "ideals.h" |
---|
| 11 | #include "ring.h" |
---|
| 12 | #include "kstd1.h" |
---|
| 13 | #include "prCopy.h" |
---|
| 14 | %} |
---|
| 15 | |
---|
| 16 | //#package="loctriv"; |
---|
| 17 | package="kstd"; |
---|
| 18 | version="$Id $"; |
---|
[465088] | 19 | info="LIBRARY: partstd.lib EXTERNALLY CONTROLLED GROEBNER\\n\\n kstd(module i1, int i2); externally controlled std.\\n"; |
---|
[aabddbd] | 20 | |
---|
| 21 | %procedures |
---|
| 22 | |
---|
| 23 | module kstd ( |
---|
| 24 | module h1, |
---|
| 25 | int k |
---|
| 26 | ) |
---|
| 27 | { |
---|
| 28 | %declaration; |
---|
| 29 | |
---|
| 30 | ideal s_h1; |
---|
| 31 | ideal s_h3; |
---|
| 32 | int j; |
---|
| 33 | ring orig_ring; |
---|
| 34 | ring syz_ring; |
---|
| 35 | intvec *w=NULL; |
---|
| 36 | |
---|
| 37 | %typecheck; |
---|
| 38 | |
---|
| 39 | assume(currRing != NULL); |
---|
| 40 | orig_ring=currRing; |
---|
| 41 | syz_ring=rCurrRingAssure_SyzComp(); |
---|
| 42 | |
---|
| 43 | rSetSyzComp(k); |
---|
| 44 | |
---|
| 45 | if (orig_ring != syz_ring) |
---|
| 46 | { |
---|
| 47 | s_h1=idrCopyR_NoSort(h1,orig_ring); |
---|
| 48 | } |
---|
| 49 | else |
---|
| 50 | { |
---|
| 51 | s_h1 = h1; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k); |
---|
| 55 | |
---|
| 56 | if (s_h3==NULL) |
---|
| 57 | { |
---|
| 58 | %return = (void *)(idFreeModule(IDELEMS(h1))); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | if (orig_ring != syz_ring) |
---|
| 62 | { |
---|
| 63 | idDelete(&s_h1); |
---|
| 64 | idSkipZeroes(s_h3); |
---|
| 65 | rChangeCurrRing(orig_ring); |
---|
| 66 | s_h3 = idrMoveR_NoSort(s_h3, syz_ring); |
---|
| 67 | rKill(syz_ring); |
---|
| 68 | } |
---|
| 69 | else |
---|
| 70 | { |
---|
| 71 | idSkipZeroes(s_h3); |
---|
| 72 | } |
---|
| 73 | %return = (void *)s_h3; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | %C |
---|
Note: See
TracBrowser
for help on using the repository browser.