INGOR
|
Structure search algorithm related utility functions. More...
#include <algo/Algo.h>
Public Member Functions | |
ytGraph * | Algo_readGraph (char *file, char *type, ytKeyValues *args, ytData *data, ytGraph *G) |
Reads a graph from a file with respect to the specified data. | |
void | Algo_setNetworkProperties (Score *score, ytNetwork *network, const char *filename) |
Calculates the node and edge properties and sets to the ytNetwork instance. | |
ytGraph * | Algo_readGraphData (char *file, char *type, ytKeyValues *args, ytData *data, int fill, ytGraph *g) |
Reads a graph from file with respect to specified data. | |
Structure search algorithm related utility functions.
ytGraph * Algo_readGraph | ( | char * | file, |
char * | type, | ||
ytKeyValues * | args, | ||
ytData * | data, | ||
ytGraph * | G ) |
Reads a graph from a file with respect to the specified data.
This can be used only for reading a constrain graph.
Node IDs are converted based on the specified data.
Available types and their arguments
parents
col=
n : Column position of the nodes in the TAB separated file. The first column is n=0. no_parents
col=
n : Column position of the nodes in the TAB separated file. The first column is n=0. not_found=restrict
: By default, nodes not found in the read graph are connected to all the other nodes. This is to not restrict edges for nodes not found in the file for generating the constrain file. If this is specified, such edge are not connected. Therefore they are restricted. file | File name to read. |
type | One of parents , no_parents , or arbitrary file format names. See Network File Formats for the avaiable network file formats. |
args | Type specific arguments. |
G | ytGraph instance to merge. NULL acceptable. If specified, the read graph and G are merged and returned. The specified instance will be deleted. |
ytGraph * Algo_readGraphData | ( | char * | file, |
char * | type, | ||
ytKeyValues * | args, | ||
ytData * | data, | ||
int | fill, | ||
ytGraph * | g ) |
Reads a graph from file with respect to specified data.
file | file name of the network file to read. |
type | type of network file. NULL can be acceptable. If so, tries to determine the type by the file name suffix. |
args | file type specific arguments. |
data | data set defining node sets for the returning graph. |
fill | Specify a non zero value if you want to fill edges from or to variables that exists in the given data set but does not in the given network file. This is maily used for preparing a constraint graph. |
Calculates the node and edge properties and sets to the ytNetwork instance.
If filename is non-NULL, input data matrix, target data matrix, partial residual matrix, and log likelihood matrix are output into the specified file with suffixes .X
, .Y
, PR.Y
, and LL
.