Next: , Previous: row Operators, Up: The row Class



3.5.4 Other functions

— Function: int row::bells (void) const;

This returns the number of bells which the row contains.

— Function: void row::swap (row& other);

This function swaps this row with other in an efficient manner.

— Function: int row::find (bell const& b);

This function locates the bell, b, in this row and returns its place.

— Function: bool row::isrounds (void) const;

This returns true if the row is rounds, and false otherwise.

— Function: int row::ispblh (void) const;

If the row is a lead head of Plain Bob, Grandsire or, more generally, of the Plain Bob type method with any number of hunt bells, then this function returns an integer indicating which lead head it is. Otherwise, it returns 0.

— Function: int row::ispblh (int h) const;

If the row is a lead head of Plain Bob, Grandsire or, more generally, of the Plain Bob type method with h hunt bells, then this function returns an integer indicating which lead head it is. Otherwise, it returns 0.

— Function: string row::print (void) const;

This prints the row to a string object.

— Function: row row::inverse (void) const;

This returns the inverse of a row, as explained above.

— Function: int row::sign (void) const;

This returns the sign or parity of a row: 1 for even, -1 for odd.

— Function: int row::order (void) const;

This returns the order of the row.

— Function: string row::cycles (void) const;

This expresses the row as separate cycles. The returned string will afterwards contain a list of all the cycles in the row, separated by commas; for example row("21453678").cycles() will return the string "12,345,6,7,8".

— Function: template <> void swap<row> (row& a, row& b);

This specialised the swap function which is defined in the standard library. The result is that certain standard algorithms may become much more efficient. Note that according to your namespace setup, swap may need to be in namespace std; similarly, row may or may not be in namespace ringing. This is all taken care of.