Constructors and Initialization

Typically, every matrix class has the following constructors:

All constructors except for the pure size allocation constructor come with full initialization and are also available in the form of init() methods so that matrices can be reinitialized at any time after construction. init() routines and all other matrix operations keep the matrix internally in an initiliazed state.

The pure allocation constructor also has an equivalent method called newsize(). The method newsize() only takes care of allocating sufficient memory and does not initialize the elements. Again, this is only recommended if efficiency is of high relevance and the matrix is immediatly initiliazed afterwards. in this case the user should declare the matrix initialized immediately after construction via the method set_init(true) in order to avoid error messages, e.g., when indexing the elements.

If matrix operations are performed on matrices that are not in initilized state, the code will stop with an error if DEBUG has been defined during compilation. The method get_init() returns the current initialization status of the matrix, but it alway returns true if DEBUG has not been defined during compilation.