Module: Nimbus
- Defined in:
- lib/nimbus.rb,
lib/nimbus/tree.rb,
lib/nimbus/forest.rb,
lib/nimbus/version.rb,
lib/nimbus/exceptions.rb,
lib/nimbus/individual.rb,
lib/nimbus/application.rb,
lib/nimbus/training_set.rb,
lib/nimbus/configuration.rb,
lib/nimbus/loss_functions.rb,
lib/nimbus/regression_tree.rb,
lib/nimbus/classification_tree.rb
Overview
Nimbus module. Used as a namespace containing all the Nimbus code. The module defines a Nimbus::Application and interacts with the user output console.
Defined Under Namespace
Modules: LossFunctions Classes: Application, ClassificationTree, Configuration, ConfigurationError, Error, Forest, ForestError, Individual, IndividualError, InputFileError, InvalidOptionError, RegressionTree, TrainingSet, Tree, TreeError, WrongFormatFileError
Constant Summary collapse
- STDERR =
$stderr
- STDOUT =
$stdout
- VERSION =
"2.2.1"
Class Method Summary collapse
-
.application ⇒ Object
Current Nimbus Application.
-
.application=(app) ⇒ Object
Set the current Nimbus application object.
-
.clear_line! ⇒ Object
Clear current console line.
-
.error_message(msg) ⇒ Object
Writes message to the error output.
-
.message(msg) ⇒ Object
Writes message to the standard output.
-
.stop(msg = "Error: Nimbus finished.") ⇒ Object
Stops the execution of the Nimbus application.
-
.write(str) ⇒ Object
Writes to the standard output.
Class Method Details
.application ⇒ Object
Current Nimbus Application
28 29 30 |
# File 'lib/nimbus.rb', line 28 def application @application ||= ::Nimbus::Application.new end |
.application=(app) ⇒ Object
Set the current Nimbus application object.
33 34 35 |
# File 'lib/nimbus.rb', line 33 def application=(app) @application = app end |
.clear_line! ⇒ Object
Clear current console line
62 63 64 65 66 |
# File 'lib/nimbus.rb', line 62 def clear_line! self.write "\r" self.write(" " * 50) self.write "\r" end |
.error_message(msg) ⇒ Object
Writes message to the error output
50 51 52 53 |
# File 'lib/nimbus.rb', line 50 def (msg) STDERR.puts msg STDERR.flush end |
.message(msg) ⇒ Object
Writes message to the standard output
44 45 46 47 |
# File 'lib/nimbus.rb', line 44 def (msg) STDOUT.puts msg STDOUT.flush end |
.stop(msg = "Error: Nimbus finished.") ⇒ Object
Stops the execution of the Nimbus application.
38 39 40 41 |
# File 'lib/nimbus.rb', line 38 def stop(msg = "Error: Nimbus finished.") self. msg exit(false) end |