GiNaC 1.8.7
function.cpp
Go to the documentation of this file.
1
5/*
6 * This file was generated automatically by function.py.
7 * Please do not modify it directly, edit function.cppy instead!
8 * function.py options: maxargs=14
9 *
10 * GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
27#include "function.h"
28#include "operators.h"
29#include "fderivative.h"
30#include "ex.h"
31#include "lst.h"
32#include "symmetry.h"
33#include "print.h"
34#include "power.h"
35#include "archive.h"
36#include "inifcns.h"
37#include "utils.h"
38#include "hash_seed.h"
39#include "remember.h"
40
41#include <iostream>
42#include <limits>
43#include <list>
44#include <stdexcept>
45#include <string>
46
47namespace GiNaC {
48
50// helper class function_options
52
54{
55 initialize();
56}
57
58function_options::function_options(std::string const & n, std::string const & tn)
59{
60 initialize();
61 set_name(n, tn);
62}
63
64function_options::function_options(std::string const & n, unsigned np)
65{
66 initialize();
67 set_name(n, std::string());
68 nparams = np;
69}
70
72{
73 // nothing to clean up at the moment
74}
75
77{
78 set_name("unnamed_function", "\\mbox{unnamed}");
79 nparams = 0;
82 info_f = nullptr;
83 evalf_params_first = true;
84 use_return_type = false;
97 use_remember = false;
99 symtree = 0;
100}
101
103 std::string const & tn)
104{
105 name = n;
106 if (tn==std::string())
107 TeX_name = "\\mbox{"+name+"}";
108 else
109 TeX_name = tn;
110 return *this;
111}
112
114{
115 TeX_name = tn;
116 return *this;
117}
118
119// the following lines have been generated for max. 14 parameters
121{
123 eval_f = eval_funcp(e);
124 return *this;
125}
127{
129 eval_f = eval_funcp(e);
130 return *this;
131}
133{
135 eval_f = eval_funcp(e);
136 return *this;
137}
139{
141 eval_f = eval_funcp(e);
142 return *this;
143}
145{
147 eval_f = eval_funcp(e);
148 return *this;
149}
151{
153 eval_f = eval_funcp(e);
154 return *this;
155}
157{
159 eval_f = eval_funcp(e);
160 return *this;
161}
163{
165 eval_f = eval_funcp(e);
166 return *this;
167}
169{
171 eval_f = eval_funcp(e);
172 return *this;
173}
175{
177 eval_f = eval_funcp(e);
178 return *this;
179}
181{
183 eval_f = eval_funcp(e);
184 return *this;
185}
187{
189 eval_f = eval_funcp(e);
190 return *this;
191}
193{
195 eval_f = eval_funcp(e);
196 return *this;
197}
199{
201 eval_f = eval_funcp(e);
202 return *this;
203}
205{
207 evalf_f = evalf_funcp(e);
208 return *this;
209}
211{
213 evalf_f = evalf_funcp(e);
214 return *this;
215}
217{
219 evalf_f = evalf_funcp(e);
220 return *this;
221}
223{
225 evalf_f = evalf_funcp(e);
226 return *this;
227}
229{
231 evalf_f = evalf_funcp(e);
232 return *this;
233}
235{
237 evalf_f = evalf_funcp(e);
238 return *this;
239}
241{
243 evalf_f = evalf_funcp(e);
244 return *this;
245}
247{
249 evalf_f = evalf_funcp(e);
250 return *this;
251}
253{
255 evalf_f = evalf_funcp(e);
256 return *this;
257}
259{
261 evalf_f = evalf_funcp(e);
262 return *this;
263}
265{
267 evalf_f = evalf_funcp(e);
268 return *this;
269}
271{
273 evalf_f = evalf_funcp(e);
274 return *this;
275}
277{
279 evalf_f = evalf_funcp(e);
280 return *this;
281}
283{
285 evalf_f = evalf_funcp(e);
286 return *this;
287}
289{
292 return *this;
293}
295{
298 return *this;
299}
301{
304 return *this;
305}
307{
310 return *this;
311}
313{
316 return *this;
317}
319{
322 return *this;
323}
325{
328 return *this;
329}
331{
334 return *this;
335}
337{
340 return *this;
341}
343{
346 return *this;
347}
349{
352 return *this;
353}
355{
358 return *this;
359}
361{
364 return *this;
365}
367{
370 return *this;
371}
373{
376 return *this;
377}
379{
382 return *this;
383}
385{
388 return *this;
389}
391{
394 return *this;
395}
397{
400 return *this;
401}
403{
406 return *this;
407}
409{
412 return *this;
413}
415{
418 return *this;
419}
421{
424 return *this;
425}
427{
430 return *this;
431}
433{
436 return *this;
437}
439{
442 return *this;
443}
445{
448 return *this;
449}
451{
454 return *this;
455}
457{
460 return *this;
461}
463{
466 return *this;
467}
469{
472 return *this;
473}
475{
478 return *this;
479}
481{
484 return *this;
485}
487{
490 return *this;
491}
493{
496 return *this;
497}
499{
502 return *this;
503}
505{
508 return *this;
509}
511{
514 return *this;
515}
517{
520 return *this;
521}
523{
526 return *this;
527}
529{
532 return *this;
533}
535{
538 return *this;
539}
541{
544 return *this;
545}
547{
550 return *this;
551}
553{
556 return *this;
557}
559{
562 return *this;
563}
565{
568 return *this;
569}
571{
574 return *this;
575}
577{
580 return *this;
581}
583{
586 return *this;
587}
589{
592 return *this;
593}
595{
598 return *this;
599}
601{
604 return *this;
605}
607{
610 return *this;
611}
613{
616 return *this;
617}
619{
622 return *this;
623}
625{
628 return *this;
629}
631{
634 return *this;
635}
637{
640 return *this;
641}
643{
646 return *this;
647}
649{
652 return *this;
653}
655{
658 return *this;
659}
661{
664 return *this;
665}
667{
670 return *this;
671}
673{
676 return *this;
677}
679{
682 return *this;
683}
685{
688 return *this;
689}
691{
694 return *this;
695}
697{
700 return *this;
701}
703{
706 return *this;
707}
709{
712 return *this;
713}
715{
718 return *this;
719}
721{
724 return *this;
725}
727{
730 return *this;
731}
733{
736 return *this;
737}
739{
742 return *this;
743}
745{
748 return *this;
749}
751{
754 return *this;
755}
757{
760 return *this;
761}
763{
766 return *this;
767}
769{
772 return *this;
773}
775{
778 return *this;
779}
781{
784 return *this;
785}
787{
790 return *this;
791}
793{
795 power_f = power_funcp(e);
796 return *this;
797}
799{
801 power_f = power_funcp(e);
802 return *this;
803}
805{
807 power_f = power_funcp(e);
808 return *this;
809}
811{
813 power_f = power_funcp(e);
814 return *this;
815}
817{
819 power_f = power_funcp(e);
820 return *this;
821}
823{
825 power_f = power_funcp(e);
826 return *this;
827}
829{
831 power_f = power_funcp(e);
832 return *this;
833}
835{
837 power_f = power_funcp(e);
838 return *this;
839}
841{
843 power_f = power_funcp(e);
844 return *this;
845}
847{
849 power_f = power_funcp(e);
850 return *this;
851}
853{
855 power_f = power_funcp(e);
856 return *this;
857}
859{
861 power_f = power_funcp(e);
862 return *this;
863}
865{
867 power_f = power_funcp(e);
868 return *this;
869}
871{
873 power_f = power_funcp(e);
874 return *this;
875}
877{
880 return *this;
881}
883{
886 return *this;
887}
889{
892 return *this;
893}
895{
898 return *this;
899}
901{
904 return *this;
905}
907{
910 return *this;
911}
913{
916 return *this;
917}
919{
922 return *this;
923}
925{
928 return *this;
929}
931{
934 return *this;
935}
937{
940 return *this;
941}
943{
946 return *this;
947}
949{
952 return *this;
953}
955{
958 return *this;
959}
961{
963 info_f = info_funcp(e);
964 return *this;
965}
967{
969 info_f = info_funcp(e);
970 return *this;
971}
973{
975 info_f = info_funcp(e);
976 return *this;
977}
979{
981 info_f = info_funcp(e);
982 return *this;
983}
985{
987 info_f = info_funcp(e);
988 return *this;
989}
991{
993 info_f = info_funcp(e);
994 return *this;
995}
997{
999 info_f = info_funcp(e);
1000 return *this;
1001}
1003{
1005 info_f = info_funcp(e);
1006 return *this;
1007}
1009{
1011 info_f = info_funcp(e);
1012 return *this;
1013}
1015{
1017 info_f = info_funcp(e);
1018 return *this;
1019}
1021{
1023 info_f = info_funcp(e);
1024 return *this;
1025}
1027{
1029 info_f = info_funcp(e);
1030 return *this;
1031}
1033{
1035 info_f = info_funcp(e);
1036 return *this;
1037}
1039{
1041 info_f = info_funcp(e);
1042 return *this;
1043}
1044// end of generated lines
1045
1047{
1049 eval_f = eval_funcp(e);
1050 return *this;
1051}
1053{
1055 evalf_f = evalf_funcp(e);
1056 return *this;
1057}
1059{
1062 return *this;
1063}
1065{
1068 return *this;
1069}
1071{
1074 return *this;
1075}
1077{
1080 return *this;
1081}
1083{
1086 return *this;
1087}
1089{
1092 return *this;
1093}
1095{
1097 power_f = power_funcp(e);
1098 return *this;
1099}
1101{
1104 return *this;
1105}
1107{
1109 info_f = info_funcp(e);
1110 return *this;
1111}
1112
1113// end of generated lines
1114
1116{
1117 use_return_type = true;
1118 return_type = rt;
1119 if (rtt != nullptr)
1120 return_type_tinfo = *rtt;
1121 else
1122 return_type_tinfo = make_return_type_t<function>();
1123 return *this;
1124}
1125
1127{
1128 evalf_params_first = false;
1129 return *this;
1130}
1131
1133 unsigned assoc_size,
1134 unsigned strategy)
1135{
1136 use_remember = true;
1137 remember_size = size;
1138 remember_assoc_size = assoc_size;
1139 remember_strategy = strategy;
1140 return *this;
1141}
1142
1144{
1146 return *this;
1147}
1148
1150{
1151 symtree = s;
1152 return *this;
1153}
1154
1156{
1157 if (nparams==0) {
1158 nparams = n;
1159 } else if (nparams!=n) {
1160 // we do not throw an exception here because this code is
1161 // usually executed before main(), so the exception could not
1162 // be caught anyhow
1163 std::cerr << "WARNING: " << name << "(): number of parameters ("
1164 << n << ") differs from number set before ("
1165 << nparams << ")" << std::endl;
1166 }
1167}
1168
1170{
1171 if (id >= print_dispatch_table.size())
1172 print_dispatch_table.resize(id + 1);
1173 print_dispatch_table[id] = f;
1174}
1175
1177unsigned function::current_serial = 0;
1178
1179
1181
1182
1183// default constructor
1185
1186// public
1187
1188function::function() : serial(0)
1189{
1190}
1191
1193// other constructors
1195
1196// public
1197
1198function::function(unsigned ser) : serial(ser)
1199{
1200}
1201
1202// the following lines have been generated for max. 14 parameters
1203function::function(unsigned ser, const ex & param1)
1204 : exprseq{param1}, serial(ser)
1205{
1206}
1207function::function(unsigned ser, const ex & param1, const ex & param2)
1208 : exprseq{param1, param2}, serial(ser)
1209{
1210}
1211function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3)
1212 : exprseq{param1, param2, param3}, serial(ser)
1213{
1214}
1215function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4)
1216 : exprseq{param1, param2, param3, param4}, serial(ser)
1217{
1218}
1219function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5)
1220 : exprseq{param1, param2, param3, param4, param5}, serial(ser)
1221{
1222}
1223function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6)
1224 : exprseq{param1, param2, param3, param4, param5, param6}, serial(ser)
1225{
1226}
1227function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7)
1228 : exprseq{param1, param2, param3, param4, param5, param6, param7}, serial(ser)
1229{
1230}
1231function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8)
1232 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8}, serial(ser)
1233{
1234}
1235function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9)
1236 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9}, serial(ser)
1237{
1238}
1239function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9, const ex & param10)
1240 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9, param10}, serial(ser)
1241{
1242}
1243function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9, const ex & param10, const ex & param11)
1244 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11}, serial(ser)
1245{
1246}
1247function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9, const ex & param10, const ex & param11, const ex & param12)
1248 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12}, serial(ser)
1249{
1250}
1251function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9, const ex & param10, const ex & param11, const ex & param12, const ex & param13)
1252 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13}, serial(ser)
1253{
1254}
1255function::function(unsigned ser, const ex & param1, const ex & param2, const ex & param3, const ex & param4, const ex & param5, const ex & param6, const ex & param7, const ex & param8, const ex & param9, const ex & param10, const ex & param11, const ex & param12, const ex & param13, const ex & param14)
1256 : exprseq{param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14}, serial(ser)
1257{
1258}
1259
1260function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser)
1261{
1262
1263 // Force re-evaluation even if the exprseq was already evaluated
1264 // (the exprseq copy constructor copies the flags)
1266}
1267
1268function::function(unsigned ser, const exvector & v)
1269 : exprseq(v), serial(ser)
1270{
1271}
1272
1273function::function(unsigned ser, exvector && v)
1274 : exprseq(std::move(v)), serial(ser)
1275{
1276}
1277
1279// archiving
1281
1284{
1285 inherited::read_archive(n, sym_lst);
1286 // Find serial number by function name and number of parameters
1287 unsigned np = seq.size();
1288 std::string s;
1289 if (n.find_string("name", s)) {
1290 unsigned int ser = 0;
1291 for (auto & it : registered_functions()) {
1292 if (s == it.name && np == registered_functions()[ser].nparams) {
1293 serial = ser;
1294 return;
1295 }
1296 ++ser;
1297 }
1298 throw (std::runtime_error("unknown function '" + s +
1299 "' with " + std::to_string(np) + " parameters in archive"));
1300 } else
1301 throw (std::runtime_error("unnamed function in archive"));
1302}
1303
1306{
1307 inherited::archive(n);
1309 n.add_string("name", registered_functions()[serial].name);
1310}
1311
1313
1315// functions overriding virtual functions from base classes
1317
1318// public
1319
1320void function::print(const print_context & c, unsigned level) const
1321{
1324 const std::vector<print_funcp> &pdt = opt.print_dispatch_table;
1325
1326 // Dynamically dispatch on print_context type
1327 const print_context_class_info *pc_info = &c.get_class_info();
1328
1329next_context:
1330 unsigned id = pc_info->options.get_id();
1331 if (id >= pdt.size() || pdt[id] == nullptr) {
1332
1333 // Method not found, try parent print_context class
1334 const print_context_class_info *parent_pc_info = pc_info->get_parent();
1335 if (parent_pc_info) {
1336 pc_info = parent_pc_info;
1337 goto next_context;
1338 }
1339
1340 // Method still not found, use default output
1341 if (is_a<print_tree>(c)) {
1342
1343 c.s << std::string(level, ' ') << class_name() << " "
1344 << opt.name << " @" << this
1345 << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec
1346 << ", nops=" << nops()
1347 << std::endl;
1348 unsigned delta_indent = static_cast<const print_tree &>(c).delta_indent;
1349 for (size_t i=0; i<seq.size(); ++i)
1350 seq[i].print(c, level + delta_indent);
1351 c.s << std::string(level + delta_indent, ' ') << "=====" << std::endl;
1352
1353 } else if (is_a<print_csrc>(c)) {
1354
1355 // Print function name in lowercase
1356 std::string lname = opt.name;
1357 size_t num = lname.size();
1358 for (size_t i=0; i<num; i++)
1359 lname[i] = tolower(lname[i]);
1360 c.s << lname;
1361 printseq(c, '(', ',', ')', exprseq::precedence(), function::precedence());
1362
1363 } else if (is_a<print_latex>(c)) {
1364 c.s << opt.TeX_name;
1365 printseq(c, '(', ',', ')', exprseq::precedence(), function::precedence());
1366 } else {
1367 c.s << opt.name;
1368 printseq(c, '(', ',', ')', exprseq::precedence(), function::precedence());
1369 }
1370
1371 } else {
1372
1373 // Method found, call it
1376 ((print_funcp_exvector)pdt[id])(seq, c);
1377 else switch (opt.nparams) {
1378 // the following lines have been generated for max. 14 parameters
1379 case 1:
1380 ((print_funcp_1)(pdt[id]))(seq[0], c);
1381 break;
1382 case 2:
1383 ((print_funcp_2)(pdt[id]))(seq[0], seq[1], c);
1384 break;
1385 case 3:
1386 ((print_funcp_3)(pdt[id]))(seq[0], seq[1], seq[2], c);
1387 break;
1388 case 4:
1389 ((print_funcp_4)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], c);
1390 break;
1391 case 5:
1392 ((print_funcp_5)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], c);
1393 break;
1394 case 6:
1395 ((print_funcp_6)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], c);
1396 break;
1397 case 7:
1398 ((print_funcp_7)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], c);
1399 break;
1400 case 8:
1401 ((print_funcp_8)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], c);
1402 break;
1403 case 9:
1404 ((print_funcp_9)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], c);
1405 break;
1406 case 10:
1407 ((print_funcp_10)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], c);
1408 break;
1409 case 11:
1410 ((print_funcp_11)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], c);
1411 break;
1412 case 12:
1413 ((print_funcp_12)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], c);
1414 break;
1415 case 13:
1416 ((print_funcp_13)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], c);
1417 break;
1418 case 14:
1419 ((print_funcp_14)(pdt[id]))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], c);
1420 break;
1421 // end of generated lines
1422 default:
1423 throw(std::logic_error("function::print(): invalid nparams"));
1424 }
1425 }
1426}
1427
1429{
1431 return *this;
1432 }
1433
1436
1437 // Canonicalize argument order according to the symmetry properties
1438 if (seq.size() > 1 && !(opt.symtree.is_zero())) {
1439 exvector v = seq;
1440 GINAC_ASSERT(is_a<symmetry>(opt.symtree));
1441 int sig = canonicalize(v.begin(), ex_to<symmetry>(opt.symtree));
1442 if (sig != std::numeric_limits<int>::max()) {
1443 // Something has changed while sorting arguments, more evaluations later
1444 if (sig == 0)
1445 return _ex0;
1446 return ex(sig) * thiscontainer(std::move(v));
1447 }
1448 }
1449
1450 if (opt.eval_f==nullptr) {
1451 return this->hold();
1452 }
1453
1454 bool use_remember = opt.use_remember;
1455 ex eval_result;
1456 if (use_remember && lookup_remember_table(eval_result)) {
1457 return eval_result;
1458 }
1460 if (opt.eval_use_exvector_args)
1461 eval_result = ((eval_funcp_exvector)(opt.eval_f))(seq);
1462 else
1463 switch (opt.nparams) {
1464 // the following lines have been generated for max. 14 parameters
1465 case 1:
1466 eval_result = ((eval_funcp_1)(opt.eval_f))(seq[0]);
1467 break;
1468 case 2:
1469 eval_result = ((eval_funcp_2)(opt.eval_f))(seq[0], seq[1]);
1470 break;
1471 case 3:
1472 eval_result = ((eval_funcp_3)(opt.eval_f))(seq[0], seq[1], seq[2]);
1473 break;
1474 case 4:
1475 eval_result = ((eval_funcp_4)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3]);
1476 break;
1477 case 5:
1478 eval_result = ((eval_funcp_5)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4]);
1479 break;
1480 case 6:
1481 eval_result = ((eval_funcp_6)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5]);
1482 break;
1483 case 7:
1484 eval_result = ((eval_funcp_7)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6]);
1485 break;
1486 case 8:
1487 eval_result = ((eval_funcp_8)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7]);
1488 break;
1489 case 9:
1490 eval_result = ((eval_funcp_9)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8]);
1491 break;
1492 case 10:
1493 eval_result = ((eval_funcp_10)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9]);
1494 break;
1495 case 11:
1496 eval_result = ((eval_funcp_11)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10]);
1497 break;
1498 case 12:
1499 eval_result = ((eval_funcp_12)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11]);
1500 break;
1501 case 13:
1502 eval_result = ((eval_funcp_13)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12]);
1503 break;
1504 case 14:
1505 eval_result = ((eval_funcp_14)(opt.eval_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13]);
1506 break;
1507 // end of generated lines
1508 default:
1509 throw(std::logic_error("function::eval(): invalid nparams"));
1510 }
1511 if (use_remember) {
1512 store_remember_table(eval_result);
1513 }
1514 return eval_result;
1515}
1516
1518{
1521
1522 // Evaluate children first
1523 exvector eseq;
1524 if (!opt.evalf_params_first)
1525 eseq = seq;
1526 else {
1527 eseq.reserve(seq.size());
1528 for (auto & it : seq) {
1529 eseq.push_back(it.evalf());
1530 }
1531 }
1532
1533 if (opt.evalf_f==nullptr) {
1534 return function(serial,eseq).hold();
1535 }
1538 return ((evalf_funcp_exvector)(opt.evalf_f))(eseq);
1539 switch (opt.nparams) {
1540 // the following lines have been generated for max. 14 parameters
1541 case 1:
1542 return ((evalf_funcp_1)(opt.evalf_f))(eseq[0]);
1543 case 2:
1544 return ((evalf_funcp_2)(opt.evalf_f))(eseq[0], eseq[1]);
1545 case 3:
1546 return ((evalf_funcp_3)(opt.evalf_f))(eseq[0], eseq[1], eseq[2]);
1547 case 4:
1548 return ((evalf_funcp_4)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3]);
1549 case 5:
1550 return ((evalf_funcp_5)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4]);
1551 case 6:
1552 return ((evalf_funcp_6)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5]);
1553 case 7:
1554 return ((evalf_funcp_7)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6]);
1555 case 8:
1556 return ((evalf_funcp_8)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7]);
1557 case 9:
1558 return ((evalf_funcp_9)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8]);
1559 case 10:
1560 return ((evalf_funcp_10)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8], eseq[9]);
1561 case 11:
1562 return ((evalf_funcp_11)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8], eseq[9], eseq[10]);
1563 case 12:
1564 return ((evalf_funcp_12)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8], eseq[9], eseq[10], eseq[11]);
1565 case 13:
1566 return ((evalf_funcp_13)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8], eseq[9], eseq[10], eseq[11], eseq[12]);
1567 case 14:
1568 return ((evalf_funcp_14)(opt.evalf_f))(eseq[0], eseq[1], eseq[2], eseq[3], eseq[4], eseq[5], eseq[6], eseq[7], eseq[8], eseq[9], eseq[10], eseq[11], eseq[12], eseq[13]);
1569 // end of generated lines
1570 }
1571 throw(std::logic_error("function::evalf(): invalid nparams"));
1572}
1573
1578{
1579 // If this function is called then the list of arguments is non-empty
1580 // and the first argument is non-commutative, see function::return_type()
1581 return seq.begin()->eval_ncmul(v);
1582}
1583
1584unsigned function::calchash() const
1585{
1586 unsigned v = golden_ratio_hash(make_hash_seed(typeid(*this)) ^ serial);
1587 for (size_t i=0; i<nops(); i++) {
1588 v = rotate_left(v);
1589 v ^= this->op(i).gethash();
1590 }
1591
1594 hashvalue = v;
1595 }
1596 return v;
1597}
1598
1600{
1601 return function(serial, v);
1602}
1603
1605{
1606 return function(serial, std::move(v));
1607}
1608
1611ex function::series(const relational & r, int order, unsigned options) const
1612{
1615
1616 if (opt.series_f==nullptr) {
1617 return basic::series(r, order);
1618 }
1619 ex res;
1621 if (opt.series_use_exvector_args) {
1622 try {
1623 res = ((series_funcp_exvector)(opt.series_f))(seq, r, order, options);
1624 } catch (do_taylor) {
1625 res = basic::series(r, order, options);
1626 }
1627 return res;
1628 }
1629 switch (opt.nparams) {
1630 // the following lines have been generated for max. 14 parameters
1631 case 1:
1632 try {
1633 res = ((series_funcp_1)(opt.series_f))(seq[0], r, order, options);
1634 } catch (do_taylor) {
1635 res = basic::series(r, order, options);
1636 }
1637 return res;
1638 case 2:
1639 try {
1640 res = ((series_funcp_2)(opt.series_f))(seq[0], seq[1], r, order, options);
1641 } catch (do_taylor) {
1642 res = basic::series(r, order, options);
1643 }
1644 return res;
1645 case 3:
1646 try {
1647 res = ((series_funcp_3)(opt.series_f))(seq[0], seq[1], seq[2], r, order, options);
1648 } catch (do_taylor) {
1649 res = basic::series(r, order, options);
1650 }
1651 return res;
1652 case 4:
1653 try {
1654 res = ((series_funcp_4)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], r, order, options);
1655 } catch (do_taylor) {
1656 res = basic::series(r, order, options);
1657 }
1658 return res;
1659 case 5:
1660 try {
1661 res = ((series_funcp_5)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], r, order, options);
1662 } catch (do_taylor) {
1663 res = basic::series(r, order, options);
1664 }
1665 return res;
1666 case 6:
1667 try {
1668 res = ((series_funcp_6)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], r, order, options);
1669 } catch (do_taylor) {
1670 res = basic::series(r, order, options);
1671 }
1672 return res;
1673 case 7:
1674 try {
1675 res = ((series_funcp_7)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], r, order, options);
1676 } catch (do_taylor) {
1677 res = basic::series(r, order, options);
1678 }
1679 return res;
1680 case 8:
1681 try {
1682 res = ((series_funcp_8)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], r, order, options);
1683 } catch (do_taylor) {
1684 res = basic::series(r, order, options);
1685 }
1686 return res;
1687 case 9:
1688 try {
1689 res = ((series_funcp_9)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], r, order, options);
1690 } catch (do_taylor) {
1691 res = basic::series(r, order, options);
1692 }
1693 return res;
1694 case 10:
1695 try {
1696 res = ((series_funcp_10)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], r, order, options);
1697 } catch (do_taylor) {
1698 res = basic::series(r, order, options);
1699 }
1700 return res;
1701 case 11:
1702 try {
1703 res = ((series_funcp_11)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], r, order, options);
1704 } catch (do_taylor) {
1705 res = basic::series(r, order, options);
1706 }
1707 return res;
1708 case 12:
1709 try {
1710 res = ((series_funcp_12)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], r, order, options);
1711 } catch (do_taylor) {
1712 res = basic::series(r, order, options);
1713 }
1714 return res;
1715 case 13:
1716 try {
1717 res = ((series_funcp_13)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], r, order, options);
1718 } catch (do_taylor) {
1719 res = basic::series(r, order, options);
1720 }
1721 return res;
1722 case 14:
1723 try {
1724 res = ((series_funcp_14)(opt.series_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], r, order, options);
1725 } catch (do_taylor) {
1726 res = basic::series(r, order, options);
1727 }
1728 return res;
1729 // end of generated lines
1730 }
1731 throw(std::logic_error("function::series(): invalid nparams"));
1732}
1733
1736{
1739
1740 if (opt.conjugate_f==nullptr) {
1741 return conjugate_function(*this).hold();
1742 }
1743
1745 return ((conjugate_funcp_exvector)(opt.conjugate_f))(seq);
1746 }
1747
1748 switch (opt.nparams) {
1749 // the following lines have been generated for max. 14 parameters
1750 case 1:
1751 return ((conjugate_funcp_1)(opt.conjugate_f))(seq[0]);
1752 case 2:
1753 return ((conjugate_funcp_2)(opt.conjugate_f))(seq[0], seq[1]);
1754 case 3:
1755 return ((conjugate_funcp_3)(opt.conjugate_f))(seq[0], seq[1], seq[2]);
1756 case 4:
1757 return ((conjugate_funcp_4)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3]);
1758 case 5:
1759 return ((conjugate_funcp_5)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4]);
1760 case 6:
1761 return ((conjugate_funcp_6)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5]);
1762 case 7:
1763 return ((conjugate_funcp_7)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6]);
1764 case 8:
1765 return ((conjugate_funcp_8)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7]);
1766 case 9:
1767 return ((conjugate_funcp_9)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8]);
1768 case 10:
1769 return ((conjugate_funcp_10)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9]);
1770 case 11:
1771 return ((conjugate_funcp_11)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10]);
1772 case 12:
1773 return ((conjugate_funcp_12)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11]);
1774 case 13:
1775 return ((conjugate_funcp_13)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12]);
1776 case 14:
1777 return ((conjugate_funcp_14)(opt.conjugate_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13]);
1778 // end of generated lines
1779 }
1780 throw(std::logic_error("function::conjugate(): invalid nparams"));
1781}
1782
1785{
1788
1789 if (opt.real_part_f==nullptr)
1790 return basic::real_part();
1791
1793 return ((real_part_funcp_exvector)(opt.real_part_f))(seq);
1794
1795 switch (opt.nparams) {
1796 // the following lines have been generated for max. 14 parameters
1797 case 1:
1798 return ((real_part_funcp_1)(opt.real_part_f))(seq[0]);
1799 case 2:
1800 return ((real_part_funcp_2)(opt.real_part_f))(seq[0], seq[1]);
1801 case 3:
1802 return ((real_part_funcp_3)(opt.real_part_f))(seq[0], seq[1], seq[2]);
1803 case 4:
1804 return ((real_part_funcp_4)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3]);
1805 case 5:
1806 return ((real_part_funcp_5)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4]);
1807 case 6:
1808 return ((real_part_funcp_6)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5]);
1809 case 7:
1810 return ((real_part_funcp_7)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6]);
1811 case 8:
1812 return ((real_part_funcp_8)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7]);
1813 case 9:
1814 return ((real_part_funcp_9)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8]);
1815 case 10:
1816 return ((real_part_funcp_10)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9]);
1817 case 11:
1818 return ((real_part_funcp_11)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10]);
1819 case 12:
1820 return ((real_part_funcp_12)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11]);
1821 case 13:
1822 return ((real_part_funcp_13)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12]);
1823 case 14:
1824 return ((real_part_funcp_14)(opt.real_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13]);
1825 // end of generated lines
1826 }
1827 throw(std::logic_error("function::real_part(): invalid nparams"));
1828}
1829
1832{
1835
1836 if (opt.imag_part_f==nullptr)
1837 return basic::imag_part();
1838
1840 return ((imag_part_funcp_exvector)(opt.imag_part_f))(seq);
1841
1842 switch (opt.nparams) {
1843 // the following lines have been generated for max. 14 parameters
1844 case 1:
1845 return ((imag_part_funcp_1)(opt.imag_part_f))(seq[0]);
1846 case 2:
1847 return ((imag_part_funcp_2)(opt.imag_part_f))(seq[0], seq[1]);
1848 case 3:
1849 return ((imag_part_funcp_3)(opt.imag_part_f))(seq[0], seq[1], seq[2]);
1850 case 4:
1851 return ((imag_part_funcp_4)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3]);
1852 case 5:
1853 return ((imag_part_funcp_5)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4]);
1854 case 6:
1855 return ((imag_part_funcp_6)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5]);
1856 case 7:
1857 return ((imag_part_funcp_7)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6]);
1858 case 8:
1859 return ((imag_part_funcp_8)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7]);
1860 case 9:
1861 return ((imag_part_funcp_9)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8]);
1862 case 10:
1863 return ((imag_part_funcp_10)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9]);
1864 case 11:
1865 return ((imag_part_funcp_11)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10]);
1866 case 12:
1867 return ((imag_part_funcp_12)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11]);
1868 case 13:
1869 return ((imag_part_funcp_13)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12]);
1870 case 14:
1871 return ((imag_part_funcp_14)(opt.imag_part_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13]);
1872 // end of generated lines
1873 }
1874 throw(std::logic_error("function::imag_part(): invalid nparams"));
1875}
1876
1878bool function::info(unsigned inf) const
1879{
1882
1883 if (opt.info_f==nullptr) {
1884 return basic::info(inf);
1885 }
1886
1887 if (opt.info_use_exvector_args) {
1888 return ((info_funcp_exvector)(opt.info_f))(seq, inf);
1889 }
1890
1891 switch (opt.nparams) {
1892 // the following lines have been generated for max. 14 parameters
1893 case 1:
1894 return ((info_funcp_1)(opt.info_f))(seq[0], inf);
1895 case 2:
1896 return ((info_funcp_2)(opt.info_f))(seq[0], seq[1], inf);
1897 case 3:
1898 return ((info_funcp_3)(opt.info_f))(seq[0], seq[1], seq[2], inf);
1899 case 4:
1900 return ((info_funcp_4)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], inf);
1901 case 5:
1902 return ((info_funcp_5)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], inf);
1903 case 6:
1904 return ((info_funcp_6)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], inf);
1905 case 7:
1906 return ((info_funcp_7)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], inf);
1907 case 8:
1908 return ((info_funcp_8)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], inf);
1909 case 9:
1910 return ((info_funcp_9)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], inf);
1911 case 10:
1912 return ((info_funcp_10)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], inf);
1913 case 11:
1914 return ((info_funcp_11)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], inf);
1915 case 12:
1916 return ((info_funcp_12)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], inf);
1917 case 13:
1918 return ((info_funcp_13)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], inf);
1919 case 14:
1920 return ((info_funcp_14)(opt.info_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], inf);
1921 // end of generated lines
1922 }
1923 throw(std::logic_error("function::info(): invalid nparams"));
1924}
1925
1926// protected
1927
1932{
1933 ex result;
1934
1935 try {
1936 // Explicit derivation
1937 result = expl_derivative(s);
1938 } catch (...) {
1939 // Chain rule
1940 ex arg_diff;
1941 size_t num = seq.size();
1942 for (size_t i=0; i<num; i++) {
1943 arg_diff = seq[i].diff(s);
1944 // We apply the chain rule only when it makes sense. This is not
1945 // just for performance reasons but also to allow functions to
1946 // throw when differentiated with respect to one of its arguments
1947 // without running into trouble with our automatic full
1948 // differentiation:
1949 if (!arg_diff.is_zero())
1950 result += pderivative(i)*arg_diff;
1951 }
1952 }
1953 return result;
1954}
1955
1956int function::compare_same_type(const basic & other) const
1957{
1958 GINAC_ASSERT(is_a<function>(other));
1959 const function & o = static_cast<const function &>(other);
1960
1961 if (serial != o.serial)
1962 return serial < o.serial ? -1 : 1;
1963 else
1965}
1966
1967bool function::is_equal_same_type(const basic & other) const
1968{
1969 GINAC_ASSERT(is_a<function>(other));
1970 const function & o = static_cast<const function &>(other);
1971
1972 if (serial != o.serial)
1973 return false;
1974 else
1976}
1977
1978bool function::match_same_type(const basic & other) const
1979{
1980 GINAC_ASSERT(is_a<function>(other));
1981 const function & o = static_cast<const function &>(other);
1982
1983 return serial == o.serial;
1984}
1985
1987{
1990
1991 if (opt.use_return_type) {
1992 // Return type was explicitly specified
1993 return opt.return_type;
1994 } else {
1995 // Default behavior is to use the return type of the first
1996 // argument. Thus, exp() of a matrix behaves like a matrix, etc.
1997 if (seq.empty())
1999 else
2000 return seq.begin()->return_type();
2001 }
2002}
2003
2005{
2008
2009 if (opt.use_return_type) {
2010 // Return type was explicitly specified
2011 return opt.return_type_tinfo;
2012 } else {
2013 // Default behavior is to use the return type of the first
2014 // argument. Thus, exp() of a matrix behaves like a matrix, etc.
2015 if (seq.empty())
2016 return make_return_type_t<function>();
2017 else
2018 return seq.begin()->return_type_tinfo();
2019 }
2020}
2021
2023// new virtual functions which can be overridden by derived classes
2025
2026// none
2027
2029// non-virtual functions in this class
2031
2032// protected
2033
2034ex function::pderivative(unsigned diff_param) const // partial differentiation
2035{
2036 GINAC_ASSERT(serial<registered_functions().size());
2037 const function_options &opt = registered_functions()[serial];
2038
2039 if (opt.derivative_f) {
2040 // Invoke the defined derivative function.
2041 current_serial = serial;
2043 return ((derivative_funcp_exvector)(opt.derivative_f))(seq, diff_param);
2044 switch (opt.nparams) {
2045 // the following lines have been generated for max. 14 parameters
2046 case 1:
2047 return ((derivative_funcp_1)(opt.derivative_f))(seq[0], diff_param);
2048 case 2:
2049 return ((derivative_funcp_2)(opt.derivative_f))(seq[0], seq[1], diff_param);
2050 case 3:
2051 return ((derivative_funcp_3)(opt.derivative_f))(seq[0], seq[1], seq[2], diff_param);
2052 case 4:
2053 return ((derivative_funcp_4)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], diff_param);
2054 case 5:
2055 return ((derivative_funcp_5)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], diff_param);
2056 case 6:
2057 return ((derivative_funcp_6)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], diff_param);
2058 case 7:
2059 return ((derivative_funcp_7)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], diff_param);
2060 case 8:
2061 return ((derivative_funcp_8)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], diff_param);
2062 case 9:
2063 return ((derivative_funcp_9)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], diff_param);
2064 case 10:
2065 return ((derivative_funcp_10)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], diff_param);
2066 case 11:
2067 return ((derivative_funcp_11)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], diff_param);
2068 case 12:
2069 return ((derivative_funcp_12)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], diff_param);
2070 case 13:
2071 return ((derivative_funcp_13)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], diff_param);
2072 case 14:
2073 return ((derivative_funcp_14)(opt.derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], diff_param);
2074 // end of generated lines
2075 }
2076 }
2077 // No derivative defined? Fall back to abstract derivative object.
2078 return fderivative(serial, diff_param, seq);
2079}
2080
2081ex function::expl_derivative(const symbol & s) const // explicit differentiation
2082{
2083 GINAC_ASSERT(serial<registered_functions().size());
2084 const function_options &opt = registered_functions()[serial];
2085
2086 if (opt.expl_derivative_f) {
2087 // Invoke the defined explicit derivative function.
2088 current_serial = serial;
2090 return ((expl_derivative_funcp_exvector)(opt.expl_derivative_f))(seq, s);
2091 switch (opt.nparams) {
2092 // the following lines have been generated for max. 14 parameters
2093 case 1:
2094 return ((expl_derivative_funcp_1)(opt.expl_derivative_f))(seq[0], s);
2095 case 2:
2096 return ((expl_derivative_funcp_2)(opt.expl_derivative_f))(seq[0], seq[1], s);
2097 case 3:
2098 return ((expl_derivative_funcp_3)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], s);
2099 case 4:
2100 return ((expl_derivative_funcp_4)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], s);
2101 case 5:
2102 return ((expl_derivative_funcp_5)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], s);
2103 case 6:
2104 return ((expl_derivative_funcp_6)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], s);
2105 case 7:
2106 return ((expl_derivative_funcp_7)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], s);
2107 case 8:
2108 return ((expl_derivative_funcp_8)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], s);
2109 case 9:
2110 return ((expl_derivative_funcp_9)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], s);
2111 case 10:
2112 return ((expl_derivative_funcp_10)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], s);
2113 case 11:
2114 return ((expl_derivative_funcp_11)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], s);
2115 case 12:
2116 return ((expl_derivative_funcp_12)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], s);
2117 case 13:
2118 return ((expl_derivative_funcp_13)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], s);
2119 case 14:
2120 return ((expl_derivative_funcp_14)(opt.expl_derivative_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], s);
2121 // end of generated lines
2122 }
2123 }
2124 // There is no fallback for explicit derivative.
2125 throw(std::logic_error("function::expl_derivative(): explicit derivation is called, but no such function defined"));
2126}
2127
2128ex function::power(const ex & power_param) const // power of function
2129{
2130 GINAC_ASSERT(serial<registered_functions().size());
2131 const function_options &opt = registered_functions()[serial];
2132
2133 if (opt.power_f) {
2134 // Invoke the defined power function.
2135 current_serial = serial;
2137 return ((power_funcp_exvector)(opt.power_f))(seq, power_param);
2138 switch (opt.nparams) {
2139 // the following lines have been generated for max. 14 parameters
2140 case 1:
2141 return ((power_funcp_1)(opt.power_f))(seq[0], power_param);
2142 case 2:
2143 return ((power_funcp_2)(opt.power_f))(seq[0], seq[1], power_param);
2144 case 3:
2145 return ((power_funcp_3)(opt.power_f))(seq[0], seq[1], seq[2], power_param);
2146 case 4:
2147 return ((power_funcp_4)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], power_param);
2148 case 5:
2149 return ((power_funcp_5)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], power_param);
2150 case 6:
2151 return ((power_funcp_6)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], power_param);
2152 case 7:
2153 return ((power_funcp_7)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], power_param);
2154 case 8:
2155 return ((power_funcp_8)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], power_param);
2156 case 9:
2157 return ((power_funcp_9)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], power_param);
2158 case 10:
2159 return ((power_funcp_10)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], power_param);
2160 case 11:
2161 return ((power_funcp_11)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], power_param);
2162 case 12:
2163 return ((power_funcp_12)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], power_param);
2164 case 13:
2165 return ((power_funcp_13)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], power_param);
2166 case 14:
2167 return ((power_funcp_14)(opt.power_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], power_param);
2168 // end of generated lines
2169 }
2170 }
2171 // No power function defined? Fall back to returning a power object.
2172 return dynallocate<GiNaC::power>(*this, power_param).setflag(status_flags::evaluated);
2173}
2174
2176{
2179
2180 if (opt.expand_f) {
2181 // Invoke the defined expand function.
2184 return ((expand_funcp_exvector)(opt.expand_f))(seq, options);
2185 switch (opt.nparams) {
2186 // the following lines have been generated for max. 14 parameters
2187 case 1:
2188 return ((expand_funcp_1)(opt.expand_f))(seq[0], options);
2189 case 2:
2190 return ((expand_funcp_2)(opt.expand_f))(seq[0], seq[1], options);
2191 case 3:
2192 return ((expand_funcp_3)(opt.expand_f))(seq[0], seq[1], seq[2], options);
2193 case 4:
2194 return ((expand_funcp_4)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], options);
2195 case 5:
2196 return ((expand_funcp_5)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], options);
2197 case 6:
2198 return ((expand_funcp_6)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], options);
2199 case 7:
2200 return ((expand_funcp_7)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], options);
2201 case 8:
2202 return ((expand_funcp_8)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], options);
2203 case 9:
2204 return ((expand_funcp_9)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], options);
2205 case 10:
2206 return ((expand_funcp_10)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], options);
2207 case 11:
2208 return ((expand_funcp_11)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], options);
2209 case 12:
2210 return ((expand_funcp_12)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], options);
2211 case 13:
2212 return ((expand_funcp_13)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], options);
2213 case 14:
2214 return ((expand_funcp_14)(opt.expand_f))(seq[0], seq[1], seq[2], seq[3], seq[4], seq[5], seq[6], seq[7], seq[8], seq[9], seq[10], seq[11], seq[12], seq[13], options);
2215 // end of generated lines
2216 }
2217 }
2218 // No expand function defined? Return the same function with expanded arguments (if required)
2220 return inherited::expand(options);
2221 else
2222 return (options == 0) ? setflag(status_flags::expanded) : *this;
2223}
2224
2225std::vector<function_options> & function::registered_functions()
2226{
2227 static std::vector<function_options> rf = std::vector<function_options>();
2228 return rf;
2229}
2230
2232{
2233 return remember_table::remember_tables()[this->serial].lookup_entry(*this,result);
2234}
2235
2236void function::store_remember_table(ex const & result) const
2237{
2238 remember_table::remember_tables()[this->serial].add_entry(*this,result);
2239}
2240
2241// public
2242
2244{
2245 size_t same_name = 0;
2246 for (auto & i : registered_functions()) {
2247 if (i.name==opt.name) {
2248 ++same_name;
2249 }
2250 }
2251 if (same_name>=opt.functions_with_same_name) {
2252 // we do not throw an exception here because this code is
2253 // usually executed before main(), so the exception could not
2254 // caught anyhow
2255 std::cerr << "WARNING: function name " << opt.name
2256 << " already in use!" << std::endl;
2257 }
2258 registered_functions().push_back(opt);
2259 if (opt.use_remember) {
2261 push_back(remember_table(opt.remember_size,
2263 opt.remember_strategy));
2264 } else {
2266 }
2267 return registered_functions().size()-1;
2268}
2269
2272unsigned function::find_function(const std::string &name, unsigned nparams)
2273{
2274 unsigned serial = 0;
2275 for (auto & it : function::registered_functions()) {
2276 if (it.get_name() == name && it.get_nparams() == nparams)
2277 return serial;
2278 ++serial;
2279 }
2280 throw (std::runtime_error("no function '" + name + "' with " + std::to_string(nparams) + " parameters defined"));
2281}
2282
2284std::string function::get_name() const
2285{
2287 return registered_functions()[serial].name;
2288}
2289
2290} // namespace GiNaC
2291
Archiving of GiNaC expressions.
#define GINAC_ASSERT(X)
Assertion macro for checking invariances.
Definition: assertion.h:33
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
Definition: archive.h:49
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
Definition: basic.h:105
const basic & clearflag(unsigned f) const
Clear some status_flags.
Definition: basic.h:291
virtual ex imag_part() const
Definition: basic.cpp:681
const basic & setflag(unsigned f) const
Set some status_flags.
Definition: basic.h:288
virtual bool info(unsigned inf) const
Information about the object.
Definition: basic.cpp:222
unsigned hashvalue
hash value
Definition: basic.h:303
friend class ex
Definition: basic.h:108
unsigned flags
of type status_flags
Definition: basic.h:302
const basic & hold() const
Stop further evaluation.
Definition: basic.cpp:887
virtual ex series(const relational &r, int order, unsigned options=0) const
Default implementation of ex::series().
Definition: pseries.cpp:611
virtual ex real_part() const
Definition: basic.cpp:676
virtual int compare_same_type(const basic &other) const
Returns order relation between two objects of same type.
Definition: basic.cpp:719
class_info * get_parent() const
Get pointer to class_info of parent class (or nullptr).
Definition: class_info.h:50
Wrapper template for making GiNaC classes out of STL containers.
Definition: container.h:73
bool is_equal_same_type(const basic &other) const override
Returns true if two objects of same type are equal.
Definition: container.h:362
virtual void printseq(const print_context &c, char openbracket, char delim, char closebracket, unsigned this_precedence, unsigned upper_precedence=0) const
Print sequence of contained elements.
Definition: container.h:451
size_t nops() const override
Number of operands/members.
Definition: container.h:118
ex op(size_t i) const override
Return operand/member at position i.
Definition: container.h:295
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
Definition: container.h:117
Exception class thrown by classes which provide their own series expansion to signal that ordinary Ta...
Definition: function.h:668
Lightweight wrapper for GiNaC's symbolic objects.
Definition: ex.h:72
unsigned gethash() const
Definition: ex.h:233
bool is_zero() const
Definition: ex.h:213
@ expand_function_args
expands the arguments of functions
Definition: flags.h:33
This class represents the (abstract) derivative of a symbolic function.
Definition: fderivative.h:38
function_options & info_func(info_funcp_1 e)
Definition: function.cpp:960
function_options & overloaded(unsigned o)
Definition: function.cpp:1143
bool real_part_use_exvector_args
Definition: function.h:650
function_options & set_name(std::string const &n, std::string const &tn=std::string())
Definition: function.cpp:102
function_options & set_symmetry(const symmetry &s)
Definition: function.cpp:1149
expl_derivative_funcp expl_derivative_f
Definition: function.h:630
bool conjugate_use_exvector_args
Definition: function.h:649
std::vector< print_funcp > print_dispatch_table
Definition: function.h:633
unsigned functions_with_same_name
Definition: function.h:660
conjugate_funcp conjugate_f
Definition: function.h:625
function_options & set_return_type(unsigned rt, const return_type_t *rtt=nullptr)
Definition: function.cpp:1115
function_options & remember(unsigned size, unsigned assoc_size=0, unsigned strategy=remember_strategies::delete_never)
Definition: function.cpp:1132
function_options & eval_func(eval_funcp_1 e)
Definition: function.cpp:120
function_options & power_func(power_funcp_1 e)
Definition: function.cpp:792
unsigned remember_assoc_size
Definition: function.h:644
function_options & evalf_func(evalf_funcp_1 e)
Definition: function.cpp:204
function_options & conjugate_func(conjugate_funcp_1 e)
Definition: function.cpp:288
function_options & real_part_func(real_part_funcp_1 e)
Definition: function.cpp:372
return_type_t return_type_tinfo
Definition: function.h:640
void test_and_set_nparams(unsigned n)
Definition: function.cpp:1155
bool derivative_use_exvector_args
Definition: function.h:653
imag_part_funcp imag_part_f
Definition: function.h:627
power_funcp power_f
Definition: function.h:631
unsigned remember_strategy
Definition: function.h:645
void set_print_func(unsigned id, print_funcp f)
Definition: function.cpp:1169
std::string TeX_name
Definition: function.h:619
bool imag_part_use_exvector_args
Definition: function.h:651
real_part_funcp real_part_f
Definition: function.h:626
function_options & expand_func(expand_funcp_1 e)
Definition: function.cpp:540
series_funcp series_f
Definition: function.h:632
function_options & expl_derivative_func(expl_derivative_funcp_1 e)
Definition: function.cpp:708
function_options & do_not_evalf_params()
Definition: function.cpp:1126
bool expl_derivative_use_exvector_args
Definition: function.h:654
function_options & latex_name(std::string const &tn)
Definition: function.cpp:113
derivative_funcp derivative_f
Definition: function.h:629
function_options & series_func(series_funcp_1 e)
Definition: function.cpp:876
function_options & imag_part_func(imag_part_funcp_1 e)
Definition: function.cpp:456
evalf_funcp evalf_f
Definition: function.h:624
expand_funcp expand_f
Definition: function.h:628
function_options & derivative_func(derivative_funcp_1 e)
Definition: function.cpp:624
The class function is used to implement builtin functions like sin, cos... and user defined functions...
Definition: function.h:674
bool match_same_type(const basic &other) const override
Returns true if the attributes of two objects are similar enough for a match.
Definition: function.cpp:1978
unsigned calchash() const override
Compute the hash value of an object and if it makes sense to store it in the objects status_flags,...
Definition: function.cpp:1584
return_type_t return_type_tinfo() const override
Definition: function.cpp:2004
void store_remember_table(ex const &result) const
Definition: function.cpp:2236
ex imag_part() const override
Implementation of ex::imag_part for functions.
Definition: function.cpp:1831
ex evalf() const override
Evaluate object numerically.
Definition: function.cpp:1517
ex eval_ncmul(const exvector &v) const override
This method is defined to be in line with behavior of function::return_type()
Definition: function.cpp:1577
ex power(const ex &exp) const
Definition: function.cpp:2128
ex derivative(const symbol &s) const override
Implementation of ex::diff() for functions.
Definition: function.cpp:1931
ex thiscontainer(const exvector &v) const override
Definition: function.cpp:1599
bool is_equal_same_type(const basic &other) const override
Returns true if two objects of same type are equal.
Definition: function.cpp:1967
bool info(unsigned inf) const override
Implementation of ex::info for functions.
Definition: function.cpp:1878
std::string get_name() const
Return the print name of the function.
Definition: function.cpp:2284
static unsigned register_new(function_options const &opt)
Definition: function.cpp:2243
unsigned serial
Definition: function.h:751
bool lookup_remember_table(ex &result) const
Definition: function.cpp:2231
static unsigned find_function(const std::string &name, unsigned nparams)
Find serial number of function by name and number of parameters.
Definition: function.cpp:2272
ex series(const relational &r, int order, unsigned options=0) const override
Implementation of ex::series for functions.
Definition: function.cpp:1611
static std::vector< function_options > & registered_functions()
Definition: function.cpp:2225
ex eval() const override
Perform automatic non-interruptive term rewriting rules.
Definition: function.cpp:1428
ex real_part() const override
Implementation of ex::real_part for functions.
Definition: function.cpp:1784
static unsigned current_serial
This can be used as a hook for external applications.
Definition: function.h:742
ex conjugate() const override
Implementation of ex::conjugate for functions.
Definition: function.cpp:1735
ex expl_derivative(const symbol &s) const
Definition: function.cpp:2081
void print(const print_context &c, unsigned level=0) const override
Output to stream.
Definition: function.cpp:1320
void read_archive(const archive_node &n, lst &syms) override
Construct object from archive_node.
Definition: function.cpp:1283
ex expand(unsigned options=0) const override
Expand expression, i.e.
Definition: function.cpp:2175
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
Definition: function.h:707
unsigned return_type() const override
Definition: function.cpp:1986
function(unsigned ser)
Definition: function.cpp:1198
void archive(archive_node &n) const override
Archive the object.
Definition: function.cpp:1305
ex pderivative(unsigned diff_param) const
Definition: function.cpp:2034
Base class for print_contexts.
Definition: print.h:103
Context for tree-like output for debugging.
Definition: print.h:147
This class holds a relation consisting of two expressions and a logical relation between them.
Definition: relational.h:35
The remember table is organized like an n-fold associative cache in a microprocessor.
Definition: remember.h:83
static std::vector< remember_table > & remember_tables()
Definition: remember.cpp:184
@ expanded
.expand(0) has already done its job (other expand() options ignore this flag)
Definition: flags.h:204
@ evaluated
.eval() has already done its job
Definition: flags.h:203
@ hash_calculated
.calchash() has already done its job
Definition: flags.h:205
Basic CAS symbol.
Definition: symbol.h:39
This class describes the symmetry of a group of indices.
Definition: symmetry.h:39
Interface to GiNaC's light-weight expression handles.
unsigned options
Definition: factor.cpp:2475
size_t n
Definition: factor.cpp:1432
size_t c
Definition: factor.cpp:757
size_t r
Definition: factor.cpp:757
Interface to abstract derivatives of functions.
Interface to class of symbolic functions.
Type-specific hash seed.
Interface to GiNaC's initially known functions.
int order
Definition of GiNaC's lst.
Definition: add.cpp:38
ex(* evalf_funcp_3)(const ex &, const ex &, const ex &)
Definition: function.h:168
ex(* eval_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:215
ex(* expand_funcp_4)(const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:184
ex(* conjugate_funcp_3)(const ex &, const ex &, const ex &)
Definition: function.h:169
void(* print_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:201
ex(* power_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:199
ex(* series_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:212
void(* print_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:261
ex(* series_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:248
bool(* info_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:310
ex(* expl_derivative_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:282
ex(* power_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:211
ex(* expand_funcp_exvector)(const exvector &, unsigned)
Definition: function.h:320
ex(* derivative_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:257
ex(* imag_part_funcp_1)(const ex &)
Definition: function.h:147
ex(* real_part_funcp_4)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:182
unsigned golden_ratio_hash(uintptr_t n)
Truncated multiplication with golden ratio, for computing hash values.
Definition: utils.h:68
ex(* eval_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:263
ex(* derivative_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:293
ex(* series_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:224
bool(* info_funcp_3)(const ex &, const ex &, const ex &, unsigned)
Definition: function.h:178
ex(* eval_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:227
bool(* info_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:202
ex(* eval_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:251
void(* print_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:213
ex(* expl_derivative_funcp_4)(const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:186
ex(* power_funcp_4)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:187
ex(* eval_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:191
ex(* conjugate_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:289
ex(* expand_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:232
ex(* conjugate_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:265
ex(* conjugate_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:217
ex(* power_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:307
ex(* evalf_funcp_1)(const ex &)
Definition: function.h:144
ex(* imag_part_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:291
bool(* info_funcp_2)(const ex &, const ex &, unsigned)
Definition: function.h:166
ex(* power_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:235
bool(* info_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:250
ex(* expl_derivative_funcp_1)(const ex &, const symbol &)
Definition: function.h:150
void(* print_funcp)()
Definition: function.h:139
ex(* conjugate_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:229
ex(* conjugate_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:193
ex(* eval_funcp_1)(const ex &)
Definition: function.h:143
bool(* info_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:214
bool(* info_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:298
bool(* info_funcp_exvector)(const exvector &, unsigned)
Definition: function.h:326
void(* print_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:225
ex(* evalf_funcp)()
Definition: function.h:130
ex(* expl_derivative_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:306
ex(* imag_part_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:303
ex(* power_funcp_1)(const ex &, const ex &)
Definition: function.h:151
ex(* evalf_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:192
ex(* eval_funcp_4)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:179
ex(* expand_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:268
ex(* power_funcp_2)(const ex &, const ex &, const ex &)
Definition: function.h:163
ex(* imag_part_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:219
ex(* imag_part_funcp)()
Definition: function.h:133
ex(* expand_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:220
bool(* info_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:262
ex(* series_funcp_2)(const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:164
ex(* real_part_funcp_2)(const ex &, const ex &)
Definition: function.h:158
ex(* real_part_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:302
ex(* series_funcp)()
Definition: function.h:138
ex(* derivative_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:221
ex(* real_part_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:242
ex(* imag_part_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:195
ex(* eval_funcp_exvector)(const exvector &)
Definition: function.h:315
bool(* info_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:226
ex(* expl_derivative_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:222
ex(* derivative_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:233
ex(* real_part_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:290
ex(* expl_derivative_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:234
ex(* real_part_funcp_exvector)(const exvector &)
Definition: function.h:318
ex(* series_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:272
ex(* expl_derivative_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:198
bool(* info_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:238
ex(* series_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:260
ex(* imag_part_funcp_4)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:183
ex(* eval_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:299
ex(* derivative_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:281
ex(* imag_part_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:255
ex(* evalf_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:300
ex(* real_part_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:218
ex(* real_part_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:266
ex(* derivative_funcp_3)(const ex &, const ex &, const ex &, unsigned)
Definition: function.h:173
ex(* evalf_funcp_2)(const ex &, const ex &)
Definition: function.h:156
ex(* series_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:284
ex(* conjugate_funcp_4)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:181
ex(* expand_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:280
ex(* expand_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:304
ex(* expand_funcp_2)(const ex &, const ex &, unsigned)
Definition: function.h:160
ex(* eval_funcp_3)(const ex &, const ex &, const ex &)
Definition: function.h:167
ex(* expand_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:256
ex(* real_part_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:206
ex(* real_part_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:278
ex(* real_part_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:254
void(* print_funcp_exvector)(const exvector &, const print_context &)
Definition: function.h:325
ex(* expl_derivative_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:270
ex(* evalf_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:276
ex(* derivative_funcp_exvector)(const exvector &, unsigned)
Definition: function.h:321
ex(* evalf_funcp_4)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:180
ex(* real_part_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:230
ex(* power_funcp)()
Definition: function.h:137
ex(* evalf_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:240
void(* print_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:309
ex(* conjugate_funcp_2)(const ex &, const ex &)
Definition: function.h:157
ex(* power_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:259
ex(* expl_derivative_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:210
ex(* imag_part_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:267
ex(* expl_derivative_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:258
ex(* power_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:223
ex(* expl_derivative_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:294
void(* print_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:297
ex(* power_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:271
bool(* info_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:286
ex(* expand_funcp)()
Definition: function.h:134
ex(* series_funcp_1)(const ex &, const relational &, int, unsigned)
Definition: function.h:152
void(* print_funcp_1)(const ex &, const print_context &)
Definition: function.h:153
ex(* imag_part_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:207
ex(* derivative_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:305
ex(* imag_part_funcp_exvector)(const exvector &)
Definition: function.h:319
bool(* info_funcp_4)(const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:190
bool(* info_funcp_1)(const ex &, unsigned)
Definition: function.h:154
void(* print_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:237
ex(* eval_funcp_2)(const ex &, const ex &)
Definition: function.h:155
ex(* expl_derivative_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:246
ex(* derivative_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:209
ex(* series_funcp_3)(const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:176
ex(* conjugate_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:241
static unsigned make_hash_seed(const std::type_info &tinfo)
We need a hash function which gives different values for objects of different types.
Definition: hash_seed.h:36
unsigned rotate_left(unsigned n)
Rotate bits of unsigned value by one bit to the left.
Definition: utils.h:48
ex(* imag_part_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:243
void(* print_funcp_2)(const ex &, const ex &, const print_context &)
Definition: function.h:165
ex(* expand_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:244
ex(* derivative_funcp_2)(const ex &, const ex &, unsigned)
Definition: function.h:161
ex(* expand_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:292
ex(* conjugate_funcp_exvector)(const exvector &)
Definition: function.h:317
ex(* series_funcp_4)(const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:188
ex(* real_part_funcp_1)(const ex &)
Definition: function.h:146
ex(* evalf_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:252
ex(* conjugate_funcp_1)(const ex &)
Definition: function.h:145
ex(* imag_part_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:279
ex(* expand_funcp_3)(const ex &, const ex &, const ex &, unsigned)
Definition: function.h:172
ex(* series_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:236
ex(* evalf_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:204
ex(* conjugate_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:205
bool(* info_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:274
ex(* eval_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:239
void(* print_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:273
ex(* evalf_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:288
ex(* imag_part_funcp_3)(const ex &, const ex &, const ex &)
Definition: function.h:171
ex(* imag_part_funcp_2)(const ex &, const ex &)
Definition: function.h:159
ex(* evalf_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:264
bool(* info_funcp)()
Definition: function.h:140
ex(* eval_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:287
ex(* series_funcp_exvector)(const exvector &, const relational &, int, unsigned)
Definition: function.h:324
ex(* real_part_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:194
ex(* derivative_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:245
ex(* derivative_funcp)()
Definition: function.h:135
int canonicalize(exvector::iterator v, const symmetry &symm)
Canonicalize the order of elements of an expression vector, according to the symmetry properties defi...
Definition: symmetry.cpp:438
ex(* power_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:247
ex(* expl_derivative_funcp_exvector)(const exvector &, const symbol &)
Definition: function.h:322
ex(* series_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:308
ex(* conjugate_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:277
ex(* evalf_funcp_exvector)(const exvector &)
Definition: function.h:316
ex(* series_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:200
ex(* conjugate_funcp_14)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:301
ex(* conjugate_funcp_10)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:253
ex(* power_funcp_exvector)(const exvector &, const ex &)
Definition: function.h:323
ex(* expl_derivative_funcp)()
Definition: function.h:136
ex(* power_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:283
ex(* derivative_funcp_1)(const ex &, unsigned)
Definition: function.h:149
ex(* expl_derivative_funcp_2)(const ex &, const ex &, const symbol &)
Definition: function.h:162
ex(* eval_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:203
ex(* expand_funcp_1)(const ex &, unsigned)
Definition: function.h:148
void(* print_funcp_3)(const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:177
ex(* derivative_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:197
void(* print_funcp_9)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:249
GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(lst, basic, print_func< print_context >(&lst::do_print). print_func< print_tree >(&lst::do_print_tree)) template<> bool lst GINAC_BIND_UNARCHIVER(lst)
Specialization of container::info() for lst.
Definition: lst.cpp:42
ex(* expand_funcp_6)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:208
void(* print_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:285
void(* print_funcp_4)(const ex &, const ex &, const ex &, const ex &, const print_context &)
Definition: function.h:189
ex(* eval_funcp)()
Definition: function.h:129
ex(* imag_part_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:231
ex(* eval_funcp_12)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:275
ex(* power_funcp_3)(const ex &, const ex &, const ex &, const ex &)
Definition: function.h:175
ex(* expand_funcp_5)(const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:196
ex(* real_part_funcp_3)(const ex &, const ex &, const ex &)
Definition: function.h:170
ex(* expl_derivative_funcp_3)(const ex &, const ex &, const ex &, const symbol &)
Definition: function.h:174
const ex _ex0
Definition: utils.cpp:369
std::vector< ex > exvector
Definition: basic.h:48
ex(* derivative_funcp_11)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:269
ex(* real_part_funcp)()
Definition: function.h:132
ex(* evalf_funcp_8)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:228
ex(* derivative_funcp_4)(const ex &, const ex &, const ex &, const ex &, unsigned)
Definition: function.h:185
ex(* series_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const relational &, int, unsigned)
Definition: function.h:296
ex(* evalf_funcp_7)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:216
ex(* conjugate_funcp)()
Definition: function.h:131
ex(* power_funcp_13)(const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &, const ex &)
Definition: function.h:295
ex expand(const ex &thisex, unsigned options=0)
Definition: ex.h:730
Definition: ex.h:987
Interface to GiNaC's overloaded operators.
Interface to GiNaC's symbolic exponentiation (basis^exponent).
Definition of helper classes for expression output.
#define GINAC_IMPLEMENT_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the implementation of each registered class.
Definition: registrar.h:180
Interface to helper classes for using the remember option in GiNaC functions.
To distinguish between different kinds of non-commutative objects.
Definition: registrar.h:44
Interface to GiNaC's symmetry definitions.
Interface to several small and furry utilities needed within GiNaC but not of any interest to the use...

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.