MFKVector
[MFAtlas]

Collaboration diagram for MFKVector:


Classes

class  MFKVector
 A euclidean vector with that same dimension as a manifold. More...

Functions

MFKVector MFCreateKVector (int k, MFErrorHandler e)
 Creates a k-dimensional vector.
MFKVector MFCreateKVectorWithData (int k, double *c, MFErrorHandler e)
 Creates a k-dimensional vector.
void MFRefKVector (MFKVector s, MFErrorHandler e)
 Adds a reference to a k-dimensional vector.
void MFFreeKVector (MFKVector s, MFErrorHandler e)
 Removes a reference to a k-dimensional vector, and deletes it if the number of references becomes zero.
int MFKV_NC (MFKVector s, MFErrorHandler e)
 Returns k, the doimension of the k-vector.
double MFKV_C (MFKVector s, int i, MFErrorHandler e)
 Returns a coordinate value of a k-vector.
void MFKVSetC (MFKVector s, int i, double c, MFErrorHandler e)
 Changes a coordinate value of a k-vector.
double MFKVDot (MFKVector s0, MFKVector s1, MFErrorHandler e)
 Calculates the Euclidean inner product of two k-vectors.
double MFKVNorm (MFKVector s, MFErrorHandler e)
 Calculates the Euclidean norm of a k-vector.
void MFKVScale (double a, MFKVector s, MFErrorHandler e)
 Multiply a k-vector by a scalar. The result is placed back in s.
void MFKVScaleMul (double a, MFKVector s, MFKVector t, MFErrorHandler e)
 Multiply a k-vector by a scalar.
void MFKVDiff (MFKVector a, MFKVector b, MFKVector c, MFErrorHandler e)
 Find the difference of two k-vectors. The result is put in c.
void MFKVAdd (MFKVector, MFKVector s, MFKVector, MFErrorHandler e)
 Find the sum of two k-vectors. The result is put in c.
void MFWriteKVector (FILE *fid, MFKVector s, MFErrorHandler e)
 Write a k-vector to a file.
MFKVector MFReadKVector (FILE *fid, MFErrorHandler e)
 Read a k-vector from a file.

Function Documentation

MFKVector MFCreateKVector int  k,
MFErrorHandler  e
 

Creates a k-dimensional vector.

Parameters:
k The dimension.
e A place to return errors.
Returns:
A new k-vector.

MFKVector MFCreateKVectorWithData int  k,
double *  c,
MFErrorHandler  e
 

Creates a k-dimensional vector.

Parameters:
k The dimension.
c A list of k doubles to be the coordinates of the new vector. Values are copied, so the user should free the list of doubles when appropriate. The copy is deleted when the k-vector is deleted.
e A place to return errors.
Returns:
A new k-vector.

void MFFreeKVector MFKVector  s,
MFErrorHandler  e
 

Removes a reference to a k-dimensional vector, and deletes it if the number of references becomes zero.

Parameters:
s The k-vector.
e A place to return errors.

double MFKV_C MFKVector  s,
int  i,
MFErrorHandler  e
 

Returns a coordinate value of a k-vector.

Parameters:
s The k-vector.
i Which coordinate (btween 0 and k-1).
e A place to return errors.
Returns:
The requested coordinate value.

int MFKV_NC MFKVector  s,
MFErrorHandler  e
 

Returns k, the doimension of the k-vector.

Parameters:
s The k-vector.
e A place to return errors.

void MFKVAdd MFKVector  a,
MFKVector  b,
MFKVector  c,
MFErrorHandler  e
 

Find the sum of two k-vectors. The result is put in c.

Parameters:
a The first k-vector.
b The second k-vector.
c The sum: c=a+b.
e A place to return errors.

void MFKVDiff MFKVector  a,
MFKVector  b,
MFKVector  c,
MFErrorHandler  e
 

Find the difference of two k-vectors. The result is put in c.

Parameters:
a The first k-vector.
b The second k-vector.
c The difference: c=a-b.
e A place to return errors.

double MFKVDot MFKVector  s0,
MFKVector  s1,
MFErrorHandler  e
 

Calculates the Euclidean inner product of two k-vectors.

Parameters:
s0 The first k-vector.
s1 The second k-vector.
e A place to return errors.
Returns:
The inner product <s0,s1>.

double MFKVNorm MFKVector  s,
MFErrorHandler  e
 

Calculates the Euclidean norm of a k-vector.

Parameters:
s The k-vector.
e A place to return errors.
Returns:
The norm: sqrt(<s,s>)

void MFKVScale double  a,
MFKVector  s,
MFErrorHandler  e
 

Multiply a k-vector by a scalar. The result is placed back in s.

Parameters:
a The scalar.
s The k-vector.
e A place to return errors.

void MFKVScaleMul double  a,
MFKVector  s,
MFKVector  t,
MFErrorHandler  e
 

Multiply a k-vector by a scalar.

Parameters:
a The scalar.
s The k-vector.
t The product: t=a*s.
e A place to return errors.

void MFKVSetC MFKVector  s,
int  i,
double  c,
MFErrorHandler  e
 

Changes a coordinate value of a k-vector.

Parameters:
s The k-vector.
i Which coordinate (btween 0 and k-1).
c The new coordinate value.
e A place to return errors.

MFKVector MFReadKVector FILE *  fid,
MFErrorHandler  e
 

Read a k-vector from a file.

Parameters:
fid The file descriptor.
e A place to return errors.
Returns:
The k-vector.

void MFRefKVector MFKVector  s,
MFErrorHandler  e
 

Adds a reference to a k-dimensional vector.

Parameters:
s The k-vector.
e A place to return errors.

void MFWriteKVector FILE *  fid,
MFKVector  s,
MFErrorHandler  e
 

Write a k-vector to a file.

Parameters:
fid The file descriptor.
s The k-vector.
e A place to return errors.


Generated on Tue Jan 30 13:39:44 2007 for multifario by  doxygen 1.4.6