Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
mutable is a Keyword to indicate that a class variable can be changed in a const member function.
In class design mutable variables say nothing about a class, but are used for bookkeeping tasks.
When a neural network responds to a certain input, it will produce a certain output. The flow of information from input layer to output layer is called propagation. During propagation, the neural network must not be changed. Therefore, in class design the propagation member function must be a const member function. If the last input must be stored (for back-propagation for example), this must be done with mutable.
struct Input { /* some structure to store neural net inputs */ }; |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
This page has been created by the tool CodeToHtml