| Counter Class |
Namespace: Algs4Net
public class Counter : IComparable<Counter>
The Counter type exposes the following members.
| Name | Description | |
|---|---|---|
| CompareTo |
Compares this counter to the specified counter. | |
| Increment |
Increments the counter by 1. | |
| MainTest |
Reads two command-line integers N and T; creates N counters;
increments T counters at random; and prints results. | |
| ToString |
Returns a string representation of this counter. (Overrides ObjectToString.) |
For additional documentation, see Section 1.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class Counter implementation by the respective authors.