Entries Tagged as 'method'

Method signature

In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature. This usually includes the method name, the number and type of its parameters, and its return type. A method signature is the smallest type of a method.

In the Objective-C programming language, method signatures for an object are declared in the interface header file. For example,

- (id)initWithInt:(int)value;

defines a method initWithInt that returns a general object (an id) and takes one integer argument. Objective-C only requires a type in a signature to be explicit when the type is not id; this signature is equivalent:

- initWithInt:(int)value;

In the Java programming language, method signatures for an object is the method name and the number and type of its parameters. Return types are not considered to be a part of the method signature.

- return_type method_name(parameters) {...}


See also

  • Type signature

Nanson’s method

The Borda count can be combined with an Instant Runoff procedure to create hybrid election methods that are called Nanson method and Baldwin method.


Nanson method

The Nanson method is based on the original work of the mathematician Edward J. Nanson.

Nanson’s method eliminates those choices from a Borda count tally that are at or below the average Borda count score, then the ballots are retallied as if the remaining candidates were exclusively on the ballot.
This process is repeated if necessary until a single winner remains.


Baldwin method

This variant was devised by Joseph M. Baldwin and works like this:

Candidates are voted for on ranked ballots as in the Borda count. Then, the points are tallied in a series of rounds. In each round, the candidate with the fewest points is eliminated, and the points are re-tallied as if that candidate were not on the ballot.


Satisfied and failed criteria

The Nanson method and the Baldwin method satisfy the Condorcet criterion: since Borda always gives any existing Condorcet winner more than the average Borda points, the Condorcet winner will never be eliminated. They do not satisfy the independence of irrelevant alternatives criterion, the monotonicity criterion, the participation criterion, the consistency criterion and the independence of clones criterion, while they do satisfy the majority criterion, the mutual majority criterion, the Condorcet loser criterion, reversal symmetry and the Smith criterion.


Use of Nanson and Baldwin

Nanson’s method was used in city elections in the U.S. town of Marquette, Michigan in the 1920s. It was formally used by the Anglican Diocese of Melbourne and in the election of members of the University Council of the University of Adelaide. It was used by the University of Melbourne until 1983.


Note

  1. See: Australian electoral reform and two concepts of representation