Ignore:
Timestamp:
Mar 12, 2014, 9:08:50 AM (10 years ago)
Author:
Yue Ren <ren@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
7aa26b206f76709abff0bab4adaac2dfc4ddb4ef
Parents:
c890142d6921b9d30b396af149a3df2fbc57981a
git-author:
Yue Ren <ren@mathematik.uni-kl.de>2014-03-12 10:08:50+02:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2015-02-06 13:47:03+01:00
Message:
status updated 11.03.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/gfanlib/witness.cc

    rc89014 r9abcc6  
    44#include <callgfanlib_conversion.h>
    55#include <initial.h>
     6#include <tropicalStrategy.h>
    67#include <utility>
    78
     
    134135}
    135136
    136 std::pair<ideal,ring> flip(const ideal I, const ring r, const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal)
     137std::pair<ideal,ring> flip(const ideal I, const ring r, const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal, const tropicalStrategy currentCase)
    137138{
     139  gfan::ZVector (*adjustWeight0)(gfan::ZVector w);
     140  adjustWeight0 = currentCase.adjustWeightForHomogeneity;
     141  gfan::ZVector (*adjustWeight1)(gfan::ZVector v, gfan::ZVector w);
     142  adjustWeight1 = currentCase.adjustWeightUnderHomogeneity;
     143
     144  gfan::ZVector adjustedInteriorPoint = adjustWeight0(interiorPoint);
     145  gfan::ZVector adjustedFacetNormal = adjustWeight1(facetNormal,adjustedInteriorPoint);
     146
    138147  ring origin = currRing;
    139148  ideal inIr = initial(I,r,interiorPoint);
     
    143152  int n = rVar(s);
    144153  deleteOrdering(s);
    145   // for (i=0; s->order[i]; i++)
    146   //   omFree(s->wvhdl[i]);
    147   // i++; omFreeSize(s->order, i*sizeof(int));
    148   // omFreeSize(s->block0, i*sizeof(int));
    149   // omFreeSize(s->block1, i*sizeof(int));
    150   // omFreeSize(s->wvhdl, i*sizeof(int));
    151154  s->order = (int*) omAlloc0(4*sizeof(int));
    152155  s->block0 = (int*) omAlloc0(4*sizeof(int));
     
    156159  s->block0[0] = 1;
    157160  s->block1[0] = n;
    158   s->wvhdl[0] = ZVectorToIntStar(interiorPoint,ok);
     161  s->wvhdl[0] = ZVectorToIntStar(adjustedInteriorPoint,ok);
    159162  s->order[1] = ringorder_wp;
    160163  s->block0[1] = 1;
    161164  s->block1[1] = n;
    162   s->wvhdl[1] = ZVectorToIntStar(facetNormal,ok);
     165  s->wvhdl[1] = ZVectorToIntStar(adjustedFacetNormal,ok);
    163166  s->order[2] = ringorder_C;
    164167  rComplete(s,1);
Note: See TracChangeset for help on using the changeset viewer.