/* * Methods of class Tbl * * (see file tbl.h for documentation) * */ /* * Copyright (c) 1999-2000 Jean-Alain Marck * Copyright (c) 1999-2001 Eric Gourgoulhon * * This file is part of LORENE. * * LORENE 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. * * LORENE 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 LORENE; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ char tbl_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tbl/tbl.C,v 1.11 2014/10/13 08:53:41 j_novak Exp $" ; /* * $Id: tbl.C,v 1.11 2014/10/13 08:53:41 j_novak Exp $ * $Log: tbl.C,v $ * Revision 1.11 2014/10/13 08:53:41 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.10 2014/10/06 15:13:18 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.9 2008/02/18 13:53:47 j_novak * Removal of special indentation instructions. * * Revision 1.8 2006/09/25 10:01:50 p_grandclement * Addition of N-dimensional Tbl * * Revision 1.7 2003/11/03 13:53:20 j_novak * Yet another efficiency improvement. * * Revision 1.6 2003/10/19 19:58:56 e_gourgoulhon * Slightly improved operator<<. * * Revision 1.5 2003/02/26 10:47:11 j_novak * The copy of a Tbl to another has been improved in speed. * * Revision 1.4 2002/10/16 14:37:13 j_novak * Reorganization of #include instructions of standard C++, in order to * use experimental version 3 of gcc. * * Revision 1.3 2002/09/24 08:32:07 e_gourgoulhon * * Added constructor from Matrice. * * Revision 1.2 2001/12/04 21:27:54 e_gourgoulhon * * All writing/reading to a binary file are now performed according to * the big endian convention, whatever the system is big endian or * small endian, thanks to the functions fwrite_be and fread_be * * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon * LORENE * * Revision 2.13 1999/11/24 16:00:43 eric * Modif affichage dimensions dans affiche_seuil. * * Revision 2.12 1999/11/23 13:32:44 eric * Le constructeur Tbl::Tbl(const Dim_tbl ) devient Tbl::Tbl(const Dim_tbl& ). * Le constructeur Tbl::Tbl(const Grille3d* ) devient * Tbl(const Grille3d& ). * Modif affichage. * * Revision 2.11 1999/11/15 16:36:36 eric * Le membre dim est desormais un Dim_tbl et non plus un pointeur sur un * Dim_tbl. * * Revision 2.10 1999/10/29 15:45:44 eric * Ajout des cas 1-D et 2-D dans operator<< * * Revision 2.9 1999/10/29 15:05:16 eric * Suppression des fonctions membres min() et max(): * elles deviennent des fonctions externes. * * Revision 2.8 1999/10/21 14:37:34 eric * *** empty log message *** * * Revision 2.7 1999/10/18 15:06:13 eric * La fonction membre annule() est rebaptisee annule_hard(). * * Revision 2.6 1999/10/15 13:58:39 eric * Modification de l'affichage (operator<<). * * Revision 2.5 1999/10/01 12:36:08 eric * Ajout de la fonction affiche_seuil. * * Revision 2.4 1999/10/01 10:09:52 eric * 0 -> double(0) * * Revision 2.3 1999/09/30 12:51:46 eric * Enleve l'include "grilles.h" non necessaire. * * Revision 2.2 1999/09/24 14:24:23 eric * Depoussierage, changement de prototypes, etc... * * Revision 2.1 1999/03/02 16:49:42 eric * *** empty log message *** * * Revision 2.0 1999/02/15 10:42:45 hyc * *** empty log message *** * * * $Header: /cvsroot/Lorene/C++/Source/Tbl/tbl.C,v 1.11 2014/10/13 08:53:41 j_novak Exp $ * */ // headers C #include // headers Lorene #include "itbl.h" #include "tbl.h" #include "grilles.h" #include "matrice.h" #include "utilitaires.h" //---------------// // Constructeurs // //---------------// // Constructeur 1D namespace Lorene { Tbl::Tbl(int n1) : etat(ETATNONDEF), dim(n1), t(0x0) {} // Constructeur 2D Tbl::Tbl(int n1, int n0) : etat(ETATNONDEF), dim(n1, n0), t(0x0) {} // Constructeur 3D Tbl::Tbl(int n2, int n1, int n0) : etat(ETATNONDEF), dim(n2, n1, n0), t(0x0) {} // Constructeur a partir d'une grille 3D Tbl::Tbl(const Grille3d& g) : etat(ETATNONDEF), dim(g.get_np(), g.get_nt(), g.get_nr()), t(0x0) {} // Constructeur a partir d'un Itbl Tbl::Tbl(Itbl sizes) : etat(ETATNONDEF), dim(1), t(0x0) { int n = sizes.get_dim(0) ; int* dims = new int[n] ; for (int i=0 ; i= seuil ) test_imp = 1 ; } if (test_imp == 1 ) { ost << " #k=" << k <<",j=" << j << " : " ; for (int i=0; i