📄 sparse_disk.h
字号:
/* * This file is part of tomo3d * * Copyright (C) 2002, 2003, Sebastien Judenherc <sebastien.judenherc@na.infn.it> * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * */#ifndef _sparse_h#define _sparse_hstruct line_t { int index; float val; struct line_t *next;};struct matrix_t { int nl,nc; int lcache; float *cache; long offset; FILE *f;};int writematrix( /* FILE *f, struct matrix_t * tmp */ );struct matrix_t * readmatrix( /* FILE *f */ );struct matrix_t * newmatrix( /* int nl, int nc */ );void sparsefreematrix( /* struct matrix_t * mat */ );int sparseputval( /* struct matrix_t *mat, int i, int j, float val */ );/* 0 si i,j existe deja, 1 si i,j est nouveau */int sparsegetval( /* struct matrix_t *mat, int i, int j, float *val */ );/* 1 si i,j existe, 0 si i,j n'existe pas *//* 2 si c'est le premier non nul */struct matrix_t * sparsematrix( /*float **M, int nl, int nc */ );float **unsparsematrix( /* struct matrix_t * M */ );int resparsematrix( /* struct matrix_t * M */ );#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -