Click or drag to resize
Accord.NET (logo)

VectorHistogram Method (Int32, Int32)

Counts how many times an integer label appears in a vector (i.e. creates an histogram of integer values assuming possible values start at zero and go up to the maximum value of in the vector).

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
public static int[] Histogram(
	this int[] labels,
	int[] result
Request Example View Source


Type: SystemInt32
An array containing the integer labels to be counted.
Type: SystemInt32
The histogram to were the counts will be added. This vector should have been zeroed out before being passed to this method.

Return Value

Type: Int32
The same vector result passed as an argument.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also