Class GroovyGenerator

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.scripting.FileBasedScripting, adams.core.scripting.FileBasedScriptingWithOptions, adams.core.SizeOfHandler, NetworkGenerator, adams.flow.core.FlowContextHandler, Serializable

    public class GroovyGenerator
    extends AbstractScriptedNetworkGenerator
    Uses Groovy to generate the network.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_GeneratorObject

        protected transient NetworkGenerator m_GeneratorObject
        the loaded script object.
      • m_InlineScript

        protected adams.core.scripting.GroovyScript m_InlineScript
        the inline script.
    • Constructor Detail

      • GroovyGenerator

        public GroovyGenerator()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractScriptedNetworkGenerator
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractScriptedNetworkGenerator
        Returns:
        null if no info available, otherwise short string
      • scriptOptionsTipText

        public String scriptOptionsTipText()
        Returns the tip text for this property.
        Specified by:
        scriptOptionsTipText in interface adams.core.scripting.FileBasedScriptingWithOptions
        Overrides:
        scriptOptionsTipText in class AbstractScriptedNetworkGenerator
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • getDefaultInlineScript

        protected adams.core.scripting.GroovyScript getDefaultInlineScript()
        Returns the default inline script.
        Returns:
        the default script
      • setInlineScript

        public void setInlineScript​(adams.core.scripting.GroovyScript value)
        Sets the inline script to use instead of the external script file.
        Parameters:
        value - the inline script
      • getInlineScript

        public adams.core.scripting.GroovyScript getInlineScript()
        Gets the inline script to use instead of the external script file.
        Returns:
        the inline script
      • inlineScriptTipText

        public String inlineScriptTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • doGenerate

        protected ai.djl.nn.Block doGenerate​(ai.djl.basicdataset.tabular.TabularDataset dataset)
        Generates the network using the supplied dataset.
        Specified by:
        doGenerate in class AbstractNetworkGenerator
        Parameters:
        dataset - the dataset to generate the network for
        Returns:
        the network
      • destroy

        public void destroy()
        Frees up memory in a "destructive" non-reversible way.
        Specified by:
        destroy in interface adams.core.Destroyable
        Overrides:
        destroy in class AbstractScriptedNetworkGenerator