| Cv2PartitionT Method |
Splits an element set into equivalency classes.
Consider using GroupBy of Linq instead.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static int Partition<T>(
IEnumerable<T> vec,
out int[] labels,
Cv2PartitionPredicate<T> predicate
)
Public Shared Function Partition(Of T) (
vec As IEnumerable(Of T),
<OutAttribute> ByRef labels As Integer(),
predicate As Cv2PartitionPredicate(Of T)
) As Integer
public:
generic<typename T>
static int Partition(
IEnumerable<T>^ vec,
[OutAttribute] array<int>^% labels,
Cv2PartitionPredicate<T>^ predicate
)
static member Partition :
vec : IEnumerable<'T> *
labels : int[] byref *
predicate : Cv2PartitionPredicate<'T> -> int
Parameters
- vec
- Type: System.Collections.GenericIEnumerableT
Set of elements stored as a vector. - labels
- Type: SystemInt32
Output vector of labels. It contains as many elements as vec. Each label labels[i] is a 0-based cluster index of vec[i] . - predicate
- Type: OpenCvSharpCv2PartitionPredicateT
Equivalence predicate (a boolean function of two arguments).
The predicate returns true when the elements are certainly in the same class, and returns false if they may or may not be in the same class.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:OpenCvSharp.Cv2.Partition``1(System.Collections.Generic.IEnumerable{``0},System.Int32[]@,OpenCvSharp.Cv2.PartitionPredicate{``0})"]
Return Value
Type:
Int32[Missing <returns> documentation for "M:OpenCvSharp.Cv2.Partition``1(System.Collections.Generic.IEnumerable{``0},System.Int32[]@,OpenCvSharp.Cv2.PartitionPredicate{``0})"]
See Also