armadillo

Go to the documentation of this file.
00001 // Copyright (C) 2009 NICTA
00002 // 
00003 // Authors:
00004 // - Conrad Sanderson (conradsand at ieee dot org)
00005 // 
00006 // This file is part of the Armadillo C++ library.
00007 // It is provided without any warranty of fitness
00008 // for any purpose. You can redistribute this file
00009 // and/or modify it under the terms of the GNU
00010 // Lesser General Public License (LGPL) as published
00011 // by the Free Software Foundation, either version 3
00012 // of the License or (at your option) any later version.
00013 // (see http://www.opensource.org/licenses for more info)
00014 
00015 
00016 #ifndef ARMA_INCLUDES
00017 #define ARMA_INCLUDES
00018 
00019 
00020 #define arma_hot
00021 #define arma_pure
00022 #define arma_const
00023 #define arma_inline   inline
00024 #define arma_aligned
00025 
00026 
00027 #if defined(__GNUG__)
00028 
00029   #if (__GNUC__ < 4)
00030     #error "*** Need a newer compiler ***"
00031   #endif
00032   
00033   #if (__GNUC_MINOR__ >= 3)
00034     #undef  arma_hot
00035     #define arma_hot __attribute__((hot))
00036   #endif
00037 
00038   #undef  arma_pure
00039   #undef  arma_const
00040   #undef  arma_inline
00041   #undef  arma_aligned
00042 
00043   #define arma_pure           __attribute__((pure))
00044   #define arma_const          __attribute__((const))
00045   #define arma_inline  inline __attribute__((always_inline))
00046   #define arma_aligned        __attribute__((aligned))
00047   
00048   #define ARMA_GOOD_COMPILER
00049   
00050 #elif defined(__INTEL_COMPILER)
00051   
00052   #if (__INTEL_COMPILER < 1000)
00053     #error "*** Need a newer compiler ***"
00054   #endif
00055   
00056   #define ARMA_GOOD_COMPILER
00057   
00058 #elif defined(_MSC_VER)
00059   
00060   #pragma message ("*** WARNING: This compiler may have an incomplete implementation of the C++ standard ***")
00061   #undef ARMA_GOOD_COMPILER
00062 
00063 #endif
00064 
00065 
00066 
00067 
00068 
00069 #include "armadillo_bits/config.hpp"
00070 
00071 #include <cstdlib>
00072 #include <cstring>
00073 #include <climits>
00074 #include <cmath>
00075 
00076 #include <iostream>
00077 #include <fstream>
00078 #include <sstream>
00079 #include <stdexcept>
00080 #include <limits>
00081 #include <algorithm>
00082 #include <complex>
00083 #include <vector>
00084 
00085 
00086 #if defined(ARMA_HAVE_GETTIMEOFDAY)
00087   #include <sys/time.h>
00088 #endif
00089 
00090 
00091 #if defined(ARMA_USE_BOOST)
00092   #include <boost/format.hpp>
00093   #include <boost/current_function.hpp>
00094   #include <boost/math/complex.hpp>
00095   #include <boost/math/special_functions/acosh.hpp>
00096   #include <boost/math/special_functions/asinh.hpp>
00097   #include <boost/math/special_functions/atanh.hpp>
00098 #endif
00099 
00100 
00101 #if defined(ARMA_USE_BOOST_DATE)
00102   #include <boost/date_time/posix_time/posix_time.hpp>
00103 #endif
00104 
00105 
00106 #if defined(ARMA_USE_ATLAS)
00107   #define ARMA_TMP_STRING(x) x
00108 
00109   #define ARMA_ATLAS_INCLUDE_1 <ARMA_TMP_STRING(ARMA_ATLAS_INCLUDE_DIR)/ARMA_TMP_STRING(cblas.h)>
00110   #define ARMA_ATLAS_INCLUDE_2 <ARMA_TMP_STRING(ARMA_ATLAS_INCLUDE_DIR)/ARMA_TMP_STRING(clapack.h)>
00111   
00112   extern "C"
00113     {
00114     #include ARMA_ATLAS_INCLUDE_1
00115     #include ARMA_ATLAS_INCLUDE_2
00116     }
00117 
00118   #undef ARMA_TMP_STRING
00119   #undef ARMA_ATLAS_INCLUDE_1
00120   #undef ARMA_ATLAS_INCLUDE_2
00121 #endif
00122 
00123 
00124 #include "armadillo_bits/itpp_wrap.hpp"
00125 
00126 
00127 //! \namespace arma namespace for Armadillo classes and functions
00128 namespace arma
00129   {
00130   
00131   // preliminaries
00132   
00133   #include "armadillo_bits/forward_proto.hpp"
00134   #include "armadillo_bits/static_assert.hpp"
00135   #include "armadillo_bits/typedef.hpp"
00136   #include "armadillo_bits/format_wrap.hpp"
00137   #include "armadillo_bits/cmath_wrap.hpp"
00138   #include "armadillo_bits/constants.hpp"
00139   #include "armadillo_bits/traits.hpp"
00140   #include "armadillo_bits/access.hpp"
00141   
00142   
00143   //
00144   // class prototypes
00145   
00146   #include "armadillo_bits/syslib_proto.hpp"
00147   #include "armadillo_bits/podarray_proto.hpp"
00148   
00149   #include "armadillo_bits/blas_proto.hpp"
00150   #include "armadillo_bits/lapack_proto.hpp"
00151   #include "armadillo_bits/atlas_proto.hpp"
00152   #include "armadillo_bits/auxlib_proto.hpp"
00153   
00154   #include "armadillo_bits/Base.hpp"
00155   #include "armadillo_bits/BaseCube.hpp"
00156   
00157   #include "armadillo_bits/Mat_proto.hpp"
00158   #include "armadillo_bits/Col_proto.hpp"
00159   #include "armadillo_bits/Row_proto.hpp"
00160   #include "armadillo_bits/Cube_proto.hpp"
00161   
00162   #include "armadillo_bits/field_proto.hpp"
00163   #include "armadillo_bits/subview_proto.hpp"
00164   #include "armadillo_bits/subview_field_proto.hpp"
00165   #include "armadillo_bits/subview_cube_proto.hpp"
00166   #include "armadillo_bits/diagview_proto.hpp"
00167   
00168   
00169   #include "armadillo_bits/diskio_proto.hpp"
00170   #include "armadillo_bits/wall_clock_proto.hpp"
00171   #include "armadillo_bits/running_stat_proto.hpp"
00172   #include "armadillo_bits/running_stat_vec_proto.hpp"
00173   
00174   #include "armadillo_bits/Op_proto.hpp"
00175   #include "armadillo_bits/OpCube_proto.hpp"
00176   #include "armadillo_bits/Glue_proto.hpp"
00177   #include "armadillo_bits/GlueCube_proto.hpp"
00178   
00179   #include "armadillo_bits/op_diagmat_proto.hpp"
00180   #include "armadillo_bits/op_dot_proto.hpp"
00181   #include "armadillo_bits/op_inv_proto.hpp"
00182   #include "armadillo_bits/op_htrans_proto.hpp"
00183   #include "armadillo_bits/op_misc_proto.hpp"
00184   #include "armadillo_bits/op_max_proto.hpp"
00185   #include "armadillo_bits/op_min_proto.hpp"
00186   #include "armadillo_bits/op_mean_proto.hpp"
00187   #include "armadillo_bits/op_median_proto.hpp"
00188   #include "armadillo_bits/op_neg_proto.hpp"
00189   #include "armadillo_bits/op_ones_proto.hpp"
00190   #include "armadillo_bits/op_rand_proto.hpp"
00191   #include "armadillo_bits/op_randn_proto.hpp"
00192   #include "armadillo_bits/op_scalar_misc_proto.hpp"
00193   #include "armadillo_bits/op_sort_proto.hpp"
00194   #include "armadillo_bits/op_sum_proto.hpp"
00195   #include "armadillo_bits/op_stddev_proto.hpp"
00196   #include "armadillo_bits/op_trig_proto.hpp"
00197   #include "armadillo_bits/op_trans_proto.hpp"
00198   #include "armadillo_bits/op_var_proto.hpp"
00199   #include "armadillo_bits/op_zeros_proto.hpp"
00200   #include "armadillo_bits/op_repmat_proto.hpp"
00201   #include "armadillo_bits/op_reshape_proto.hpp"
00202   #include "armadillo_bits/op_cov_proto.hpp"
00203   #include "armadillo_bits/op_cor_proto.hpp"
00204   #include "armadillo_bits/op_shuffle_proto.hpp"
00205   #include "armadillo_bits/op_prod_proto.hpp"
00206   #include "armadillo_bits/op_eps_proto.hpp"
00207   #include "armadillo_bits/op_pinv_proto.hpp"
00208   
00209   #include "armadillo_bits/glue_plus_proto.hpp"
00210   #include "armadillo_bits/glue_minus_proto.hpp"
00211   #include "armadillo_bits/glue_times_proto.hpp"
00212   #include "armadillo_bits/glue_schur_proto.hpp"
00213   #include "armadillo_bits/glue_div_proto.hpp"
00214   
00215   #include "armadillo_bits/glue_cov_proto.hpp"
00216   #include "armadillo_bits/glue_cor_proto.hpp"
00217   #include "armadillo_bits/glue_kron_proto.hpp"
00218   
00219   #include "armadillo_bits/glue_cube_plus_proto.hpp"
00220   #include "armadillo_bits/glue_cube_minus_proto.hpp"
00221   #include "armadillo_bits/glue_cube_schur_proto.hpp"
00222   #include "armadillo_bits/glue_cube_div_proto.hpp"
00223   
00224   
00225   //
00226   // debugging functions
00227   
00228   #include "armadillo_bits/debug.hpp"
00229   
00230   
00231   //
00232   // classes that underlay metaprogramming 
00233   
00234   #include "armadillo_bits/unwrap.hpp"
00235   #include "armadillo_bits/unwrap_cube.hpp"
00236 
00237   #include "armadillo_bits/Op_meat.hpp"
00238   #include "armadillo_bits/OpCube_meat.hpp"
00239   #include "armadillo_bits/Glue_meat.hpp"
00240   #include "armadillo_bits/GlueCube_meat.hpp"
00241   
00242   #include "armadillo_bits/glue_metaprog.hpp"
00243   #include "armadillo_bits/glue_cube_metaprog.hpp"
00244   
00245   
00246   //
00247   // ostream
00248   
00249   #include "armadillo_bits/arma_ostream_proto.hpp"
00250   #include "armadillo_bits/arma_ostream_meat.hpp"
00251   
00252   
00253   //
00254   // operators
00255   
00256   #include "armadillo_bits/operator_plus.hpp"
00257   #include "armadillo_bits/operator_minus.hpp"
00258   #include "armadillo_bits/operator_times.hpp"
00259   #include "armadillo_bits/operator_times_dot.hpp"
00260   #include "armadillo_bits/operator_schur.hpp"
00261   #include "armadillo_bits/operator_div.hpp"
00262   #include "armadillo_bits/operator_relational.hpp"
00263   
00264   #include "armadillo_bits/operator_cube_plus.hpp"
00265   #include "armadillo_bits/operator_cube_minus.hpp"
00266   #include "armadillo_bits/operator_cube_times.hpp"
00267   #include "armadillo_bits/operator_cube_schur.hpp"
00268   #include "armadillo_bits/operator_cube_div.hpp"
00269   #include "armadillo_bits/operator_cube_relational.hpp"
00270   
00271   #include "armadillo_bits/operator_ostream.hpp"
00272   
00273   
00274   //
00275   // user accessible functions
00276   
00277   // the order of the fn_*.hpp include files matters,
00278   // as some files require functionality given in preceding files
00279   
00280   #include "armadillo_bits/fn_conv_to.hpp"
00281   #include "armadillo_bits/fn_min.hpp"
00282   #include "armadillo_bits/fn_max.hpp"
00283   #include "armadillo_bits/fn_accu.hpp"
00284   #include "armadillo_bits/fn_sum.hpp"
00285   #include "armadillo_bits/fn_diagmat.hpp"
00286   #include "armadillo_bits/fn_inv.hpp"
00287   #include "armadillo_bits/fn_trace.hpp"
00288   #include "armadillo_bits/fn_trans.hpp"
00289   #include "armadillo_bits/fn_det.hpp"
00290   #include "armadillo_bits/fn_eig.hpp"
00291   #include "armadillo_bits/fn_lu.hpp"
00292   #include "armadillo_bits/fn_zeros.hpp"
00293   #include "armadillo_bits/fn_ones.hpp"
00294   #include "armadillo_bits/fn_misc.hpp"
00295   #include "armadillo_bits/fn_norm.hpp"
00296   #include "armadillo_bits/fn_dot.hpp"
00297   #include "armadillo_bits/fn_rand.hpp"
00298   #include "armadillo_bits/fn_randn.hpp"
00299   #include "armadillo_bits/fn_trig.hpp"
00300   #include "armadillo_bits/fn_mean.hpp"
00301   #include "armadillo_bits/fn_median.hpp"
00302   #include "armadillo_bits/fn_stddev.hpp"
00303   #include "armadillo_bits/fn_var.hpp"
00304   #include "armadillo_bits/fn_sort.hpp"
00305   #include "armadillo_bits/fn_sort_index.hpp"
00306   #include "armadillo_bits/fn_htrans.hpp"
00307   #include "armadillo_bits/fn_chol.hpp"
00308   #include "armadillo_bits/fn_qr.hpp"
00309   #include "armadillo_bits/fn_svd.hpp"
00310   #include "armadillo_bits/fn_solve.hpp"
00311   #include "armadillo_bits/fn_repmat.hpp"
00312   #include "armadillo_bits/fn_reshape.hpp"
00313   #include "armadillo_bits/fn_cov.hpp"
00314   #include "armadillo_bits/fn_cor.hpp"
00315   #include "armadillo_bits/fn_shuffle.hpp"
00316   #include "armadillo_bits/fn_prod.hpp"
00317   #include "armadillo_bits/fn_eps.hpp"
00318   #include "armadillo_bits/fn_pinv.hpp"
00319   #include "armadillo_bits/fn_rank.hpp"
00320   #include "armadillo_bits/fn_kron.hpp"
00321   
00322   //
00323   // class meat
00324   
00325   #include "armadillo_bits/gemm.hpp"
00326   #include "armadillo_bits/gemv.hpp"
00327   #include "armadillo_bits/gemm_mixed.hpp"
00328   
00329   #include "armadillo_bits/podarray_meat.hpp"
00330   #include "armadillo_bits/auxlib_meat.hpp"
00331   
00332   #include "armadillo_bits/Mat_meat.hpp"
00333   #include "armadillo_bits/Col_meat.hpp"
00334   #include "armadillo_bits/Row_meat.hpp"
00335   #include "armadillo_bits/Cube_meat.hpp"
00336   #include "armadillo_bits/field_meat.hpp"
00337   #include "armadillo_bits/subview_meat.hpp"
00338   #include "armadillo_bits/subview_field_meat.hpp"
00339   #include "armadillo_bits/subview_cube_meat.hpp"
00340   #include "armadillo_bits/diagview_meat.hpp"
00341   
00342   #include "armadillo_bits/diskio_meat.hpp"
00343   #include "armadillo_bits/wall_clock_meat.hpp"
00344   #include "armadillo_bits/running_stat_meat.hpp"
00345   #include "armadillo_bits/running_stat_vec_meat.hpp"
00346   
00347   #include "armadillo_bits/op_diagmat_meat.hpp"
00348   #include "armadillo_bits/op_dot_meat.hpp"
00349   #include "armadillo_bits/op_inv_meat.hpp"
00350   #include "armadillo_bits/op_htrans_meat.hpp"
00351   #include "armadillo_bits/op_misc_meat.hpp"
00352   #include "armadillo_bits/op_max_meat.hpp"
00353   #include "armadillo_bits/op_min_meat.hpp"
00354   #include "armadillo_bits/op_mean_meat.hpp"
00355   #include "armadillo_bits/op_median_meat.hpp"
00356   #include "armadillo_bits/op_neg_meat.hpp"
00357   #include "armadillo_bits/op_ones_meat.hpp"
00358   #include "armadillo_bits/op_rand_meat.hpp"
00359   #include "armadillo_bits/op_randn_meat.hpp"
00360   #include "armadillo_bits/op_scalar_misc_meat.hpp"
00361   #include "armadillo_bits/op_sort_meat.hpp"
00362   #include "armadillo_bits/op_sum_meat.hpp"
00363   #include "armadillo_bits/op_stddev_meat.hpp"
00364   #include "armadillo_bits/op_trans_meat.hpp"
00365   #include "armadillo_bits/op_trig_meat.hpp"
00366   #include "armadillo_bits/op_var_meat.hpp"
00367   #include "armadillo_bits/op_zeros_meat.hpp"
00368   #include "armadillo_bits/op_repmat_meat.hpp"
00369   #include "armadillo_bits/op_reshape_meat.hpp"
00370   #include "armadillo_bits/op_cov_meat.hpp"
00371   #include "armadillo_bits/op_cor_meat.hpp"
00372   #include "armadillo_bits/op_shuffle_meat.hpp"
00373   #include "armadillo_bits/op_prod_meat.hpp"
00374   #include "armadillo_bits/op_eps_meat.hpp"
00375   #include "armadillo_bits/op_pinv_meat.hpp"
00376   
00377   #include "armadillo_bits/glue_plus_meat.hpp"
00378   #include "armadillo_bits/glue_minus_meat.hpp"
00379   #include "armadillo_bits/glue_times_meat.hpp"
00380   #include "armadillo_bits/glue_schur_meat.hpp"
00381   #include "armadillo_bits/glue_div_meat.hpp"
00382   
00383   #include "armadillo_bits/glue_cov_meat.hpp"
00384   #include "armadillo_bits/glue_cor_meat.hpp"
00385   #include "armadillo_bits/glue_kron_meat.hpp"
00386   
00387   #include "armadillo_bits/glue_cube_plus_meat.hpp"
00388   #include "armadillo_bits/glue_cube_minus_meat.hpp"
00389   #include "armadillo_bits/glue_cube_schur_meat.hpp"
00390   #include "armadillo_bits/glue_cube_div_meat.hpp"
00391   }
00392   
00393 #endif
00394