MCPcopy Create free account
hub / github.com/Singular/Singular / maPoly_Optimize

Function maPoly_Optimize

kernel/maps/fast_maps.cc:712–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710 *******************************************************************/
711
712void maPoly_Optimize(mapoly mpoly, ring src_r)
713{
714 assume(mpoly!=NULL && mpoly->src!=NULL);
715 mapoly iter = mpoly;
716 mapoly choice;
717 mapoly ggT=NULL;
718 mapoly fp=NULL;
719 mapoly fq=NULL;
720 while (iter->next!=NULL)
721 {
722 choice=iter->next;
723 if ( /*(*/ iter->f1==NULL /*)*/ )
724 {
725 ggT=maFindBestggT(iter, choice, fp, fq,src_r);
726 if (choice!=NULL)
727 {
728 assume(iter->f1==NULL);
729 assume(iter->f2==NULL);
730 iter->f1=fp;
731 iter->f2=ggT;
732 if (fq!=NULL)
733 {
734 ggT->ref++;
735 choice->f1=fq;
736 choice->f2=ggT;
737 }
738 }
739 else assume(ggT==NULL);
740 }
741 iter=iter->next;
742 }
743}

Callers 1

fast_map_common_subexpFunction · 0.85

Calls 1

maFindBestggTFunction · 0.85

Tested by

no test coverage detected