Functions

K:/Projects/scplusplus/gpl_releases/frtw/src/vector.c File Reference

Multi-Dimensional Vector Source for the FRTW C Library. More...

#include "vector.h"
Include dependency graph for vector.c:

Go to the source code of this file.

Functions

vector vector_2D ()
 Constructs a 2 dimensional vector and returns it.
vector vector_2D_Set (const long x, const long y)
 Constructs a 2 dimensional vector and returns it.
vectorvectorArray_2D (const size_t size)
 Constructs a 2 dimensional vector and returns it.
long getComponent (const vector inVector, const int j)
 Returns the $ x_j $ coordinate/component of the vector.
void setComponent (vector inVector, const int j, const long value)
 Sets component j of inVector to value provided.
long getX (const vector inVector)
 Returns the x component of the vector inVector.
void setX (vector inVector, const long value)
 Sets the x component of the vector inVector.
long getY (const vector inVector)
 Returns the y component of the vector inVector.
void setY (vector inVector, const long value)
 Sets the y component of the vector inVector.
void setXY (vector inVector, const long xValue, const long yValue)
 Sets the x and y components of the vector inVector.
void free_vector (vector vec)
 Free/Deallocates memory of the vector vec.
void free_vectorArray (vector *matrix, const size_t size)
 Free/Deallocates memory used by vector array provided.

Detailed Description

Multi-Dimensional Vector Source for the FRTW C Library.

FRTW Vector Library

This object provides various Vector operations/methods. This wraps the array object to provide vector functionality.

This file is part of FRTW Library.

FRTW is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

FRTW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with FRTW. If not, see <http://www.gnu.org/licenses/>.

Author:
Shekhar S. Chandra, 2008-9

Definition in file vector.c.