Here is an idea; and if anyone writes this, they should give me a loan for a loan! Auto build in arbitrary matrix patterns, so these matrices are not mathematical types, but rather a type of storage or structure. Depending on the template parameters, these matrices can be as simple as a scalar value, as complex as an almost infinite-dimensional object, in theory, if a computer can allow it without running out of memory, but in practice this will be limited by architecture, OS and compilers internal details of the size of their integer or integer type. Thus, you may have a small dimensional three-dimensional matrix, which is 3. The sizes are not exhausted, because it may look like this: Matrix<type, 1000000000,1000000000,1000000000> matOutOfBounds before a much larger dimensional matrix looks such as Matrix<type, 2,2,2,2,2,2,2,2> , which is an 8D volumetric matrix. Simplification can be performed if they are “ideal matrices”. This is where each dimension has the same number of elements, no matter how many sizes they have. For example: <3,3> <3,3,3> <3,3,3,3> - all ideal matrices. The simplification would be Matrix<type, 4^4> the same as Matrix<type, 4,4,4,4> , giving a 4x4x4x4 4D volumetric matrix with 96 elements in a 4D structure. Where the "Matrix" will be a three-dimensional volumetric matrix with many elements, but has a three-dimensional volumetric structure, since our current clocks and compasses work so that from 360 degrees to a full circle, 60 minutes, 60 seconds, except that there are many elements storing floats.
This below will look like a possible C ++ library that someone will include in their projects; but the idea here makes it an embedded language. Then anyone with your language and compiler can use them as they see fit. They can use them with any number of dimensions, for example, with the image of this template:
Now what I showed is the current C ++ syntax for variable templates. The idea here would be that such types of matrix containers would be built in types!
Want to make them math? Of course, this is good, but the user will have to define their own “algorithms, methods, functions or routines” for this.
The reason they should be determined independently is as follows:
mat<float, 3,3,3> mat1; 3x3x3 3D Volumetric Matrix - 27 elements mat<float, 5,5> mat2; 5x5 2D Linear-Quadratic (Area) Matrix - 25 elements mat<int, 6,7,8> mat3; 6x7x8 3D Volumetric Matrix - 336 elements mat<bool, 8> mat4; 1x8 1D Linear Matrix (Array); transpose? mat4::transpose;
Because of the properties of how matrices are, what determines what type of mathematical operations can be done for them to be done from the outside.