/* ============================================================================== This is an automatically generated GUI class created by the Introjucer! Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. Created with Introjucer version: 3.1.0 ------------------------------------------------------------------------------ The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-13 by Raw Material Software Ltd. ============================================================================== */ #ifndef __JUCE_HEADER_9002020A4DD09B20__ #define __JUCE_HEADER_9002020A4DD09B20__ //[Headers] -- You can add your own extra header files here -- #include "JuceHeader.h" #include "DrawComponent.h" #include "LayerArray.hpp" #include "RbmComponent.h" //[/Headers] //============================================================================== /** //[Comments] An auto-generated component, created by the Introjucer. Describe your class and how it works here! //[/Comments] */ class MainComponent : public Component, public RbmComponentListener, public LayerArrayListener, public Thread, public ButtonListener, public SliderListener, public LabelListener, public ComboBoxListener { public: //============================================================================== MainComponent (); ~MainComponent(); //============================================================================== //[UserMethods] -- You can add your own custom methods in this section. void onChanged(const LayerArray &obj) override; void onProgressChanged(size_t progressPercent) override; //[/UserMethods] void paint (Graphics& g); void resized(); void buttonClicked (Button* buttonThatWasClicked); void sliderValueChanged (Slider* sliderThatWasMoved); void labelTextChanged (Label* labelThatHasChanged); void comboBoxChanged (ComboBox* comboBoxThatHasChanged); void mouseMove (const MouseEvent& e); void mouseEnter (const MouseEvent& e); void mouseExit (const MouseEvent& e); void mouseDown (const MouseEvent& e); void mouseDrag (const MouseEvent& e); void mouseUp (const MouseEvent& e); void mouseDoubleClick (const MouseEvent& e); void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel); private: //[UserVariables] -- You can add your own custom variables in this section. static const size_t DBN_SIZE = 4; ScopedPointer m_weights[DBN_SIZE]; ScopedPointer m_pRbmComponent[DBN_SIZE]; Weights *m_weightsCurr; RbmComponent *m_pRbmComponentCurr; LayerArray m_layers; MatrixXd m_trainingData; void save(); void create(juce::String const &projectName=""); void destroy(); const juce::String& getBaseDir(); void run(); String m_baseDir; TooltipWindow m_toolTipWindow; bool m_doStop; void clearTraining() { m_layers.clear(); } void loadTraining(const char *pFilename) { m_layers.clear(); m_layers.load(pFilename); } void saveTraining(const char *pFilename) { m_layers.save(pFilename); } void removeTrainingAt(size_t index) { m_layers.removeAt(index); } void updateControls(); //[/UserVariables] //============================================================================== ScopedPointer trainButton; ScopedPointer addButton; ScopedPointer patterSlider; ScopedPointer ShakeButton; ScopedPointer WeightsSlider; ScopedPointer