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

Method ideal

IntegerProgramming/ideal.cc:703–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701/////////////////// constructors and destructor /////////////////////////////
702
703ideal::ideal(matrix& A, const term_ordering& _w, const int& algorithm)
704{
705
706 // check arguments as far as possible
707
708 if(A.error_status()<0)
709 {
710 cerr<<"\nWARNING: ideal::ideal(matrix&, const term_ordering&, const "
711 "int&):\ncannot create ideal from a corrupt input matrix"<<endl;
712 size=-1;
713 return;
714 }
715
716 if(_w.error_status()<0)
717 {
718 cerr<<"\nWARNING: ideal::ideal(matrix&, const term_ordering&, const "
719 "int&):\ncannot create ideal with a corrupt input ordering"<<endl;
720 size=-1;
721 return;
722 }
723
724 if((_w.number_of_elimination_variables()!=0) &&
725 (_w.number_of_weighted_variables()!=A.columns))
726 cerr<<"\nWARNING: ideal& ideal::ideal(matrix&, const term_ordering&):\n"
727 "argument term ordering might be inappropriate"<<endl;
728
729#ifdef SUPPORT_DRIVEN_METHODS_EXTENDED
730
731 create_subset_tree();
732
733#endif // SUPPORT_DRIVEN_METHODS_EXTENDED
734
735 size=0;
736
737 // initialize the S-pair flags with the default value
738 // (this is not really necessray, but looks nicer when outputting the
739 // ideal without having computed a Groebner basis)
740 rel_primeness=1;
741 M_criterion=2;
742 F_criterion=0;
743 B_criterion=8;
744 second_criterion=0;
745
746 interreduction_percentage=12.0;
747
748 // construct the ideal according to the algorithm
749 switch(algorithm)
750 {
751 case CONTI_TRAVERSO:
752 Conti_Traverso_ideal(A,_w);
753 break;
754 case POSITIVE_CONTI_TRAVERSO:
755 Positive_Conti_Traverso_ideal(A,_w);
756 break;
757 case POTTIER:
758 Pottier_ideal(A,_w);
759 break;
760 case HOSTEN_STURMFELS:

Callers

nothing calls this directly

Calls 5

is_at_endMethod · 0.80
error_statusMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected