Blitz logo

Blitz Support :

From: Jonathan Stickel (jjstickel_at_[hidden])
Date: 2003-11-06 12:29:20


This is a notation issue and not specific to Blitz.

Some people find it convenient to define all vectors as either being row
vectors or column vectors. This way matrix/vector operations can all be
defined using only add, mult, transpose, and inverse. It seems that
people who study linear algebra tend to use this convention.

Others say that a vector is just a list of values and contains no
information regarding whether it is a column or a row. Matrix/vector
operations must then include special notation indicating inner products
vs. outer products, etc. Tensor notation is an example of this convention.

The Blitz++ package uses the later convention, while Matlab strictly
adheres to the former. If you prefer defining vectors as either being a
row or column, you can do so in Blitz by defining them as 2D arrays but
having either 1 row or 1 column.

Hope this helps.

Jonathan

mctimes wrote:
>>Also, TinyVector is a vector. It is upto you to interpret it
>>as row or column vector.
>
> Take this example, if I am going to take the product of a NxM matrix and
> a vector. For validity, we must make sure the vector is of the size Mx1
> (a column vector). In this case, the vector should be a column vector
> however we can also treated it as a row vector.
>
> Consider the product of two vectors V1 and V2. if both vectors are row
> (column) vector, the product should return a scalar. if V1 is of Nx1 and
> V2 is of 1xM, the product should return a NxM matrix.
>
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
>