Class MTVector

Inherits from:
MTMatrix
Declared in:
../libmoltalk/MTVector.oh

Class Hierarchy

    MTMatrix
      |
      +---MTVector

Class Description

class Vector reprents a column vector,
a matrix with n (=dimensions) rows and a single column

Last modified:
16-May-2006 (../libmoltalk/MTVector.oh)

Method Index

Methods

+(MTVector*)vectorWithDimensions:(int)dim

create a new vector

-(id)add:(MTVector*)v2

add vector v2 to this one

-(double)angleBetween:(MTVector*)v2

calculates the angle between two vectors (in degrees)

-(double)atDim:(int)dim

get a value for a dimension

-(id)atDim:(int)dim value:(double)v

set a value for a dimension

-(id)copy

copy vector

-(NSString*)description

same as -toString

-(id)differenceTo:(MTVector*)v2

difference between two vectors returned as a new vector

-(int)dimension

return its dimension

-(double)euklideanDistanceTo: (MTVector*)v2

euklidean distance between two vectors

-(double)length

length of the vector

-(double)mixedProductBy:(MTVector*)v2 and:(MTVector*)v3

mixed product between three vectors

-(id)normalize

normalize (to length 1.0)

-(double)scalarProductBy: (MTVector*)v2

scalar product between two vectors

-(id)scaleByScalar:(double)scalar

multiply with scalar (in-place!)

-(id)setDimensions:(int)dim

recreate with new dimension.
WARNING: this is destructive

-(NSString*)toString

returns a string describing this vector

-(id)vectorProductBy: (MTVector*)v2

vector product between two vectors, returned as a new vector


generated 07-Jun-2006 by ObjcDoc 3.0.0