caseposn_bn WriteNetFindings_bn ( const nodelist_bn*  nodes,   stream_ns*  file,   long  ID_num,   double  freq )

Saves in file the set of findings currently entered in nodes, so that later they can be read back with ReadNetFindings2_bn.

It saves findings of discrete nodes and values of continuous nodes, but not likelihood findings, or negative findings (i.e., findings which say that a node is not in some state).

If file already exists, this will add the case to it (unless it is not a case file, in which case an error will be generated). If you wish to write over the existing file, delete it before calling this.

The first case determines what columns will be included in the file. Each node in nodes will become one column.

Pass -1 for ID_num and/or freq if you do not want columns for them to appear in the case file. If any cases will need them, they must be included in the first case written to the file.

It returns the file position of the new case (which can later be passed to ReadNetFindings2_bn).

It only saves findings from the nodes of nodes, and if the file already exists, it won't save findings from any of nodes that were not included in the node list used to first construct the file.

It is advised to give case files the extension ".cas" (i.e., the file name passed to NewFileStream_ns ends with ".cas"). That way they can be more easily identified by the Netica Application program.

You can control the characters Netica uses to separate findings, and to indicate a finding is absent, with the functions SetCaseFileDelimChar_ns and SetMissingDataChar_ns, respectively.

Netica won't modify or free the passed nodes list.

Version:

This function is available in all versions.
In versions previous to 2.26, this function was named WriteCase_bn.

See also:

ReadNetFindings2_bn    Reads back the case that WriteNetFindings_bn saves
WriteNet_bn    Saves the whole net, including findings
SetCaseFileDelimChar_ns    Controls which character Netica uses to separate findings
SetMissingDataChar_ns    Controls which character Netica uses to indicate a node has no finding
NewNodeList2_bn    Creates the node list

Example:

See ReadNetFindings2_bn