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

so-array.cc

解説を見る。
00001 /*
00002 
00003 Copyright (C) 2003 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 (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00024 #pragma implementation
00025 #endif
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030 
00031 #include <iostream>
00032 
00033 #include "ArrayN.h"
00034 #include "Array-util.h"
00035 // XXX FIXME XXX -- we are including the MArray{,2,N}.h files just for
00036 // their gripe_nonconformant function decls.
00037 #include "MArray.h"
00038 #include "MArray2.h"
00039 #include "MArrayN.h"
00040 #include "MArray-defs.h"
00041 #include "boolMatrix.h"
00042 #include "boolNDArray.h"
00043 #include "mx-op-defs.h"
00044 #include "so-array.h"
00045 
00046 boolNDArray
00047 streamoff_array::all (int dim) const
00048 {
00049   MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (MX_ND_ALL_EXPR), true);
00050 }
00051 
00052 boolNDArray
00053 streamoff_array::any (int dim) const
00054 {
00055   MX_ND_ANY_ALL_REDUCTION (MX_ND_ANY_EVAL (MX_ND_ANY_EXPR), false);
00056 }
00057 
00058 streamoff_array&
00059 operator += (streamoff_array& a, const std::streamoff& s)
00060 {
00061   DO_VS_OP2 (std::streamoff, a, +=, s)
00062   return a;
00063 }
00064 
00065 streamoff_array&
00066 operator -= (streamoff_array& a, const std::streamoff& s)
00067 {
00068   DO_VS_OP2 (std::streamoff, a, -=, s);
00069   return a;
00070 }
00071 
00072 streamoff_array&
00073 operator += (streamoff_array& a, const streamoff_array& b)
00074 {
00075   int l = a.length ();
00076   if (l > 0)
00077     {
00078       int bl = b.length ();
00079       if (l != bl)
00080         gripe_nonconformant ("operator +=", l, bl);
00081       else
00082         DO_VV_OP2 (std::streamoff, a, +=, b);
00083     }
00084   return a;
00085 }
00086 
00087 streamoff_array&
00088 operator -= (streamoff_array& a, const streamoff_array& b)
00089 {
00090   int l = a.length ();
00091   if (l > 0)
00092     {
00093       int bl = b.length ();
00094       if (l != bl)
00095         gripe_nonconformant ("operator -=", l, bl);
00096       else
00097         DO_VV_OP2 (std::streamoff, a, -=, b);
00098     }
00099   return a;
00100 }
00101 
00102 int
00103 streamoff_array::compute_index (Array<int>& ra_idx,
00104                                 const dim_vector& dimensions)
00105 {
00106   return ::compute_index (ra_idx, dimensions);
00107 }
00108 
00109 SND_CMP_OP (mx_el_eq, ==, std::streamoff, , streamoff_array, )
00110 SND_CMP_OP (mx_el_ne, !=, std::streamoff, , streamoff_array, )
00111 
00112 NDS_CMP_OP (mx_el_eq, ==, streamoff_array, , std::streamoff, )
00113 NDS_CMP_OP (mx_el_ne, !=, streamoff_array, , std::streamoff, )
00114 
00115 NDND_CMP_OP (mx_el_eq, ==, streamoff_array, , streamoff_array, )
00116 NDND_CMP_OP (mx_el_ne, !=, streamoff_array, , streamoff_array, )
00117 
00118 NDND_BIN_OP (streamoff_array, operator +,
00119              streamoff_array, streamoff_array, mx_inline_add)
00120 
00121 NDND_BIN_OP (streamoff_array, operator -,
00122              streamoff_array, streamoff_array, mx_inline_subtract)
00123 
00124 
00125 NDS_BIN_OP (streamoff_array, operator +,
00126             streamoff_array, std::streamoff, mx_inline_add)
00127 
00128 NDS_BIN_OP (streamoff_array, operator -,
00129             streamoff_array, std::streamoff, mx_inline_subtract)
00130 
00131 
00132 SND_BIN_OP (streamoff_array, operator +,
00133             std::streamoff, streamoff_array, mx_inline_add)
00134 
00135 SND_BIN_OP (streamoff_array, operator -,
00136             std::streamoff, streamoff_array, mx_inline_subtract)
00137 
00138 /*
00139 ;;; Local Variables: ***
00140 ;;; mode: C++ ***
00141 ;;; End: ***
00142 */

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