<< Click to Display Table of Contents >> Navigation: »No topics above this level« What's new in SMILE 2 |
Major new features in SMILE 2 are:
•Support for metalog distributions in continuous nodes. There is no new API for metalog distributions, equation nodes can use Metalog and MetalogA functions in their equations. For details, see the metalog entry in the Random Number Generators section.
•Discrete nodes with outcomes based on numeric intervals or point values. See the Discrete nodes and numeric domains section for details.
•Qualitative De Morgan nodes, documented in the Qualitative models section.
•Diagnosis API, documented in the Diagnosis section.
•C++ 11 support. It is now possible to use range-based for loops with SMILE arrays and matrices. The arrays and matrices can be intialized with std::initializer_list. Some frequently used methods, like DSL_nodeDef::SetDefinition can also directly use std::initializer_list as input.
•Two new method overloads were added to enable quick prototyping: DSL_network::GetNode(const char *nodeId) and DSL_nodeVal::SetEvidence(const char *outcomeId). It is now possible to set evidence by specifying a pair of string identifiers (node identifier and outcome identifier) in one line: net.GetNode("nodeId")->Val()->SetEvidence("outcomeId").
•New template methods were added to DSL_node class in order to eliminate the need to explicitly static_cast the returned pointer to the correct node definition/node value class. For more details, see Node definition and Node value & evidence sections.
•Shorter and more consistent API names. One of the SMILE 2 development goals was to make the user code shorter and more consistent. In order to achieve that goal, we changed some class and method names. To keep the backward compatibility as close to 100% as possible, SMILE 2.x uses typedefs and inline methods to ensure that SMILE 1.x-based programs compile and run correctly. The backward compatibility is enabled by default. It can be suppressed by defining the SMILE_NO_V1_COMPATIBILITY pre-processor macro before #include "smile.h". For new projects, we recommend blocking the backward compatibility.
The table below lists the changed names.
SMILE 1.x |
SMILE 2 |
---|---|
DSL_node::Definition |
DSL_node::Def |
DSL_node::Value |
DSL_node::Val |
DSL_nodeDefinition |
DSL_nodeDef |
DSL_nodeDefinition::GetOutcomesNames |
DSL_nodeDef::GetOutcomeIds |
DSL_nodeValue |
DSL_nodeVal |
DSL_list |
DSL_decision |
DSL_table |
DSL_utility |
DSL_valEqEvaluation |
DSL_equationEvaluation |
DSL_simpleCase |
DSL_case |