Appendices: SMILE Constants

From DSL

Jump to: navigation, search

In this appendix we show the constants that SMILE defines along with the header files in which they are defined. The constants listed here might be used and some of them are returned by functions as error conditions. There are many more constants defined in these files but they are not meant to be used and may be changed at any time.


Constants Defined in "general.h"

Name Value Notes
DSL_FALSE False
DSL_TRUE TRUE
DSL_FILE_LINE_LENGTH 1021 Maximum length of a line in a text file


Constants Defined in "errors.h"

Name Value Notes
DSL_OKAY 0 Nothing wrong has occured
DSL_GENERAL_ERROR -1 Non-trivial error has occured
DSL_OUT_OF_RANGE -2 Parameters of function not valid?
DSL_NO_USEFUL_SAMPLES -5 No useful samples were generated for some nodes node
DSL_CONFLICTING_EVIDENCE -26 The user tried to set evidence incompatible with current evidence
DSL_OUT_OF_MEMORY -42 Sorry. No more memory.
DSL_WRONG_NODE_TYPE -51 Attempt to call a method not supported for a given node type
DSL_WRONG_FILE -103 File specified for R/W is invalid
DSL_LEXICAL_ERROR -126 Lexical error found when reading a file
DSL_SYNTAX_ERROR -127 Syntactical error found when reading a file
DSL_OBJECT_NOT_READY -567 Attempt to use an object that is not ready
DSL_OBJECT_NOT_CONSISTENT -568 Attempt to use an object that is not consistent
DSL_INVALID_ID -1000 The specified id is not valid


Constants Defined in "constants.h"

Name Value Notes
File Formats
DSL_ERGO_FORMAT 1 To be used with ReadFile and WriteFile methods
DSL_NETICA_FORMAT 2 Same as above
DSL_INTERCHANGE_FORMAT 3 Same as above
DSL_DSL_FORMAT 4 Same as above
DSL_HUGIN_FORMAT 5 Same as above
DSL_XMLBIF_FORMAT 6 Same as above
DSL_KI_FORMAT 7 Same as above
DSL_XDSL_FORMAT 8 Same as above
BayesNet Algorithms
DSL_ALG_BN_LAURITZEN 0 To be used with SetDefaultBNAlgorithm and GetDefaultBNAlgorithm methods
DSL_ALG_BN_HENRION 1 Same as above
DSL_ALG_BN_PEARL 2 Same as above
DSL_ALG_BN_LSAMPLING 3 Same as above
DSL_ALG_BN_SELFIMPORTANCE 4 Same as above
DSL_ALG_BN_HEURISTICIMPORTANCE 5 Same as above
DSL_ALG_BN_BACKSAMPLING 6 Same as above
DSL_ALG_BN_AISSAMPLING 7 Same as above
DSL_ALG_BN_EPISSAMPLING 8 Same as above
DSL_ALG_BN_LBP 9 Same as above
DSL_ALG_BN_LAURITZEN_OLD 10 Same as above
Influence Diagram Algorithms
DSL_ALG_ID_COOPERSOLVING 0 Use with SetDefaultIDAlgorithm and GetDefaultIDAlgorithm methods
DSL_ALG_ID_SHACHTER 1 Same as above
Different types of Nodes
DSL_NUMBER_OF_NODE_TYPES 13 Number of different node definitions
DSL_NODE_TYPE_CPT 0
DSL_NODE_TYPE_TRUTHTABLE 1
DSL_NODE_TYPE_LIST 2
DSL_NODE_TYPE_TABLE 3
DSL_NODE_TYPE_EQUATION 4
DSL_NODE_TYPE_DISTRIBUTION 5
DSL_NODE_TYPE_NOISY_OR 6
DSL_NODE_TYPE_NOISY_AND 7
DSL_NODE_TYPE_MAU 8
DSL_NODE_TYPE_NOISY_MAX 9
DSL_NODE_TYPE_CAST 10
DSL_NODE_TYPE_EQUATION_SCC 12
Personal tools