source: git/modules/loctriv.mod @ aabddbd

spielwiese
Last change on this file since aabddbd was aabddbd, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes: loctriv added git-svn-id: file:///usr/local/Singular/svn/trunk@8203 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.1 KB
Line 
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";
17package="kstd";
18version="$Id $";
19info="
20LIBRARY: partstd.lib  EXTERNALLY CONTROLLED GROEBNER
21
22   kstd(module i1, int i2);       externally controlled std.
23";
24
25%procedures
26
27module kstd (
28  module h1,
29  int k
30)
31{
32%declaration;
33
34  ideal s_h1;
35  ideal s_h3;
36  int j;
37  ring orig_ring;
38  ring syz_ring;
39  intvec *w=NULL;
40
41%typecheck;
42
43  assume(currRing != NULL);
44  orig_ring=currRing;
45  syz_ring=rCurrRingAssure_SyzComp();
46
47  rSetSyzComp(k);
48
49  if (orig_ring != syz_ring)
50  {
51    s_h1=idrCopyR_NoSort(h1,orig_ring);
52  }
53  else
54  {
55    s_h1 = h1;
56  }
57
58  s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k);
59
60  if (s_h3==NULL)
61  {
62    %return = (void *)(idFreeModule(IDELEMS(h1)));
63  }
64
65  if (orig_ring != syz_ring)
66  {
67    idDelete(&s_h1);
68    idSkipZeroes(s_h3);
69    rChangeCurrRing(orig_ring);
70    s_h3 = idrMoveR_NoSort(s_h3, syz_ring);
71    rKill(syz_ring);
72  }
73  else
74  {
75    idSkipZeroes(s_h3);
76  }
77  %return = (void *)s_h3;
78}
79
80%C
Note: See TracBrowser for help on using the repository browser.