Changeset 2c6535 in git


Ignore:
Timestamp:
Feb 9, 2009, 4:32:07 PM (15 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
361be1faaba387dc324a02dbae511da1cda4aeec
Parents:
35d0d1a7256e75184cea2fe4d2e02762b243b544
Message:
*** empty log message ***


git-svn-id: file:///usr/local/Singular/svn/trunk@11356 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r35d0d1a r2c6535  
    66#include "kstd1.h"
    77#include "intvec.h"
     8#include "polys.h"
     9#include "ideals.h"
    810
    911#ifndef gfan_DEBUG
     
    1113#endif
    1214
    13 ideal getGB(ideal inputIdeal){
    14         ideal gb;
    15         gb=kStd(inputIdeal,NULL,testHomog,NULL); //Possible to call without testHomog/isHomog?
    16                                                 // Why are 64 "results" printed?
     15ideal getGB(ideal inputIdeal)
     16{
    1717        #ifdef gfan_DEBUG
    1818        printf("Now in getGB\n");
    1919        #endif
     20
     21        ideal gb;
     22        gb=kStd(inputIdeal,NULL,testHomog,NULL); //Possible to call without testHomog/isHomog?
     23        idSkipZeroes(gb); //Get rid of zero entries
     24
    2025        return gb;
    2126}
    2227
    23 ideal gfan(ideal inputIdeal){
     28/****** getWallIneq computes the inequalities ***/
     29/*INPUT_TYPE: ideal                             */
     30/*RETURN_TYPE: matrix                           */
     31/************************************************/
     32void getWallIneq(ideal I)
     33{
     34        #ifdef gfan_DEBUG
     35        printf("Computing Inequalities...\n");
     36        #endif
     37
     38        // Exponentenvektor
     39        Exponent_t leadexp,aktexp,diffexp;
     40        poly aktpoly;
     41
     42        int lengthGB=IDELEMS(I);
     43        printf("The Gröbner basis has %i elements\n",lengthGB);
     44
     45        // We loop through each g\in GB
     46        for (int i=0; i<IDELEMS(I); i++)
     47        {
     48                aktpoly=(poly)I->m[i];
     49                leadexp = pGetExp(aktpoly,1); //get the exp.vect of leading monomial
     50                for (int j=2;j<=pLength(aktpoly);j++)
     51                {
     52                        aktexp=pGetExp(aktpoly,j);
     53                        //diffexp=pSubExp(aktpoly, leadexp,aktexp); //Dang! => runtime error
     54                        //printf("Exponentenvektor=%i\n",expmark);
     55                        //printf("Diff=%i\n",expmark-pGetExp(aktpoly,j));
     56                }
     57                int pCompCount;
     58                pCompCount=pLength(aktpoly);
     59                printf("Poly No. %i has %i components\n",i,pCompCount);
     60        } //for
     61        //res=(ideal)aktpoly;
     62        //return res;
     63}
     64
     65ideal gfan(ideal inputIdeal)
     66{
    2467        #ifdef gfan_DEBUG
    2568        printf("Now in subroutine gfan\n");
    2669        #endif
    2770        ideal res;
     71        matrix ineq; //Matrix containing the boundary inequalities
     72
    2873        res=getGB(inputIdeal);
     74        getWallIneq(res);
    2975        return res;
    3076}
Note: See TracChangeset for help on using the changeset viewer.