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

Array-util.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 2000 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_Array_util_h)
00024 #define octave_Array_util_h 1
00025 
00026 #include <cassert>
00027 
00028 #include "Array.h"
00029 #include "dim-vector.h"
00030 #include "idx-vector.h"
00031 #include "lo-error.h"
00032 
00033 extern bool index_in_bounds (const Array<int>& ra_idx,
00034                              const dim_vector& dimensions);
00035 
00036 extern void increment_index (Array<int>& ra_idx,
00037                              const dim_vector& dimensions,
00038                              int start_dimension = 0);
00039 
00040 extern int get_scalar_idx (Array<int>& idx, dim_vector& dims);
00041 
00042 extern int num_ones (const Array<int>& ra_idx);
00043 
00044 extern bool is_scalar (const dim_vector& dim);
00045 
00046 extern bool any_ones (const Array<int>& arr);
00047 
00048 extern int compute_index (const Array<int>& ra_idx, const dim_vector& dims);
00049 
00050 extern Array<int> conv_to_int_array (const Array<idx_vector>& a);
00051 
00052 extern Array<idx_vector> conv_to_array (const idx_vector *tmp, const int len);
00053 
00054 extern dim_vector freeze (Array<idx_vector>& ra_idx,
00055                           const dim_vector& dimensions, int resize_ok);
00056 
00057 extern bool vector_equivalent (const Array<int>& ra_idx);
00058 
00059 extern bool all_ok (const Array<idx_vector>& ra_idx);
00060 
00061 extern bool any_orig_empty (const Array<idx_vector>& ra_idx);
00062 
00063 extern bool all_colon_equiv (const Array<idx_vector>& ra_idx,
00064                              const dim_vector& frozen_lengths);
00065 
00066 extern bool is_in (int num, const idx_vector& idx);
00067 
00068 extern int how_many_lgt (const int num, idx_vector& idxv);
00069 
00070 extern bool all_ones (const Array<int>& arr);
00071 
00072 extern Array<int> get_elt_idx (const Array<idx_vector>& ra_idx,
00073                                const Array<int>& result_idx);
00074 
00075 extern Array<int> get_ra_idx (int idx, const dim_vector& dims);
00076 
00077 extern dim_vector short_freeze (Array<idx_vector>& ra_idx,
00078                                 const dim_vector& dimensions,
00079                                 int resize_ok);
00080 
00081 extern Array<int> calc_permutated_idx (const Array<int>& old_idx, 
00082                                        const Array<int>& perm_vec, bool inv);
00083 
00084 extern void gripe_nonconformant (const char *op, int op1_len, int op2_len);
00085 
00086 extern void gripe_nonconformant (const char *op, int op1_nr, int op1_nc,
00087                                  int op2_nr, int op2_nc);
00088 
00089 
00090 extern void gripe_nonconformant (const char *op, dim_vector& op1_dims,
00091                                  dim_vector& op2_dims);
00092 
00093 #endif
00094 
00095 /*
00096 ;;; Local Variables: ***
00097 ;;; mode: C++ ***
00098 ;;; End: ***
00099 */

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