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

◆ displayElements()

template<typename container, typename fcn>
void displayElements ( std::string header,
GBRing * R,
container a,
fcn f )

Definition at line 728 of file gbring.hpp.

729{
730 std::cout << header << std::endl;
731 long count = 0;
732 // for (auto c = a; c != b; ++c)
733 for (auto c : a)
734 {
735 buffer o;
736 const gbvector *g = f(c);
737 o << "[" << count << "] = ";
738 R->gbvector_text_out(o, nullptr, g, 3);
739 o << newline;
740 std::cout << o.str();
741 ++count;
742 }
743}
void gbvector_text_out(buffer &o, const FreeModule *F, const gbvector *f, int nterms=-1) const
Definition gbring.cpp:779
char * str()
Definition buffer.hpp:72
char newline[]
Definition m2-types.cpp:49

References GBRing::gbvector_text_out(), newline, and buffer::str().