GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ialloc.c File Reference

Matrix memory management functions. More...

#include <stdlib.h>
#include <grass/gis.h>
Include dependency graph for ialloc.c:

Go to the source code of this file.

Functions

intG_alloc_ivector (size_t n)
 Vector matrix memory allocation. More...
 
int ** G_alloc_imatrix (int rows, int cols)
 Matrix memory allocation. More...
 
void G_free_ivector (int *v)
 
void G_free_imatrix (int **m)
 Matrix memory deallocation. More...
 

Detailed Description

Matrix memory management functions.

This program 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 2 of the License, or (at your option) any later version.

This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Author
GRASS GIS Development Team
Date
2004-2006

Definition in file ialloc.c.

Function Documentation

int ** G_alloc_imatrix ( int  rows,
int  cols 
)

Matrix memory allocation.

Allocate a matrix of rows by cols integers initialized to zero.

Parameters
[in]rowsnumber of rows in matrix
[in]colsnumber of columns in matrix
Returns
int **

Definition at line 58 of file ialloc.c.

int * G_alloc_ivector ( size_t  n)

Vector matrix memory allocation.

Allocate a vector (array) of n integers initialized to zero.

Parameters
[in]nsize of vector to allocate
Returns
integer *

Definition at line 41 of file ialloc.c.

Referenced by IL_interp_segments_2d(), and IL_resample_interp_segments_2d().

int G_free_imatrix ( int **  m)

Matrix memory deallocation.

Deallocate a matrix of integers.

Parameters
[in,out]mmatrix to free
Returns
void

Definition at line 99 of file ialloc.c.

References G_free(), and NULL.

void G_free_ivector ( int v)

Definition at line 81 of file ialloc.c.

References G_free(), and NULL.