Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathKit/MPSumFunction.h
Kim Wittenburg 7438fd1f95 Added Lots of Documentation
Added some nice to haves
Improved and Unified General Code Layout
2015-01-04 02:54:27 +01:00

71 lines
2.0 KiB
Objective-C

//
// MPSumFunction.h
// MathPad
//
// Created by Kim Wittenburg on 22.04.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import "MPFunction.h"
/*!
@header
This file contains the <code>MPSumFunction</code> class.
*/
@class MPSumFunction, MPExpression;
/*!
@class MPSumFunction
@abstract This class represents a sum function (generally noted using a
capital sigma).
@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 <code>1</code>. If
the start and target expression evaluate to the same value the
sum is evaluated once.
*/
@interface MPSumFunction : MPFunction
/*!
@property startExpression
@abstract 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 targetExpression
@abstract The value if the last iteration.
@discussion The target expression must not define a variable.
*/
@property (nonatomic, strong) MPExpression *targetExpression; /* Index 1 */
/*!
@property sumExpression
@abstract 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.
The sum expression itself must not define a variable.
*/
@property (nonatomic, strong) MPExpression *sumExpression; /* Index 2 */
@end