#include "states.h"#include "structures.h"#include "tordvars.h"#include "callcpp.h"Defines | |
| #define | STATEBLOCK 100 |
Functions | |
| makestructure (newstate, free_state, printstate, STATE, freestate, STATEBLOCK,"STATE", statecount) | |
bin_to_chunks | |
| SEARCH_STATE | bin_to_chunks (STATE *state, int num_joints) |
| void | bin_to_pieces (STATE *state, int num_joints, PIECES_STATE pieces) |
| void | insert_new_chunk (register STATE *state, register int index, register int num_joints) |
| STATE * | new_state (STATE *oldstate) |
| int | ones_in_state (STATE *state, int num_joints) |
| void | print_state (const char *label, STATE *state, int num_joints) |
| void | set_n_ones (STATE *state, int n) |
| int | compare_states (STATE *true_state, STATE *this_state, int *blob_index) |
| #define STATEBLOCK 100 |
| SEARCH_STATE bin_to_chunks | ( | STATE * | state, | |
| int | num_joints | |||
| ) |
| void bin_to_pieces | ( | STATE * | state, | |
| int | num_joints, | |||
| PIECES_STATE | pieces | |||
| ) |
bin_to_pieces
Convert the binary (bit vector) format of a search state to an array of piece counts. This array has a zero element after the last valid character.
compare_states
Compare the 2 states at the given blob index. Return 1 if the given blob is a fragment compared to reality, 2 if correct, 4 if a join, and 5 if both a join and a fragment. On return the blob index is set to the corresponding index in the correct string.
| void insert_new_chunk | ( | register STATE * | state, | |
| register int | index, | |||
| register int | num_joints | |||
| ) |
insert_new_chunk
Add a new chunk division into this state vector at the location requested.
| makestructure | ( | newstate | , | |
| free_state | , | |||
| printstate | , | |||
| STATE | , | |||
| freestate | , | |||
| STATEBLOCK | , | |||
| "STATE" | , | |||
| statecount | ||||
| ) |
new_state
Create a memory space for a new state variable. Set its initial value according to the parameters.
| int ones_in_state | ( | STATE * | state, | |
| int | num_joints | |||
| ) |
ones_in_state
Return the number of ones that are in this state.
| void print_state | ( | const char * | label, | |
| STATE * | state, | |||
| int | num_joints | |||
| ) |
print_state
Print out the current state variable on a line with a label.
| void set_n_ones | ( | STATE * | state, | |
| int | n | |||
| ) |
set_n_ones
Set the first n bits in a state.
1.6.3