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

Utility functions for networks. More...

#include <net/ytNetUtils.h>

Public Member Functions

int ytNetUtils_checkConsistency (const ytNetwork *network, const ytData *data, const char *name)
 Checks if the nodes in the network are consistent with given ytData instance.
 
void ytNetUtils_countParentType (const ytData *data, int j, const int *parents, int q, int *nc, int *nd)
 Counts the maximum numbers of type specific parents for a single node.
 
void ytNetUtils_countParentTypes (const ytNetwork *network, const ytData *data, int *mp, int *mc, int *md)
 Counts the maximum numbers of type specific parents in a network.
 
void ytNetUtils_countParentTypes2 (const ytNetwork *network, const ytData *data, const int *rmap, int *mp, int *mc, int *md)
 Counts the maximum numbers of types of parents in a network with the node map.
 
int ytNetUtils_dataToNetMap (const ytData *data, const ytNetwork *network, int *map)
 Sets a map of indices from the data to the network.
 
int ytNetUtils_netToDataMap (const ytNetwork *network, const ytData *data, int *map)
 Sets a map of indices from the network to the data.
 

Detailed Description

Utility functions for networks.

See also
ytNetwork

Member Function Documentation

◆ ytNetUtils_checkConsistency()

int ytNetUtils_checkConsistency ( const ytNetwork network,
const ytData data,
const char *  name 
)

Checks if the nodes in the network are consistent with given ytData instance.

Parameters
namemodule name for error output. NULL acceptable.
Returns
non zero if not consistent, or 0 if consistent.

◆ ytNetUtils_countParentTypes()

void ytNetUtils_countParentTypes ( const ytNetwork network,
const ytData data,
int *  mp,
int *  mc,
int *  md 
)

Counts the maximum numbers of type specific parents in a network.

Parameters
[out]mpThe maximum number of parents.

◆ ytNetUtils_countParentTypes2()

void ytNetUtils_countParentTypes2 ( const ytNetwork network,
const ytData data,
const int *  rmap,
int *  mp,
int *  mc,
int *  md 
)

Counts the maximum numbers of types of parents in a network with the node map.

Parameters
rmapindex map from network to data.
[out]mp
[out]mc
[out]md

◆ ytNetUtils_dataToNetMap()

int ytNetUtils_dataToNetMap ( const ytData data,
const ytNetwork network,
int *  map 
)

Sets a map of indices from the data to the network.

Parameters
data
network
Returns
the number of mapped (found) variables.

◆ ytNetUtils_netToDataMap()

int ytNetUtils_netToDataMap ( const ytNetwork network,
const ytData data,
int *  map 
)

Sets a map of indices from the network to the data.

Returns
the number of mapped (found) nodes.

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