/** * @file Scalar.hpp * * Defines conversion of matrix to scalar. * * @author James Goppert */ #pragma once #include #include #include #include #include #include "Matrix.hpp" namespace matrix { template class Scalar : public Matrix { public: virtual ~Scalar() {}; Scalar() : Matrix() { } Scalar(const Matrix & other) { (*this)(0,0) = other(0,0); } operator Type() { return (*this)(0,0); } }; typedef Scalar Scalarf; }; // namespace matrix /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */