Data Structures
gfsmxlSuffixIndex.h File Reference

Automaton suffix-length indices. More...

#include <gfsm.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gfsmxlSuffixLengthIndex
 Suffix-length index on gfsmIndexedAutomaton . More...

Functions

gfsmxlSuffixLengthIndex
gfsmxlSuffixLengthIndexgfsmxl_suffix_length_index_new (gfsmIndexedAutomaton *xfsm)
static void gfsmxl_suffix_length_index_free (gfsmxlSuffixLengthIndex *slx)
gboolean gfsmxl_suffix_length_index_write_bin_handle (gfsmxlSuffixLengthIndex *slx, gfsmIOHandle *ioh, gfsmError **errp)
gboolean gfsmxl_suffix_length_index_read_bin_handle (gfsmxlSuffixLengthIndex *slx, gfsmIOHandle *ioh, gfsmError **errp)

gfsmxlSuffixLength

typedef gfsmStateId gfsmxlSuffixLength
const gfsmxlSuffixLength gfsmxlSuffixLengthNone

gfsmxlSuffixLengthArray

typedef GArray gfsmxlSuffixLengthArray
 Array of suffix lengths (gfsmxlSuffixLength), indexed by gfsmStateId.
gfsmxlSuffixLengthArraygfsmxl_suffix_length_array_new (gfsmStateId n_states)
static void gfsmxl_suffix_length_array_free (gfsmxlSuffixLengthArray *sla)
static gfsmxlSuffixLengthgfsmxl_suffix_length_array_data (gfsmxlSuffixLengthArray *sla)
static gfsmxlSuffixLength gfsmxl_suffix_length_array_get (gfsmxlSuffixLengthArray *sla, gfsmStateId qid)
static void gfsmxl_suffix_length_array_set (gfsmxlSuffixLengthArray *sla, gfsmStateId qid, gfsmxlSuffixLength pl)

Detailed Description

Typedef Documentation

Suffix length type (unsigned)

typedef GArray gfsmxlSuffixLengthArray

Array sla such that: len = g_array_index(sla,gfsmxlSuffixLength,qid) iff len is the minimum number of non-eps symbols on side in any suffix from state qid to a final state.

Function Documentation

gfsmxlSuffixLengthArray* gfsmxl_suffix_length_array_new ( gfsmStateId  n_states)

Create a new gfsmxlSuffixLengthIndex, pre-allocating space for n_states states. Initial values are set to gfsmxlSuffixLengthNone.

static void gfsmxl_suffix_length_array_free ( gfsmxlSuffixLengthArray sla)
inlinestatic
static gfsmxlSuffixLength* gfsmxl_suffix_length_array_data ( gfsmxlSuffixLengthArray sla)
inlinestatic

gfsmxlSuffixLengthArray read/write access (data pointer)

static gfsmxlSuffixLength gfsmxl_suffix_length_array_get ( gfsmxlSuffixLengthArray sla,
gfsmStateId  qid 
)
inlinestatic

gfsmxlSuffixLengthArray read-only access

static void gfsmxl_suffix_length_array_set ( gfsmxlSuffixLengthArray sla,
gfsmStateId  qid,
gfsmxlSuffixLength  pl 
)
inlinestatic

gfsmxlSuffixLengthArray write-only access

gfsmxlSuffixLengthIndex* gfsmxl_suffix_length_index_new ( gfsmIndexedAutomaton xfsm)

Create and populate a gfsmxlSuffixLengthIndex from a ::gfsmxlIndexedAutomaton

static void gfsmxl_suffix_length_index_free ( gfsmxlSuffixLengthIndex slx)
inlinestatic
gboolean gfsmxl_suffix_length_index_write_bin_handle ( gfsmxlSuffixLengthIndex slx,
gfsmIOHandle ioh,
gfsmError **  errp 
)

Write the contents of a ::gfsmSuffixLengthIndex to a (binary) gfsmIOHandle.

Parameters
slxindex to write
iohhandle to which data is to be written
errpif an error occurs, *errp will hold an error message
Returns
true on success
gboolean gfsmxl_suffix_length_index_read_bin_handle ( gfsmxlSuffixLengthIndex slx,
gfsmIOHandle ioh,
gfsmError **  errp 
)

Read the contents of a ::gfsmSuffixLengthIndex from a (binary) gfsmIOHandle.

Parameters
slxindex into which data is to be read
iohhandle from which data is to be read
errpif an error occurs, *errp will hold an error message
Returns
true on success

Variable Documentation

const gfsmxlSuffixLength gfsmxlSuffixLengthNone

constant for missing suffix lengths ((gfsmxlSuffixLength)-1)