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

◆ displayAsDenseArray()

template<typename RingType>
std::ostream & ConcreteVectorArithmetic< RingType >::displayAsDenseArray ( std::ostream & o,
size_t len,
const ElementArray & v,
const Range< const int > & comps ) const
inline

Definition at line 497 of file VectorArithmetic.hpp.

502 {
503 auto& vec = * elementArray(v);
504 auto i = comps.cbegin();
505 auto c = vec.cbegin();
506 o << "[(" << vec.size() << ") ";
507 for (auto j = 0; j < len; ++j)
508 {
509 if (i == comps.cend() or *i != j)
510 o << ". ";
511 else
512 {
513 buffer b;
514 mRing->elem_text_out(b, *c, true, true, true);
515 o << b.str() << " ";
516 ++i;
517 ++c;
518 }
519 }
520 o << "]" << std::endl;
521 return o;
522 }
size_t size(const ElementArray &coeffs) const
Linear Algebra /////.
ElementArrayContainer * elementArray(const ElementArray &f) const

References Range< T >::cbegin(), Range< T >::cend(), elementArray(), mRing, and buffer::str().