MachineIntelligenceCore:Visualization
OpenGLTrainThenTestApplication.cpp
Go to the documentation of this file.
1 
24 
25 namespace mic {
26 namespace opengl {
27 namespace application {
28 
29 
31 {
32  // Start from learning.
33  APP_STATE->setLearningModeOn();
34 }
35 
37  // If learning mode.
38  if (APP_STATE->isLearningModeOn()) {
39  // Perform learning - until there is something to learn.
40  if (!performLearningStep()) {
41  APP_STATE->setLearningModeOff();
42  }
43  } else {
44  // Perform testing - until there is something to test.
45  if (!performTestingStep())
46  return false;
47  }//: else
48 
49  return true;
50 }
51 
52 
53 
54 
55 } /* namespace application */
56 } /* namespace opengl */
57 } /* namespace mic */
An abstract class implementing basic functions for two-threaded, OpenGL-based applications. Introduces the execution phases that are typical for all learning/classification applications, imposes fine code granulation.