class logic_base : public real_function

logic_base is the base class of logic modules

Inheritance:


Public Methods

virtual adlib_real get_false_val( void )
Get the value representing false
virtual adlib_real get_true_val( void )
Get the value representing true
virtual bool is_false( const adlib_real val )
Test if the value is false
virtual bool is_true( const adlib_real val )
Test if the value is true
logic_base( const string& name_arg, const module* parent_arg, const string& mod_type, size_t inputs )
Constructor of logic_base class
virtual void sub_sub_load( void )
When setting parameters are updated, sub_sub_load sets default values of all the inputs
~logic_base( void )
Destructor

Protected Fields

adlib_real false_val
Numerical value representing false
adlib_real threshold
Threshold of the logic test, if val > threshold, then true
adlib_real true_val
Numerical value representing true

Protected

Default values
static const adlib_real THRESHOLD_DEF
static const adlib_real TRUE_DEF
static const adlib_real FALSE_DEF

Documentation

logic_base is the base class of logic modules.

logic modules accept type of real inputs and each module generates an output of type real. An input value is TRUE if input > "threshold". When an output represents a logical true or false, numerical values "true_val" and "false_val" are used for each state. The preset values for these parameters are as follows and they can be chaged as settings. threshold = 0.9, true_val = 5, false_val = 0.

logic_base( const string& name_arg, const module* parent_arg, const string& mod_type, size_t inputs )
Constructor of logic_base class.

Constructor registers three parameters, threshold, true_val and false_val, and sets defaul values of all inputs to true_val.

Parameters:
name_arg - the name of the module (e.g., "logic_board_No1")
parent_arg - the pointer to the parent module, usually a box.
module_type - the name of the module type (e.g., "and", "or")
inputs - number of inputs to this module

~logic_base( void )
Destructor

virtual void sub_sub_load( void )
When setting parameters are updated, sub_sub_load sets default values of all the inputs

virtual bool is_true( const adlib_real val )
Test if the value is true

virtual bool is_false( const adlib_real val )
Test if the value is false

virtual adlib_real get_true_val( void )
Get the value representing true

virtual adlib_real get_false_val( void )
Get the value representing false

adlib_real threshold
Threshold of the logic test, if val > threshold, then true

adlib_real true_val
Numerical value representing true

adlib_real false_val
Numerical value representing false

Default values
Default settings of the three parameters.

static const adlib_real THRESHOLD_DEF

static const adlib_real TRUE_DEF

static const adlib_real FALSE_DEF


Direct child classes:
logic_switch
logic_or
logic_not
logic_greater
logic_and

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de