/** @file function.cpp
*
- * Implementation of class function.
- *
- * This file was generated automatically by function.pl.
- * Please do not modify it directly, edit the perl script instead!
- * function.pl options: $maxargs=10 */
+ * Implementation of class function. */
/*
+ * This file was generated automatically by function.pl.
+ * Please do not modify it directly, edit the perl script instead!
+ * function.pl options: $maxargs=10
+ *
* GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
#include "function.h"
#include "ex.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
{
debugmsg("function printraw",LOGLEVEL_PRINT);
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
os << "function(name=" << registered_functions()[serial].name;
for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
{
debugmsg("function print",LOGLEVEL_PRINT);
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
os << registered_functions()[serial].name;
printseq(os,'(',',',')',exprseq::precedence,function::precedence);
{
debugmsg("function printtree",LOGLEVEL_PRINT);
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
os << string(indent,' ') << "function "
<< registered_functions()[serial].name
{
debugmsg("function print csrc",LOGLEVEL_PRINT);
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
// Print function name in lowercase
string lname;
ex function::eval(int level) const
{
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
exvector eseq=evalchildren(level);
ex function::evalf(int level) const
{
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
exvector eseq=evalfchildren(level);
* @see ex::series */
ex function::series(symbol const & s, ex const & point, int order) const
{
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
if (registered_functions()[serial].s==0) {
return basic::series(s, point, order);
int function::compare_same_type(basic const & other) const
{
- ASSERT(is_of_type(other, function));
+ GINAC_ASSERT(is_of_type(other, function));
function const & o=static_cast<function &>(const_cast<basic &>(other));
if (serial!=o.serial) {
bool function::is_equal_same_type(basic const & other) const
{
- ASSERT(is_of_type(other, function));
+ GINAC_ASSERT(is_of_type(other, function));
function const & o=static_cast<function &>(const_cast<basic &>(other));
if (serial!=o.serial) return false;
ex function::pdiff(unsigned diff_param) const // partial differentiation
{
- ASSERT(serial<registered_functions().size());
+ GINAC_ASSERT(serial<registered_functions().size());
if (registered_functions()[serial].d==0) {
throw(std::logic_error(string("function::pdiff(") + registered_functions()[serial].name + "): no diff function defined"));
const function some_function;
type_info const & typeid_function=typeid(some_function);
+} // namespace GiNaC
+