Sunday 27 November 2011

The Matrix, Is Out There

After getting started with the new matrix implementations, having the input parameters as a list of matrices is turning out to be a bit more of a pain than anticipated.

The main downside is the fact that we now have to iterate through the list of matrices in order to perform add(), subtract(), multiply() on each.  We also have to save the results of the previous additions and pass those on for the next set. Something like this:





I haven't run any speed tests but this seems like it may be slow, but for now it will have to do.

Now for my two concerns regarding the API and reality.

  1. Our add(), subtract(), and multiply() functions all take 2 parameters, ml, the list of matrices and result, the optional variable in which we will store our result.  The API specifies that if the list is only one matrix long then we will return the one matrix.  What if the result parameter has values in it and the list only has one matrix? then we will not add the two properly.  Maybe this will never happen, ill wait to ask in iRC.
  2. The inverse(m) function returns the inverse of the given matrix.  A square matrix will only have an inverse if the determinant of that matrix is not zero.  This situation is not covered in the api.
That is about it for now, going to get these cleared up and then move forward.

Thursday 24 November 2011

Boys Are Back In Town

So I've managed to get myself in gear and get contributing to Math.Gladius again.  The math library underwent a massive refactoring in which it was broken down in to small chunks consisting of a script for each size of Vector and Matrix object.

When I left off, work had been completed to Vector through to Vector4 tests included.  Now I am beginning to work on the Matrix functions. There are a few differences in the way we deal with matrices, such as the operation functions (+, -, /, *) taking a list of matrices.

Check it out: https://github.com/alankligman/gladius.math/wiki/Math-api-reference

I will assume the input is always valid, so from there I'll just have to figure out a clever way of:
  • Finding out how many Matrices there are in the list
  • Performing the required operation quickly and efficiently
I'll have more later tonight.

Thursday 10 November 2011

Motivation, Or Lack Therof

Well, during the last month I found myself more and more regularly making excuses not to work on my blog and open source project.  I believe a lack of motivation and poor performance in my remaining 5 courses have lead me to this point.

Now that I have caught up with other assignments for the most part, its time to get back to work on open source.

My first order of business was to get involved with Mozilla Firefox by trying to understand the build process.

This task was much more difficult than initially anticipated, partly because of the Windows machine I am working on. I have a virtual Linux machine which i will also try it on. More specifics coming right up.