ImmutableArrayExtensions.Aggregate 메서드

정의

오버로드

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, T, T> ^ func);
public static T Aggregate<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,T,T> func);
public static T? Aggregate<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,T,T> func);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'T, 'T> -> 'T
<Extension()>
Public Function Aggregate(Of T) (immutableArray As ImmutableArray(Of T), func As Func(Of T, T, T)) As T

형식 매개 변수

T

컬렉션에 의해 포함되는 요소의 형식입니다.

매개 변수

immutableArray
ImmutableArray<T>

함수를 적용할 컬렉션입니다.

func
Func<T,T,T>

누적 방식으로 각 요소에서 호출할 함수입니다.

반환

T

누적 함수가 모든 요소에 적용된 이후의 최종 값입니다.

설명

Aggregate 메서드를 사용하면 값 시퀀스에 대한 계산을 간단하게 수행할 수 있습니다. 이 메서드는 원본의 각 요소에 대해 한 번 호출 func 하여 작동합니다. 호출 Aggregate 할 때마다 func 시퀀스의 요소와 집계된 값(func에 대한 첫 번째 인수)을 모두 전달합니다. 매개 변수의 seed 값은 초기 집계 값으로 사용됩니다. 결과는 func 이전 집계된 값을 대체합니다. Aggregate 의 최종 결과를 반환합니다 func.

적용 대상

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

public:
generic <typename TAccumulate, typename T>
[System::Runtime::CompilerServices::Extension]
 static TAccumulate Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> ^ func);
public static TAccumulate Aggregate<TAccumulate,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate,T,TAccumulate> func);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * 'Accumulate * Func<'Accumulate, 'T, 'Accumulate> -> 'Accumulate
<Extension()>
Public Function Aggregate(Of TAccumulate, T) (immutableArray As ImmutableArray(Of T), seed As TAccumulate, func As Func(Of TAccumulate, T, TAccumulate)) As TAccumulate

형식 매개 변수

TAccumulate

누적된 값의 형식입니다.

T

컬렉션에 의해 포함되는 요소의 형식입니다.

매개 변수

immutableArray
ImmutableArray<T>

함수를 적용할 컬렉션입니다.

seed
TAccumulate

초기 누적기 값입니다.

func
Func<TAccumulate,T,TAccumulate>

누적 방식으로 각 요소에서 호출할 함수입니다.

반환

TAccumulate

최종 누적기 값입니다.

설명

Aggregate 메서드를 사용하면 값 시퀀스에 대한 계산을 간단하게 수행할 수 있습니다. 이 메서드는 원본의 각 요소에 대해 한 번 호출 func 하여 작동합니다. 호출 Aggregate 할 때마다 func 시퀀스의 요소와 집계된 값(func에 대한 첫 번째 인수)을 모두 전달합니다. 매개 변수의 seed 값은 초기 집계 값으로 사용됩니다. 결과는 func 이전 집계된 값을 대체합니다. Aggregate 의 최종 결과를 반환합니다 func.

적용 대상

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>)

누적 방식으로 요소의 시퀀스에 함수를 적용합니다.

public:
generic <typename TAccumulate, typename TResult, typename T>
[System::Runtime::CompilerServices::Extension]
 static TResult Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> ^ func, Func<TAccumulate, TResult> ^ resultSelector);
public static TResult Aggregate<TAccumulate,TResult,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate,T,TAccumulate> func, Func<TAccumulate,TResult> resultSelector);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * 'Accumulate * Func<'Accumulate, 'T, 'Accumulate> * Func<'Accumulate, 'Result> -> 'Result
<Extension()>
Public Function Aggregate(Of TAccumulate, TResult, T) (immutableArray As ImmutableArray(Of T), seed As TAccumulate, func As Func(Of TAccumulate, T, TAccumulate), resultSelector As Func(Of TAccumulate, TResult)) As TResult

형식 매개 변수

TAccumulate

누적된 값의 형식입니다.

TResult

결과 선택기에서 반환되는 결과의 형식입니다.

T

컬렉션에 의해 포함되는 요소의 형식입니다.

매개 변수

immutableArray
ImmutableArray<T>

함수를 적용할 컬렉션입니다.

seed
TAccumulate

초기 누적기 값입니다.

func
Func<TAccumulate,T,TAccumulate>

누적 방식으로 각 요소에서 호출할 함수입니다.

resultSelector
Func<TAccumulate,TResult>

최종 누적기 값을 결과 형식으로 변환하는 함수입니다.

반환

TResult

최종 누적기 값입니다.

설명

Aggregate 메서드를 사용하면 값 시퀀스에 대한 계산을 간단하게 수행할 수 있습니다. 이 메서드는 원본의 각 요소에 대해 한 번 호출 func 하여 작동합니다. 호출 Aggregate 할 때마다 func 시퀀스의 요소와 집계된 값(func에 대한 첫 번째 인수)을 모두 전달합니다. 매개 변수의 seed 값은 초기 집계 값으로 사용됩니다. 결과는 func 이전 집계된 값을 대체합니다. Aggregate 의 최종 결과를 반환합니다 func.

적용 대상