1-dim array instead of matrix

Around 5 times faster with array operations instead of matrix.
1-dim array completed
Merge pull request #1 from johalnes/1-dim-Array

1 dim array