* Implementation of GiNaC's symbolic objects. */
/*
- * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2007 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
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string>
bool symbol::info(unsigned inf) const
{
- if (inf == info_flags::symbol)
- return true;
- if (inf == info_flags::polynomial ||
- inf == info_flags::integer_polynomial ||
- inf == info_flags::cinteger_polynomial ||
- inf == info_flags::rational_polynomial ||
- inf == info_flags::crational_polynomial ||
- inf == info_flags::rational_function)
- return true;
- if (inf == info_flags::real)
- return domain == domain::real;
- else
- return inherited::info(inf);
+ switch (inf) {
+ case info_flags::symbol:
+ case info_flags::polynomial:
+ case info_flags::integer_polynomial:
+ case info_flags::cinteger_polynomial:
+ case info_flags::rational_polynomial:
+ case info_flags::crational_polynomial:
+ case info_flags::rational_function:
+ case info_flags::expanded:
+ return true;
+ case info_flags::has_indices:
+ return false;
+ case info_flags::real:
+ return domain == domain::real;
+ }
+ return inherited::info(inf);
}
ex symbol::eval(int level) const