Eversor11 / TiraLabra

Tira harjoitustyö: Matriisilaskin
0 stars 0 forks source link

Code review #1

Open martinradev opened 10 years ago

martinradev commented 10 years ago

I will start the code review. Additional comments will be done accordingly:

The project seems good, but there are a few things which may be good to consider: the array may be best to be repesented by objects and in the class of the object have those 2 dimensional arrays. Accordingly, this will give you the possibility to support vector operations like Cross product, dot product, etc. My review will continue, but have those in mind. I will be very interested to check the Straessen algorithm the following days.

martinradev commented 10 years ago

Tests have been run. All passed. The project runs on Ubuntu 12.04 with netbeans 8.0

martinradev commented 10 years ago

Normally, when using divide and conquer algorithms (Strassen's algorithm) it is a good idea to use the default (naive) way to compute the answer for smaller dimensions of the input. For example, if the matrix is of type 3x3 or smaller, then you could use the normal algorithm. This is also not the fastest solution you can use. Maybe you could consider the "Coppersmith–Winograd algorithm" which would be maybe too hard to implement.

martinradev commented 10 years ago

In some cases, it is very valuable to compute the power of a matrix. You could check exponentiation by squaring so that you compute it faster. Maybe you could also improve it by a constant factor for this case.

martinradev commented 10 years ago

Think also about singular value decomposition. It is quite useful in many advanced algorithms which do some kind of classification like LSA.

martinradev commented 10 years ago

I believe this is the end of the issue. Generally, the code is nice. I would like you to think about the topics I have given you and think about doing some work on them. It was hard to do a better review since everything was in Finnish (even variables and methods which is generally maybe a bad idea). I think that in the future it would be better for your career to focus on writing your code in English since possibly those are standards in most companies. Generally a nice project and possibly different than the others. If you need some kind of reference I would suggest Poole's Linear Algebra book. It has a lot of ideas regarding not only mathematics, but how to do approximations and computations of specific things in comp sci.