/* 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. */ #ifndef FormedArithmeticH #define FormedArithmeticH #include "Algebra/DivisionAlgebraCategory.h" #include "Algebra/MetricSpaceCategory.h" #include "Vector/DistributingDivisionAlgebra.h" #include "Vector/DistributingMetricSpace.h" #include "Vector/DistributingEquivalentCategory.h" #include "Array/FormedArray.h" template class FormedArithmetic1d : public DivisionAlgebraCategory< FormedArithmetic1d, T >, public DistributingDivisionAlgebra, T, T>, public DistributingEquivalentCategory >, public ConcreteFormedArray1d { public: FormedArithmetic1d(Subscript n) : ConcreteFormedArray1d(n) {} FormedArithmetic1d() {} FormedArithmetic1d(const FormedArithmetic1d& a) : ConcreteFormedArray1d(a) {} const FormedArithmetic1d& operator=(const Array1d& rhs); const FormedArithmetic1d& operator=(const FormedArithmetic1d& rhs) { ConcreteFormedArray1d::operator=(rhs); return *this; } const FormedArithmetic1d& operator=(const T& rhs) { ConcreteFormedArray1d::operator=(rhs); return *this; } }; template class FormedArithmetic2d : public DivisionAlgebraCategory< FormedArithmetic2d, T >, public DistributingDivisionAlgebra, T, T>, public ConcreteConcreteFormedArray2d { public: FormedArithmetic2d(Subscript n1, Subscript n2) : ConcreteFormedArray2d(n1, n2) {} FormedArithmetic2d() {} const FormedArithmetic2d& operator=(const FormedArithmetic2d& rhs) { ConcreteConcreteFormedArray2d::operator=(rhs); return *this; } const FormedArithmetic2d& operator=(const T& rhs) { ConcreteConcreteFormedArray2d::operator=(rhs); return *this; } }; #endif