|
<< Click to Display Table of Contents >> Navigation: Using SMILE Wrappers > Input and output |
SMILE supports two types of network I/O: string-based and file-based.
The native format for SMILE networks is XDSL. This format is XML-based, and its definition schema is available on the BayesFusion documentation website (http://support.bayesfusion.com/docs/). When a network is saved in this format, the .xdsl file extension must be used. XDSL is the only format supported by string-based I/O methods. File-based methods support additional formats; however, depending on the level of feature compatibility between SMILE and third-party software, some information may be lost during conversion.
If an error occurs during an I/O operation (such as when a non-existent file is specified), an exception will be thrown.
The following methods of the Network class are used for input and output:
Python
read_file(xdsl_file: str) -> None
write_file(xdsl_file: str) -> None
read_string(xdsl_string: str) -> None
write_string() -> str
Java
void readFile(String fileName)
void writeFile(String fileName)
void readString(String xdslString)
String writeString()
C#
void ReadFile(string fileName)
void WriteFile(string fileName)
void ReadString(sting xdslString)
string WriteString()
R
readFile(fileName)
writeFile(fileName)
readString(xdslString)
xdslstring <- writeString()