File: classMathFunction.html

package info (click to toggle)
libqalculate 0.9.6-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,096 kB
  • ctags: 5,501
  • sloc: cpp: 40,337; sh: 9,010; makefile: 67
file content (699 lines) | stat: -rw-r--r-- 41,059 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libqalculate-0.9.6: MathFunction Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.3 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>MathFunction Class Reference</h1><!-- doxytag: class=<MathFunction> --><!-- doxytag: inherits=<ExpressionItem> -->Abstract base class for mathematical functions.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Function.h&gt;</code>
<p>
<p>Inheritance diagram for MathFunction:
<p><center><img src="classMathFunction.png" usemap="#MathFunction_map" border="0" alt=""></center>
<map name="MathFunction_map">
<area href="classExpressionItem.html" alt="ExpressionItem" shape="rect" coords="53,0,149,24">
<area href="classDataSet.html" alt="DataSet" shape="rect" coords="0,112,96,136">
<area href="classUserFunction.html" alt="UserFunction" shape="rect" coords="106,112,202,136">
</map>
<a href="classMathFunction-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member=<MathFunction::MathFunction> ref=<a0> args=<(string name_, int argc_, int max_argc_=0, string cat_="", string title_="", string descr_="", bool is_active=true)> -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>MathFunction</b> (string name_, int argc_, int max_argc_=0, string cat_="", string title_="", string descr_="", bool is_active=true)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member=<MathFunction::MathFunction> ref=<a1> args=<(const MathFunction *function)> -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>MathFunction</b> (const <a class="el" href="classMathFunction.html">MathFunction</a> *function)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member=<MathFunction::copy> ref=<a4> args=<() const =0> -->
virtual <a class="el" href="classExpressionItem.html">ExpressionItem</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>copy</b> () const =0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member=<MathFunction::set> ref=<a5> args=<(const ExpressionItem *item)> -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set</b> (const <a class="el" href="classExpressionItem.html">ExpressionItem</a> *item)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a6">type</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a7">subtype</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8"></a><!-- doxytag: member=<MathFunction::testArgumentCount> ref=<a8> args=<(int itmp)> -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>testArgumentCount</b> (int itmp)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9"></a><!-- doxytag: member=<MathFunction::calculate> ref=<a9> args=<(const string &amp;eq, const EvaluationOptions &amp;eo=default_evaluation_options)> -->
virtual <a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>calculate</b> (const string &amp;eq, const <a class="el" href="structEvaluationOptions.html">EvaluationOptions</a> &amp;eo=<a class="el" href="includes_8h.html#a150">default_evaluation_options</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10"></a><!-- doxytag: member=<MathFunction::parse> ref=<a10> args=<(const string &amp;eq, const ParseOptions &amp;po=default_parse_options)> -->
virtual <a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>parse</b> (const string &amp;eq, const <a class="el" href="structParseOptions.html">ParseOptions</a> &amp;po=<a class="el" href="includes_8h.html#a149">default_parse_options</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11"></a><!-- doxytag: member=<MathFunction::parse> ref=<a11> args=<(MathStructure &amp;mstruct, const string &amp;eq, const ParseOptions &amp;po=default_parse_options)> -->
virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><b>parse</b> (<a class="el" href="classMathStructure.html">MathStructure</a> &amp;mstruct, const string &amp;eq, const <a class="el" href="structParseOptions.html">ParseOptions</a> &amp;po=<a class="el" href="includes_8h.html#a149">default_parse_options</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12"></a><!-- doxytag: member=<MathFunction::calculate> ref=<a12> args=<(MathStructure &amp;vargs, const EvaluationOptions &amp;eo=default_evaluation_options)> -->
virtual <a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>calculate</b> (<a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs, const <a class="el" href="structEvaluationOptions.html">EvaluationOptions</a> &amp;eo=<a class="el" href="includes_8h.html#a150">default_evaluation_options</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a13">calculate</a> (<a class="el" href="classMathStructure.html">MathStructure</a> &amp;mstruct, const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs, const <a class="el" href="structEvaluationOptions.html">EvaluationOptions</a> &amp;eo)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a14">condition</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a15">printCondition</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a16">setCondition</a> (string expression)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a17">testCondition</a> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a18">args</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a19">minargs</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a20">maxargs</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a21">args</a> (const string &amp;str, <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs, const <a class="el" href="structParseOptions.html">ParseOptions</a> &amp;po=<a class="el" href="includes_8h.html#a149">default_parse_options</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a22">lastArgumentDefinitionIndex</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classArgument.html">Argument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a23">getArgumentDefinition</a> (size_t index)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a24">clearArgumentDefinitions</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMathFunction.html#a25">setArgumentDefinition</a> (size_t index, <a class="el" href="classArgument.html">Argument</a> *argdef)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a26"></a><!-- doxytag: member=<MathFunction::stringArgs> ref=<a26> args=<(const string &amp;str, vector&lt; string &gt; &amp;svargs)> -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>stringArgs</b> (const string &amp;str, vector&lt; string &gt; &amp;svargs)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a27"></a><!-- doxytag: member=<MathFunction::setDefaultValue> ref=<a27> args=<(size_t arg_, string value_)> -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setDefaultValue</b> (size_t arg_, string value_)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a28"></a><!-- doxytag: member=<MathFunction::getDefaultValue> ref=<a28> args=<(size_t arg_) const > -->
const string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>getDefaultValue</b> (size_t arg_) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a29"></a><!-- doxytag: member=<MathFunction::appendDefaultValues> ref=<a29> args=<(MathStructure &amp;vargs)> -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>appendDefaultValues</b> (<a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a30"></a><!-- doxytag: member=<MathFunction::produceVector> ref=<a30> args=<(const MathStructure &amp;vargs, int begin=-1, int end=-1)> -->
<a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>produceVector</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs, int begin=-1, int end=-1)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a31"></a><!-- doxytag: member=<MathFunction::produceArgumentsVector> ref=<a31> args=<(const MathStructure &amp;vargs, int begin=-1, int end=-1)> -->
<a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>produceArgumentsVector</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs, int begin=-1, int end=-1)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a32"></a><!-- doxytag: member=<MathFunction::representsPositive> ref=<a32> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsPositive</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a33"></a><!-- doxytag: member=<MathFunction::representsNegative> ref=<a33> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNegative</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a34"></a><!-- doxytag: member=<MathFunction::representsNonNegative> ref=<a34> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNonNegative</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a35"></a><!-- doxytag: member=<MathFunction::representsNonPositive> ref=<a35> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNonPositive</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36"></a><!-- doxytag: member=<MathFunction::representsInteger> ref=<a36> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsInteger</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a37"></a><!-- doxytag: member=<MathFunction::representsNumber> ref=<a37> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNumber</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a38"></a><!-- doxytag: member=<MathFunction::representsRational> ref=<a38> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsRational</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a39"></a><!-- doxytag: member=<MathFunction::representsReal> ref=<a39> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsReal</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a40"></a><!-- doxytag: member=<MathFunction::representsComplex> ref=<a40> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsComplex</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a41"></a><!-- doxytag: member=<MathFunction::representsNonZero> ref=<a41> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNonZero</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a42"></a><!-- doxytag: member=<MathFunction::representsEven> ref=<a42> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsEven</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a43"></a><!-- doxytag: member=<MathFunction::representsOdd> ref=<a43> args=<(const MathStructure &amp;, bool=false) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsOdd</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;, bool=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a44"></a><!-- doxytag: member=<MathFunction::representsUndefined> ref=<a44> args=<(const MathStructure &amp;) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsUndefined</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a45"></a><!-- doxytag: member=<MathFunction::representsBoolean> ref=<a45> args=<(const MathStructure &amp;) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsBoolean</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a46"></a><!-- doxytag: member=<MathFunction::representsNonMatrix> ref=<a46> args=<(const MathStructure &amp;) const > -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNonMatrix</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;) const </td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0"></a><!-- doxytag: member=<MathFunction::testArguments> ref=<b0> args=<(MathStructure &amp;vargs)> -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>testArguments</b> (<a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1"></a><!-- doxytag: member=<MathFunction::createFunctionMathStructureFromVArgs> ref=<b1> args=<(const MathStructure &amp;vargs)> -->
virtual <a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>createFunctionMathStructureFromVArgs</b> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;vargs)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2"></a><!-- doxytag: member=<MathFunction::createFunctionMathStructureFromSVArgs> ref=<b2> args=<(vector&lt; string &gt; &amp;svargs)> -->
virtual <a class="el" href="classMathStructure.html">MathStructure</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>createFunctionMathStructureFromSVArgs</b> (vector&lt; string &gt; &amp;svargs)</td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0"></a><!-- doxytag: member=<MathFunction::argc> ref=<p0> args=<> -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>argc</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1"></a><!-- doxytag: member=<MathFunction::max_argc> ref=<p1> args=<> -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>max_argc</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2"></a><!-- doxytag: member=<MathFunction::default_values> ref=<p2> args=<> -->
vector&lt; string &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>default_values</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p3"></a><!-- doxytag: member=<MathFunction::argdefs> ref=<p3> args=<> -->
Sgi::hash_map&lt; size_t, <a class="el" href="classArgument.html">Argument</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>argdefs</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p4"></a><!-- doxytag: member=<MathFunction::last_argdef_index> ref=<p4> args=<> -->
size_t&nbsp;</td><td class="memItemRight" valign="bottom"><b>last_argdef_index</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p5"></a><!-- doxytag: member=<MathFunction::scondition> ref=<p5> args=<> -->
string&nbsp;</td><td class="memItemRight" valign="bottom"><b>scondition</b></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract base class for mathematical functions. 
<p>
A mathemical function, subclassed from MathFunction, should at least reimplement <a class="el" href="classMathFunction.html#a13">calculate(MathStructure&amp;, const MathStructure&amp;, const EvaluationOptions&amp;)</a> and copy(), and preferably also the represents* functions. <a class="el" href="classArgument.html">Argument</a> definitions should be added in the constructor.
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a21"></a><!-- doxytag: member=<MathFunction::args> ref=<a21> args=<(const string &amp;str, MathStructure &amp;vargs, const ParseOptions &amp;po=default_parse_options)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int MathFunction::args           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vargs</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="structParseOptions.html">ParseOptions</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>po</em> = <code><a class="el" href="includes_8h.html#a149">default_parse_options</a></code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Parses arguments from a text string and places them in a vector. The text string should be a comma separated list of arguments.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>The argument string to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>vargs</em>&nbsp;</td><td>Vector to store parsed arguments in. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>po</em>&nbsp;</td><td>Parse options. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The number of parsed arguments.</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a18"></a><!-- doxytag: member=<MathFunction::args> ref=<a18> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int MathFunction::args           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the maximum number of arguments that the function accepts or -1 if the number of arguments is unlimited.    </td>
  </tr>
</table>
<a class="anchor" name="a13"></a><!-- doxytag: member=<MathFunction::calculate> ref=<a13> args=<(MathStructure &amp;mstruct, const MathStructure &amp;vargs, const EvaluationOptions &amp;eo)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int MathFunction::calculate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mstruct</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vargs</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="structEvaluationOptions.html">EvaluationOptions</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>eo</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The main function for subclasses to reimplement. Calculates a value from arguments in vargs and puts it in mstruct.<p>
This function expects the number of arguments to be equal to the maximum number of arguments, and checked by the argument definitions.<p>
If the return value is negative, then argument -(return value) has been evaluated in mstruct. If -(return value) is greater than max arguments, then mstruct is a vector of evaluated argument values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>mstruct</em>&nbsp;</td><td>Structure that is set with the result of the calculation. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>vargs</em>&nbsp;</td><td>Arguments passed to the mathematical function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>eo</em>&nbsp;</td><td>Evaluation options. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>1 if the calculation was successful.</dd></dl>

<p>
Reimplemented in <a class="el" href="classDataSet.html#a11">DataSet</a>, and <a class="el" href="classUserFunction.html#a6">UserFunction</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a24"></a><!-- doxytag: member=<MathFunction::clearArgumentDefinitions> ref=<a24> args=<()> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void MathFunction::clearArgumentDefinitions           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Removes all argument definitions for the function.    </td>
  </tr>
</table>
<a class="anchor" name="a14"></a><!-- doxytag: member=<MathFunction::condition> ref=<a14> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">string MathFunction::condition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the functions condition expression.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The function's condition expression</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a23"></a><!-- doxytag: member=<MathFunction::getArgumentDefinition> ref=<a23> args=<(size_t index)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classArgument.html">Argument</a>* MathFunction::getArgumentDefinition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">size_t&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>index</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the argument definition for an argument index.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td><a class="el" href="classArgument.html">Argument</a> index. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The argument definition for the index or NULL if no the argument was not defined for the index</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a22"></a><!-- doxytag: member=<MathFunction::lastArgumentDefinitionIndex> ref=<a22> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t MathFunction::lastArgumentDefinitionIndex           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the index of the last argument definition.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The index of the last argument definition</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a20"></a><!-- doxytag: member=<MathFunction::maxargs> ref=<a20> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int MathFunction::maxargs           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the maximum number of arguments that the function accepts or -1 if the number of arguments is unlimited.    </td>
  </tr>
</table>
<a class="anchor" name="a19"></a><!-- doxytag: member=<MathFunction::minargs> ref=<a19> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int MathFunction::minargs           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the minimum number of arguments for the function.    </td>
  </tr>
</table>
<a class="anchor" name="a15"></a><!-- doxytag: member=<MathFunction::printCondition> ref=<a15> args=<()> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">string MathFunction::printCondition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Print the function's condition expression with argument names.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The printed condition</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a25"></a><!-- doxytag: member=<MathFunction::setArgumentDefinition> ref=<a25> args=<(size_t index, Argument *argdef)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void MathFunction::setArgumentDefinition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="classArgument.html">Argument</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>argdef</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the argument definition for an argument index.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td><a class="el" href="classArgument.html">Argument</a> index. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>argdef</em>&nbsp;</td><td>A newly allocated argument definition</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a16"></a><!-- doxytag: member=<MathFunction::setCondition> ref=<a16> args=<(string expression)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void MathFunction::setCondition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">string&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>expression</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the functions condition expression.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>expression</em>&nbsp;</td><td>The function's new condition expression</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a7"></a><!-- doxytag: member=<MathFunction::subtype> ref=<a7> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int MathFunction::subtype           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the subtype of the mathematical function, corresponding to which subsubclass the object belongs to.<p>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="Function_8h.html#a28">FunctionSubtype</a>.</dd></dl>

<p>
Implements <a class="el" href="classExpressionItem.html#a52">ExpressionItem</a>.
<p>
Reimplemented in <a class="el" href="classDataSet.html#a4">DataSet</a>, and <a class="el" href="classUserFunction.html#a16">UserFunction</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a17"></a><!-- doxytag: member=<MathFunction::testCondition> ref=<a17> args=<(const MathStructure &amp;vargs)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool MathFunction::testCondition           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vargs</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Test if arguments fulfil the function's condition expression.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>vargs</em>&nbsp;</td><td>Vector with arguments. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if the arguments fulfil the function's condition expression</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a6"></a><!-- doxytag: member=<MathFunction::type> ref=<a6> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int MathFunction::type           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the type of the expression item, corresponding to which subclass the object belongs to.<p>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="includes_8h.html#a254">ExpressionItemType</a>.</dd></dl>

<p>
Implements <a class="el" href="classExpressionItem.html#a51">ExpressionItem</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>libqalculate/<a class="el" href="Function_8h.html">Function.h</a></ul>
<hr size="1"><address style="align: right;"><small>
Generated on 17 Jun 2007 for libqalculate-0.9.6 by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.3</small></address>
</body>
</html>