| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function ApplyFunction( _ ByVal function As DoubleFunction2Dbl2Int, _ ByVal value1 As Double, _ ByVal value2 As Integer _ ) As Vector | |
| Visual Basic (Usage) | |
|---|---|
Dim instance As Vector Dim function As DoubleFunction2Dbl2Int Dim value1 As Double Dim value2 As Integer Dim value As Vector value = instance.ApplyFunction(function, value1, value2) | |
| C++/CLI | |
|---|---|
public: Vector^ ApplyFunction( DoubleFunction2Dbl2Int^ function, double value1, int value2 ) | |
Parameters
- function
- A delegate to a function that takes as its first and second parameter a double, as its third and forth parameter an integer, and returns a double.
- value1
- A double value that will be passed to the second parameter of the function represented by the delegate.
- value2
- An integer value that will be passed to the third parameter of the function represented by the delegate.
Return Value
A new Vector object with the same length as this vector, whose elements are the results of applying the specified function to the elements of this vector.The elements of this vector are passed one by one as parameters to the function that is represented by the delegate. The returned values from this function are used to initialize the elements of the newly created Vector object.
The index of the vector element is passed as the forth parameter of the function represented by the delegate.
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7