X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fmatrix.h;h=4dc2ee0584e1cad9c78fcf3752700093da75e305;hp=518684ca186f5f443f07e8c2b0ac74de2bea95d6;hb=d840cb98fabe493fcb90701deb0dd7d8fe102ea8;hpb=b3f0d2416a7a0195446e410ebba10ec2c51cbd37 diff --git a/ginac/matrix.h b/ginac/matrix.h index 518684ca..4dc2ee05 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -3,7 +3,7 @@ * Interface to symbolic matrices */ /* - * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2003 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 @@ -24,6 +24,7 @@ #define __GINAC_MATRIX_H__ #include +#include #include "basic.h" #include "ex.h" @@ -144,13 +145,23 @@ extern ex lst_to_matrix(const lst & l); /** Convert list of diagonal elements to matrix. */ extern ex diag_matrix(const lst & l); -/** Create a r times c unit matrix. */ +/** Create an r times c unit matrix. */ extern ex unit_matrix(unsigned r, unsigned c); /** Create a x times x unit matrix. */ inline ex unit_matrix(unsigned x) { return unit_matrix(x, x); } +/** Create an r times c matrix of newly generated symbols consisting of the + * given base name plus the numeric row/column position of each element. + * The base name for LaTeX output is specified separately. */ +extern ex symbolic_matrix(unsigned r, unsigned c, const std::string & base_name, const std::string & tex_base_name); + +/** Create an r times c matrix of newly generated symbols consisting of the + * given base name plus the numeric row/column position of each element. */ +inline ex symbolic_matrix(unsigned r, unsigned c, const std::string & base_name) +{ return symbolic_matrix(r, c, base_name, base_name); } + } // namespace GiNaC #endif // ndef __GINAC_MATRIX_H__