Changeset e543dd in git


Ignore:
Timestamp:
Apr 6, 2011, 5:26:53 PM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
6f1774bebfc5b4528c0d9586e216b4160d0dc8a8
Parents:
f6bfc4760c37e57e10254840047f2c962b9566bb
Message:
new gfanlib from Anders


git-svn-id: file:///usr/local/Singular/svn/trunk@14098 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
gfanlib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • gfanlib/gfanlib_polyhedralfan.cpp

    rf6bfc4 re543dd  
    308308   * which causes the ordering in which the different orbits appear to change.
    309309   */
    310 
    311310  if(cones.empty())return ZMatrix(0,n);
    312311ZMatrix generatorsOfLinealitySpace=cones.begin()->generatorsOfLinealitySpace();//all cones have the same lineality space
     312
    313313
    314314  std::set<ZVector> rays;//(this->getAmbientDimension());
     
    317317    {
    318318      ZMatrix temp=i->extremeRays(&generatorsOfLinealitySpace);
    319       std::cerr<<temp;
     319 //     std::cerr<<temp;
    320320      for(int j=0;j<temp.getHeight();j++)
    321321        rays.insert(symmetries.orbitRepresentative(temp[j]));
     
    490490
    491491          ZMatrix generatorsOfLinealitySpace=cones.empty()?ZMatrix::identity(getAmbientDimension()):cones.begin()->generatorsOfLinealitySpace();
    492           std::cerr<<generatorsOfLinealitySpace;
    493492          SymmetricComplex symCom(rays,generatorsOfLinealitySpace,symmetries);
    494 
    495493
    496494          for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++)
     
    508506          symCom.remap();
    509507//          log1 cerr<<"Done remapping";
     508
    510509          return symCom;
    511510}
  • gfanlib/gfanlib_symmetry.h

    rf6bfc4 re543dd  
    2727  static bool isPermutation(IntVector const &a);
    2828  /**
    29    * Returns true if all rows of the matrix are pemutations
     29   * Returns true if all rows of the matrix contains the elements 0 up to m.getWidth()-1.
    3030   */
    3131  static bool arePermutations(IntMatrix const &m);
     
    102102
    103103class SymmetryGroup{
    104 //  unsigned char *byteTable;
    105104  int byteTableHeight;
    106105  class Trie *trie;
     
    142141
    143142  // Methods for highly optimized symmetry group computations:
    144 //  void createByteTable();//Can only be called once. SymmetryGroup is not allowed to be changed afterwards or to be copied. Leaks memory at destruction.
    145143  void createTrie();
    146 //  unsigned char *getByteTable()const;
    147 //  int getByteTableHeight()const;
    148144};
    149145/**
  • gfanlib/gfanlib_zcone.cpp

    rf6bfc4 re543dd  
    413413        set_addelem(A->linset,i+1);
    414414
    415       A->objective-dd_LPmax;
     415      A->objective=dd_LPmax;
    416416      lp=dd_Matrix2LP(A, &err);
    417417      if (err!=dd_NoError) goto _L99;
     
    717717      equations=QToZMatrixPrimitive(equations2);
    718718    }
    719   state=s;
     719  if(state<s)
     720    state=s;
    720721}
    721722
  • gfanlib/gfanlib_zcone.h

    rf6bfc4 re543dd  
    9090};
    9191
     92class ZCone;
     93ZCone intersection(const ZCone &a, const ZCone &b);
    9294class ZCone
    9395{
     
    349351    friend std::ostream &operator<<(std::ostream &f, ZCone const &c);
    350352};
    351 ZCone intersection(const ZCone &a, const ZCone &b);
     353
    352354};
    353355
  • gfanlib/gfanlib_zfan.cpp

    rf6bfc4 re543dd  
    5757        assert(coneCollection);
    5858        complex = new SymmetricComplex(coneCollection->toSymmetricComplex());
    59         std::cerr<<"D"<<std::endl;
    6059        complex->buildConeLists(false,false,&cones);
    61         std::cerr<<"D"<<std::endl;
    6260        complex->buildConeLists(true,false,&maximalCones);
    63         std::cerr<<"D"<<std::endl;
    6461        complex->buildConeLists(false,true,&coneOrbits);
    65         std::cerr<<"D"<<std::endl;
    6662        complex->buildConeLists(true,true,&maximalConeOrbits);
    67         std::cerr<<"D"<<std::endl;
    68       }
    69   }
     63      }
     64  }
     65  void ZFan::killComplex()const
     66  {
     67    if(complex)
     68      {
     69        delete complex;
     70        complex=0;
     71      }
     72  }
     73
    7074  ZFan::ZFan(std::istream &f):
    7175    coneCollection(0),
     
    213217    if(this!=&f)
    214218      {
    215 std::cerr<<"COPYING\n";
    216219        if(complex)
    217220          {
     
    219222            complex=0;
    220223          }
    221         std::cerr<<"1COPYING\n";
    222224        if(coneCollection)
    223225          {
     
    225227            coneCollection=0;
    226228          }
    227         std::cerr<<"2COPYING\n";
    228229        if(f.coneCollection)
    229230          {
    230231            coneCollection=new PolyhedralFan(*f.coneCollection);
    231232          }
    232         std::cerr<<"3COPYING\n";
    233233        if(f.complex)
    234234          {
    235235            complex=new SymmetricComplex(*f.complex);
    236236          }
    237         std::cerr<<"DONE COPYING\n";
    238237      }
    239238    return *this;
     
    273272  {
    274273    ensureConeCollection();
     274    killComplex();
    275275    coneCollection->insert(c);
    276276  }
     
    291291{
    292292  ensureComplex();
     293
     294  //  std::string s=complex->toString(flags);
     295//  killComplex();
     296//  return s;//complex->getMinDim(),complex->getMaxDim(),0,0);
    293297  return complex->toString(flags);//complex->getMinDim(),complex->getMaxDim(),0,0);
    294298//  return "NEEDTOFIXTHIS";
  • gfanlib/gfanlib_zfan.h

    rf6bfc4 re543dd  
    5858  void ensureConeCollection()const;
    5959  void ensureComplex()const;
     60  void killComplex()const;
    6061  std::vector<std::vector<IntVector> > &table(bool orbit, bool maximal)const;
    6162public:
Note: See TracChangeset for help on using the changeset viewer.