Patterns in static

Apophenia

apop_name.c File Reference

Functions


Detailed Description


Function Documentation

int apop_name_add ( apop_name n,
char *  add_me,
char  type 
)

Adds a name to the apop_name structure. Puts it at the end of the given list.

Parameters:
n An existing, allocated apop_name structure.
add_me A string. If NULL, do nothing; return -1.
type 'r': add a row name
'c': add a column name
't': add a text category name
'h': add a title (or a header. 't' is taken).
'v': add (or overwrite) the vector name
Returns:
Returns the number of rows/cols/depvars after you have added the new one.
apop_name* apop_name_alloc ( void   ) 

Allocates a name structure

Returns:
An allocated, empty name structure.
apop_name* apop_name_copy ( apop_name in  ) 

Copy one apop_name structure to another. That is, all data is duplicated. Usage:

Parameters:
in the input names
Returns:
a structure that this function will allocate and fill
void apop_name_cross_stack ( apop_name n1,
apop_name nadd,
char  type1,
char  typeadd 
)

Deprecated. Use apop_name_stack.

int apop_name_find ( apop_name n,
char *  in,
char  type 
)

Finds the position of an element in a list of names.

The function uses case-insensitive regular expressions to search.

For example, "p.val.*" will match "P value", "p.value", and "p values".

Parameters:
n the apop_name object to search.
in the name you seek; see above.
type 'c', 'r', or 't'. Default is 'c'.
Returns:
The position of findme. If 'c', then this may be -1, meaning the vector name. If not found, returns -2.
void apop_name_free ( apop_name free_me  ) 

Erases an apop_name structure.

void apop_name_print ( apop_name n  ) 

Prints the given list of names to STDOUT

Parameters:
n the apop_name structure
void apop_name_stack ( apop_name n1,
apop_name nadd,
char  type1,
char  typeadd 
)

Append one list of names to another.

Notice that if the first list is NULL, then this is a copy function. If the second is NULL, it is a no-op.

Parameters:
n1 The first set of names (no default, must not be NULL)
nadd The second set of names, which will be appended after the first. (no default, if NULL, a no-op)
type1 Either 'c', 'r', 't', or 'v' stating whether you are merging the columns, rows, or text. If 'v', then ignore typeadd and just overwrite the target vector name with the source name. (default = 'r')
typeadd Either 'c', 'r', 't', or 'v' stating whether you are merging the columns, rows, or text. If 'v', then overwrite the target with the source vector name. (default = type1)

SourceForge.net Logo

Autogenerated by doxygen on 23 Nov 2009.