matrix.h

00001 /***************************************************************************
00002  *   Copyright (C) 2011 by Roberto Gori   *
00003  *   agr0@node342   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 //matrix.h
00021 #ifndef _matrix_h_
00022 #define _matrix_h_
00023 
00024 
00025 typedef double ValType; /* tipo in virgola mobile */
00026 
00027 typedef struct 
00028 {
00029   int nrows, ncols;
00030   ValType *values;
00031 } Matrix;
00032 
00033 
00034 Matrix* AllocateMatrix(int nrows, int ncols);
00035 void SetMatrixValue(Matrix *mat, int i, int j, ValType value);
00036 ValType GetMatrixValue(Matrix *mat, int i, int j);
00037 
00038 void PrintMatrix(Matrix *mat);
00039 void FreeMatrix(Matrix *mat);
00040 
00041 #endif

Generated on Wed Mar 30 09:03:02 2011 for qtdvaall.kdevelop by  doxygen 1.6.1