clusterModule-class {goCluster} | R Documentation

## Class "clusterModule" represents the base class for all goCluster objects

### Description

This is the central class in `goCluster` and is being used to abstract the configuration and execution of `goCluster`-objects.

### Details

`goCluster` has been created as an object oriented package to build a modular structure that allows to easily modify and extend the functionality of the package. The `clusterModule`-class abstracts the configuration and execution of the different modules.

The `config`, `setup`, and `setup<-` methods can be used for the module configuration while the `execute` and `reset` methods are concerned with the execution of the objects.

For further information on extending `goCluster` and the internal structures you are referred to the "Developers Manual" of goCluster which is included in the package as a vignette.

### Slots

`config`:
  Object of class `"list"`. A list of functions that will be called by the `config` method of this object. The name of each list entry specifies the slot that will be set by the function.
`setup`:
  Object of class `"list"`. A list of functions that will be used by the `setup` and `setup<-` methods of this object. The `setup` method will only read the slot names and return the corresponding slots of the object as a list. Such a list can be used with the `setup<-` call in order to assign the configuration to a new `goCluster` object. The `setup<-` will use the functions stored in this list to verify that each setting is in the limits defined for this slot.
`execute`:
  Object of class `"function"`. This is the main function of the object that will be called from the `execute` function of this object.
`reset`:
  Object of class `"list"`. A list that names the slots which hold protected results and holds the empty value for each of these slots. In case any of these slots contains data, the `execute` function will fail on this object. The `reset` method will fill each of the slots with the corresponding empty value.
`children`:
  Object of class `"character"`. A vector of names that specifies the children of this object. This vector enables the different methods of a `clusterModule` to automatically recurse through a "tree" of objects.

### Methods

config
  `signature(object = "clusterModule")`: This will call the interactive setup for the object and iterate through the elements in the `config` slot.
execute
  `signature(object = "clusterModule")`: This will execute the object and all of its children.
execute<-
  `signature(object = "clusterModule")`: This will first call the `setup<-` method to set the configuration. Subsequently `execute` will be called. This method simplifies configuration and execution of a `goCluster` object to a single call.
reset
  `signature(object = "clusterModule")`: Resets the object by setting each of the slots named in the `reset` slot of this object to the corresponding element in that list.
setup
  `signature(object = "clusterModule")`: Return the configuration of the object as a list.
setup<-
  `signature(object = "clusterModule")`: Assigns the given list as a configuration to the object. The method will check each setting against the functions specified in the `setup` slot of this object.

### Author(s)

Gunnar Wrobel, work@gunnarwrobel.de, http://www.gunnarwrobel.de.

### See Also

`goCluster-class`,

[Package goCluster version 1.4.0 Index]