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

◆ copyElementArray()

template<typename RingType>
ElementArray ConcreteVectorArithmetic< RingType >::copyElementArray ( const ElementArray & sparse) const
inline

Definition at line 173 of file VectorArithmetic.hpp.

174 {
175 auto& v = * elementArray(sparse);
176 auto tempPtr = new ElementArrayContainer(v.size());
177
178 int n = 0;
179 for (auto& d : *tempPtr)
180 {
181 mRing->init_set(d, v[n]);
182 ++n;
183 }
184 return ElementArray {tempPtr};
185 }
size_t size(const ElementArray &coeffs) const
Linear Algebra /////.
ElementArrayContainer * elementArray(const ElementArray &f) const
typename RingType::ElementContainerType ElementArrayContainer

References elementArray(), and mRing.