メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

FEGrid.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 2, or (at your option) any
00010 later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00021 */
00022 
00023 #if !defined (octave_FEGrid_h)
00024 #define octave_FEGrid_h 1
00025 
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029 
00030 #include <iostream>
00031 
00032 #include "dColVector.h"
00033 
00034 class
00035 FEGrid
00036 {
00037 public:
00038 
00039   FEGrid (void)
00040     : elem () { }
00041 
00042   FEGrid (const ColumnVector& elbnds)
00043     : elem (elbnds) { check_grid (); }
00044 
00045   FEGrid (int nel, double width);
00046 
00047   FEGrid (int nel, double left, double right);
00048 
00049   FEGrid (const FEGrid& a)
00050     : elem (a.elem) { }
00051 
00052   FEGrid& operator = (const FEGrid& a)
00053     {
00054       if (this != &a)
00055         elem = a.elem;
00056 
00057       return *this;
00058     }
00059 
00060   ~FEGrid (void) { }
00061 
00062   int element (double x) const;
00063 
00064   double left (void) const { return elem.elem (0); }
00065 
00066   double right (void) const { return elem.elem (elem.capacity () - 1); }
00067 
00068   int in_bounds (double x) const { return (x >= left () && x <= right ()); }
00069 
00070   ColumnVector element_boundaries (void) const { return elem; }
00071 
00072   friend std::ostream& operator << (std::ostream&, const FEGrid&);
00073 
00074 protected:
00075 
00076   ColumnVector elem;
00077 
00078 private:
00079 
00080   void error (const char* msg) const;
00081   void nel_error (void) const;
00082 
00083   void check_grid (void) const;
00084 };
00085 
00086 #endif
00087 
00088 /*
00089 ;;; Local Variables: ***
00090 ;;; mode: C++ ***
00091 ;;; End: ***
00092 */

Wed Dec 29 11:51:34 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送