.NET Matrix Library
ApplyFunction(DoubleFunction1Dbl2Int,Int32) Method
See Also  Send Feedback



function
A delegate to a function that takes as its first parameter a double, as a second and third parameter an integer and returns a double.
value
The integer value that will be passed to the second parameter of the function represented by the delegate.
Returns a new Vector object, whose elements are the result of applying the specified double function to the element of this vector.

Syntax

Visual Basic (Declaration) 
Public Overloads Function ApplyFunction( _
   ByVal function As DoubleFunction1Dbl2Int, _
   ByVal value As Integer _
) As Vector
Visual Basic (Usage)Copy Code
Dim instance As Vector
Dim function As DoubleFunction1Dbl2Int
Dim value As Integer
Dim value As Vector
 
value = instance.ApplyFunction(function, value)
C# 
public Vector ApplyFunction( 
   DoubleFunction1Dbl2Int function,
   int value
)
C++/CLI 
public:
Vector^ ApplyFunction( 
   DoubleFunction1Dbl2Int^ function,
   int value
) 

Parameters

function
A delegate to a function that takes as its first parameter a double, as a second and third parameter an integer and returns a double.
value
The integer value that will be passed to the second 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.

Remarks

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 third parameter of the function represented by the delegate.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

.NET Matrix Library