INGOR
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Algo Class Reference

Structure search algorithm related utility functions. More...

#include <algo/Algo.h>

Public Member Functions

ytGraphAlgo_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.
 

Detailed Description

Structure search algorithm related utility functions.

Member Function Documentation

◆ Algo_readGraph()

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.

Node IDs are converted based on the specified data.

Available types and their arguments

parents
The file is a TAB seperated text file. Each row corresponds to a node name. This returns a graph with edges that are connected from nodes in a file to all the other nodes in data. This is mainly designed to read a constain file where only listed nodes can be parents.
Arguments:
col=n : Column position of the nodes in the TAB separated file. The first column is n=0.
no_parents
The file is a TAB separated text file. Each row corresponds to a node name. This returns a graph with edges that are connected from node NOT in a file to all the other nodes in data. Arguments:
col=n : Column position of the nodes in the TAB separated file. The first column is n=0.
other arbitrary file formats listed in Network File Formats
The following argument is available in addition to the type specified arguments.
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.
Parameters
fileFile name to read.
typeOne of parents, no_parents, or arbitrary file format names. See Network File Formats for the avaiable network file formats.
argsType specific arguments.
GytGraph instance to merge. NULL acceptable. If specified, the read graph and G are merged and returned. The specified instance will be deleted.
Returns

◆ Algo_setNetworkProperties()

void Algo_setNetworkProperties ( Score score,
ytNetwork network,
const char *  filename 
)

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.


The documentation for this class was generated from the following file: