Macaulay2 Engine
Loading...
Searching...
No Matches

◆ gbvector_text_out()

void GBRing::gbvector_text_out ( buffer & o,
const FreeModule * F,
const gbvector * f,
int nterms = -1 ) const

Definition at line 779 of file gbring.cpp.

783{
784 (void) F;
785 if (v == nullptr)
786 {
787 o << "0";
788 return;
789 }
790
791 bool p_one = false;
792 bool p_plus = false;
793 bool p_parens = false;
794 int count = nterms;
795 const gbvector *t;
796 for (t = v; t != nullptr && count != 0; t = t->next, count--)
797 {
798 int isone = (M == nullptr || M->is_one(t->monom));
799 K->elem_text_out(o, t->coeff, p_one, p_plus, p_parens);
800 if (!isone) M->elem_text_out(o, t->monom, p_one);
801 if (t->comp >= 1) o << "<" << t->comp << ">";
802 p_plus = true;
803 }
804 if (t != nullptr) o << "+...";
805}
const Monoid * M
Definition gbring.hpp:137
const Ring * K
Definition gbring.hpp:138
ring_elem coeff
Definition gbring.hpp:81
gbvector * next
Definition gbring.hpp:80
int monom[1]
Definition gbring.hpp:83
int comp
Definition gbring.hpp:82

References gbvector::coeff, gbvector::comp, K, M, gbvector::monom, and gbvector::next.

Referenced by dgbvec(), displayElements(), ResF4toM2Interface::from_M2_vec(), gbvector_auto_reduce(), and gbvector_auto_reduce_ZZ().