Spark! Fuzzy Logic Editor Help


Variables | Sets | Rules | API | Integration | Tutorial


SparkModel() or SparkModelWrapper()

Constructs a Spark! model.

SparkModel()
SparkModelWrapper()

Parameters

none

Return Value

none

Remarks

Default (and only) constructor for the SparkModel (and SparkModelWrapper) class.  To fully create a SparkModel object you must perform two steps:

  1. Create the object
  2. Load a model via the load() function      

FAQ

Q: What is the difference between SparkModel and SparkModelWrapper?
A: See Important Thing #1

Q: Why not just pass in the same parameters as you to do load and avoid the two step construction process?
A: Constructors can't return a status to the caller.  This makes it difficult to convey that an error occurred.  We could throw an exception but it many developers don't catch exceptions (most don't even check return codes!).  Exception blocks can also limit the scope of any variables declared in them, making them inaccessible to code outside the blocks.