lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/3/18 Leo Razoumov <slonik.az@gmail.com>:
> On Thu, Mar 17, 2011 at 17:08, Francesco Abbate <francesco.bbt@gmail.com> wrote:
>>
>> Probably the distinction between matrix and view is done in GSL just
>> to enforce the clarity and readability in the code but I'm not
>> entirely sure that it is actually a good idea.
>>
>
> In GSL, the difference between matrix and matrix_view is the ownership
> semantics. matrix_veiw does not own a data block (owner flag is always
> 0) and cannot deallocate a matrix. It is used when you want to
> temporarily work with sub-matrixes or treat a matrix as a vector or
> vice versa.

I understand that but in the gsl_matrix and gsl_vector struct we have
a field that indicates if the matrix is the owner of the block or not
so the dinstictions between a matrix and a view seems to be purely
formal.

But this is quite OT now... I fear the most people in the list are not
interested to this discussion.

-- 
Francesco