Initializing Pairings

The only way to initialize a pairing is to provide pairing parameters to a pairing_t variable using one of the functions beginning with pairing_init_inp_. For example,

{
    pairing_t pairing;

    pairing_init_inp_str(pairing, stdin);
}

will initialize pairing with parameters are fed to the program on standard input.

The format of the pairing parameters is a text format that is output by the param functions.

void pairing_init_inp_buf(pairing_t pairing, const char *buf, size_t len)

Read in pairing parameters from array of characters buf of length len and use them to initialize pairing.

void pairing_init_inp_str(pairing_t pairing, FILE *stream)

Read in pairing parameters from stream and use them to initialize pairing.

void pairing_clear(pairing_t pairing)

Free the space occupied by pairing. Call whenever a pairing_t variable is no longer needed. IMPORTANT: only call this after all elements associated with pairing have been cleared, as they need information stored in the pairing structure.