Archived
1

Added Documentation

This commit is contained in:
Kim Wittenburg
2014-11-10 21:45:50 +01:00
parent f4f924bd71
commit 10f0e73ad3
32 changed files with 1847 additions and 318 deletions

View File

@@ -8,12 +8,54 @@
#import "MPFunction.h"
@class MPSumFunction, MPExpression;
/*!
@class MPSumFunction
@brief A sum function (generally noted using a capital sigma) evaluates
a term repeatedly and sums up the results.
@discussion A sum function has a start and a target expression indicating how
often the sum expression should be evaluated. Both the value of
the start expression and the target expressions are included in
the iterations.
Each iteration the sum value is incremented by @c 1. If the start
and target expression evaluate to the same value the sum is
evaluated once.
*/
@interface MPSumFunction : MPFunction
@property (nonatomic, strong) MPExpression *startExpression; // Index 0
@property (nonatomic, strong) MPExpression *targetExpression; // Index 1
@property (nonatomic, strong) MPExpression *sumExpression; // Index 2
/*!
@property startExpression
@brief The value of the first iteration.
@discussion The start expression must define a variable that may be used in
the sum expression. If the start expression does not define a
variable the sum function will fail on validation.
*/
@property (nonatomic, strong) MPExpression *startExpression; /* Index 0 */
/*!
@property startExpression
@brief The value if the last iteration.
*/
@property (nonatomic, strong) MPExpression *targetExpression; /* Index 1 */
/*!
@property sumExpression
@brief The sum expression evaluated multiple times.
@discussion During evaluation of the sum expression the variable defined in
the start expression is available. That variable always contains
the value of the current iteration.
*/
@property (nonatomic, strong) MPExpression *sumExpression; /* Index 2 */
@end