X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Fmatrix.h;h=b4291a05ab8f226e54d65129e71e7b11b47e1de8;hb=aed514f534cc6b4438822c1fcf80c203a828a94c;hp=edb4adb78ec6214d36f4852dd775d502b8ce9e07;hpb=9985e28882888663fd8e43e8c59728ddcad552d0;p=ginac.git diff --git a/ginac/matrix.h b/ginac/matrix.h index edb4adb7..b4291a05 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -3,7 +3,7 @@ * Interface to symbolic matrices */ /* - * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2022 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,64 +33,6 @@ namespace GiNaC { -/** Helper template to allow initialization of matrices via an overloaded - * comma operator (idea stolen from Blitz++). */ -template -class matrix_init { -public: - matrix_init(It i) : iter(i) {} - - matrix_init operator,(const T & x) - { - *iter = x; - return matrix_init(++iter); - } - - // The following specializations produce much tighter code than the - // general case above - - matrix_init operator,(int x) - { - *iter = T(x); - return matrix_init(++iter); - } - - matrix_init operator,(unsigned int x) - { - *iter = T(x); - return matrix_init(++iter); - } - - matrix_init operator,(long x) - { - *iter = T(x); - return matrix_init(++iter); - } - - matrix_init operator,(unsigned long x) - { - *iter = T(x); - return matrix_init(++iter); - } - - matrix_init operator,(double x) - { - *iter = T(x); - return matrix_init(++iter); - } - - matrix_init operator,(const symbol & x) - { - *iter = T(x); - return matrix_init(++iter); - } - -private: - matrix_init(); - It iter; -}; - - /** Symbolic matrices. */ class matrix : public basic { @@ -102,7 +44,6 @@ public: matrix(unsigned r, unsigned c, const lst & l); matrix(std::initializer_list> l); - matrix_init operator=(const ex & x) attribute_deprecated; protected: matrix(unsigned r, unsigned c, const exvector & m2); matrix(unsigned r, unsigned c, exvector && m2); @@ -177,14 +118,6 @@ protected: }; GINAC_DECLARE_UNARCHIVER(matrix); -// First step of initialization of matrix with a comma-separated sequence -// of expressions. Subsequent steps are handled by matrix_init<>::operator,(). -inline matrix_init matrix::operator=(const ex & x) -{ - m[0] = x; - return matrix_init(++m.begin()); -} - // wrapper functions around member functions inline size_t nops(const matrix & m)