Version

SumIf(ComplexVector,BooleanVector) Method

Returns the sum of the elements of the ComplexVectorx where the corresponding BooleanVector is True.
Syntax
'Declaration
 
Public Overloads Shared Function SumIf( _
   ByVal x As ComplexVector, _
   ByVal comparison As BooleanVector _
) As Complex
public static Complex SumIf( 
   ComplexVector x,
   BooleanVector comparison
)

Parameters

x
A ComplexVector.
comparison
A BooleanVector with the same length and orientation as x.

Return Value

The sum of the elements of x where comparison is true.
Exceptions
ExceptionDescription
System.ArithmeticException Occurs if the comparison has a different length than x.
System.ArithmeticException Occurs if the comparison has a different orientation than x.
Remarks
The BooleanVector comparison can be easily constructed using the compare operators on ComplexVector. The following notation is convenient: Complex i = Constant.I; ComplexVector x1 = Compute.Line(-1, 1, 1000) + i*Compute.Line(1, -1, 1000); Complex sum = Compute.SumIf(x, x > 0);
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also