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

oct-rand.h

解説を見る。
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 (octave_rand_h)
00024 #define octave_rand_h 1
00025 
00026 #include <string>
00027 
00028 #include "dMatrix.h"
00029 #include "dNDArray.h"
00030 
00031 struct
00032 octave_rand
00033 {
00034   // Return the current seed.
00035   static double seed (void);
00036 
00037   // Set the seed.
00038   static void seed (double s);
00039 
00040   // Return the current distribution.
00041   static std::string distribution (void);
00042 
00043   // Set the current distribution.  May be either "uniform" (the
00044   // default) or "normal".
00045   static void distribution (const std::string& d);
00046 
00047   static void uniform_distribution (void);
00048 
00049   static void normal_distribution (void);
00050 
00051   // Return the next number from the sequence.
00052   static double scalar (void);
00053 
00054   // Return a matrix of numbers from the sequence, filled in column
00055   // major order.
00056   static Matrix matrix (int r, int c);
00057 
00058   // Return an N-dimensional array of numbers from the sequence,
00059   // filled in column major order.
00060   static NDArray nd_array (const dim_vector& dims);
00061 
00062   // Return an array of numbers from the sequence.
00063   static Array<double> vector (int n);
00064 };
00065 
00066 #endif
00067 
00068 /*
00069 ;;; Local Variables: ***
00070 ;;; mode: C++ ***
00071 ;;; End: ***
00072 */

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