949{
950 assume(zf.getAmbientDimension() == zg.getAmbientDimension());
951
952
953 std::list<gfan::ZCone> maximalConesOfF;
954 for (int d=0; d<=zf.getAmbientDimension(); d++)
955 for (
int i=0;
i<zf.numberOfConesOfDimension(d,0,1);
i++)
956 maximalConesOfF.push_back(zf.getCone(d,
i,0,1));
957
958 std::list<gfan::ZCone> maximalConesOfG;
959 for (int d=0; d<=zg.getAmbientDimension(); d++)
960 for (
int i=0;
i<zg.numberOfConesOfDimension(d,0,1);
i++)
961 maximalConesOfG.push_back(zg.getCone(d,
i,0,1));
962
963
964 gfan::ZFan zr = gfan::ZFan(zf.getAmbientDimension());
965 for (std::list<gfan::ZCone>::iterator itf=maximalConesOfF.begin();
966 itf != maximalConesOfF.end(); itf++)
967 for (std::list<gfan::ZCone>::iterator itg=maximalConesOfG.begin();
968 itg != maximalConesOfG.end(); itg++)
969 zr.insert(intersection(*itf,*itg));
970
971 return zr;
972}