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

◆ elementArrayFromContainerOfLongs()

template<typename RingType>
template<typename Container>
ElementArray ConcreteVectorArithmetic< RingType >::elementArrayFromContainerOfLongs ( const Container & c) const
inline

Definition at line 434 of file VectorArithmetic.hpp.

435 {
436 ElementArray sparse = allocateElementArray(c.size()); // initializes all elements
437 auto& svec = * elementArray(sparse);
438 for (auto i = 0; i < c.size(); ++i)
439 {
440 mRing->set_from_long(svec[i], c[i]);
441 }
442 return sparse;
443 }
size_t size(const ElementArray &coeffs) const
Linear Algebra /////.
ElementArrayContainer * elementArray(const ElementArray &f) const
ElementArray allocateElementArray() const

References allocateElementArray(), elementArray(), and mRing.