/* Example programs from the book Scientific and Engineering Programming in C++: An Introduction with Advanced Techniques and Examples, Addison-Wesley, 1994. (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES CORPORATION 1994. ALL RIGHTS RESERVED. See README file for further details. */ template ConcreteFormedArray2d::ConcreteFormedArray2d() : ConcreteArray2d(SubscriptArray<2>(0, 0), 0) { } template ConcreteFormedArray2d::ConcreteFormedArray2d(Subscript s0, Subscript s1) : ConcreteArray2d(SubscriptArray<2>(s0, s1), 0) { setSizeOnHeap(s0 * s1); } template ConcreteFormedArray2d:: ConcreteFormedArray2d(const ConcreteFormedArray2d& a) : ConcreteArray2d(SubscriptArray<2>(a.shape(0), a.shape(1)), 0) { setSizeOnHeap(a.numElts()); concreteCopy(*this, a); } template ConcreteFormedArray2d:: ConcreteFormedArray2d(const ConcreteArray2dConstRef& a) : ConcreteArray2d(SubscriptArray<2>(a.shape(0), a.shape(1)), 0) { setSizeOnHeap(a.numElts()); concreteCopy(*this, a); } template ConcreteFormedArray2d:: ConcreteFormedArray2d(const ConcreteArray2dConstRef::ProjectionT, T>& a) : ConcreteArray2d(SubscriptArray<2>(a.shape(0), a.shape(1)), 0) { setSizeOnHeap(a.numElts()); concreteCopy(*this, a); } template ConcreteFormedArray2d::~ConcreteFormedArray2d() { delete[] datap; } template ConcreteFormedArray2d& ConcreteFormedArray2d::operator=(const ConcreteFormedArray2d& rhs) { concreteCopy(*this, rhs); return *this; } template ConcreteFormedArray2d& ConcreteFormedArray2d::operator=(const ConcreteArray2dConstRef& rhs) { concreteCopy(*this, rhs); return *this; } template ConcreteFormedArray2d& ConcreteFormedArray2d::operator=(const T& rhs) { ConcreteArray2d, T>::operator=(rhs); return *this; } template void ConcreteFormedArray2d::reshape(const SubscriptArray<2>& s) { ConcreteArray2d::reshapeOnHeap(s); }